Skip to content

Commit

Permalink
Add missing type-cast from SimpleXMLElement
Browse files Browse the repository at this point in the history
  • Loading branch information
fredden committed Sep 27, 2024
1 parent 5e2f01d commit ef3ab20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Magento2/Sniffs/Legacy/WidgetXMLSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function process(File $phpcsFile, $stackPtr)
if (!property_exists($element->attributes(), 'type')) {
continue;
}
$type = $element['type'];
$type = (string) $element['type'];
if (preg_match('/\//', $type)) {
$phpcsFile->addError(
"Factory name detected: {$type}.",
Expand Down

0 comments on commit ef3ab20

Please sign in to comment.