Skip to content

Commit ef3ab20

Browse files
committed
Add missing type-cast from SimpleXMLElement
1 parent 5e2f01d commit ef3ab20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: Magento2/Sniffs/Legacy/WidgetXMLSniff.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function process(File $phpcsFile, $stackPtr)
5353
if (!property_exists($element->attributes(), 'type')) {
5454
continue;
5555
}
56-
$type = $element['type'];
56+
$type = (string) $element['type'];
5757
if (preg_match('/\//', $type)) {
5858
$phpcsFile->addError(
5959
"Factory name detected: {$type}.",

0 commit comments

Comments
 (0)