File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -245,12 +245,12 @@ public function process(File $phpcsFile, $stackPtr)
245245 private function testObsoleteReferences (SimpleXMLElement $ layout , File $ phpcsFile ): void
246246 {
247247 foreach ($ layout as $ handle ) {
248- $ attributes = $ handle ->attributes ();
249- if (!isset ($ this ->obsoleteReferences [( string ) $ attributes -> handle ])) {
248+ $ handleAttribute = ( string ) $ handle ->attributes ()-> handle ;
249+ if (!isset ($ this ->obsoleteReferences [$ handleAttribute ])) {
250250 continue ;
251251 }
252252 foreach ($ handle ->xpath ('//reference | //referenceContainer | //referenceBlock ' ) as $ reference ) {
253- if (in_array ((string )$ reference ['name ' ], $ this ->obsoleteReferences [( string ) $ attributes -> handle ]) !== false ) {
253+ if (in_array ((string )$ reference ['name ' ], $ this ->obsoleteReferences [$ handleAttribute ]) !== false ) {
254254 $ phpcsFile ->addError (
255255 'The block being referenced is removed. ' ,
256256 dom_import_simplexml ($ reference )->getLineNo ()-1 ,
You can’t perform that action at this time.
0 commit comments