diff --git a/Magento2/Sniffs/Legacy/WidgetXMLSniff.php b/Magento2/Sniffs/Legacy/WidgetXMLSniff.php index 8724d850..fe91a8a0 100644 --- a/Magento2/Sniffs/Legacy/WidgetXMLSniff.php +++ b/Magento2/Sniffs/Legacy/WidgetXMLSniff.php @@ -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}.",