create-prisma-php-app 2.2.2 → 2.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -225,18 +225,9 @@ class TemplateCompiler
|
|
|
225
225
|
);
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
protected static function processNode(DOMNode $node
|
|
228
|
+
protected static function processNode(DOMNode $node): string
|
|
229
229
|
{
|
|
230
230
|
if ($node instanceof DOMElement) {
|
|
231
|
-
$tag = strtolower($node->nodeName);
|
|
232
|
-
$currentInBody = ($tag === 'body') ? true : $inBody;
|
|
233
|
-
|
|
234
|
-
if ($tag === 'script' && $inBody) {
|
|
235
|
-
if (strtolower($node->getAttribute('type')) !== 'module') {
|
|
236
|
-
$node->setAttribute('type', 'module');
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
231
|
$componentName = $node->nodeName;
|
|
241
232
|
$attributes = [];
|
|
242
233
|
foreach ($node->attributes as $attr) {
|
|
@@ -248,7 +239,7 @@ class TemplateCompiler
|
|
|
248
239
|
|
|
249
240
|
$childOutput = [];
|
|
250
241
|
foreach ($node->childNodes as $child) {
|
|
251
|
-
$childOutput[] = self::processNode($child
|
|
242
|
+
$childOutput[] = self::processNode($child);
|
|
252
243
|
}
|
|
253
244
|
$componentInstance->children = implode('', $childOutput);
|
|
254
245
|
|
|
@@ -260,7 +251,7 @@ class TemplateCompiler
|
|
|
260
251
|
} else {
|
|
261
252
|
$childOutput = [];
|
|
262
253
|
foreach ($node->childNodes as $child) {
|
|
263
|
-
$childOutput[] = self::processNode($child
|
|
254
|
+
$childOutput[] = self::processNode($child);
|
|
264
255
|
}
|
|
265
256
|
$attributes['children'] = implode('', $childOutput);
|
|
266
257
|
return self::renderAsHtml($componentName, $attributes);
|