File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
Magento2/Sniffs/Annotation Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -668,15 +668,7 @@ private function checkIfNamespaceContainsApi(File $phpcsFile) : bool
668668 return false ;
669669 }
670670 $ tokens = $ phpcsFile ->getTokens ();
671- // phpcs:ignore Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterOpen,Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
672- for (
673- // phpcs:ignore Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterFirst
674- $ index = $ namespaceStackPtr ;
675- // phpcs:ignore Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterSecond
676- array_key_exists ($ index , $ tokens ) && 'T_SEMICOLON ' !== $ tokens [$ index ]['type ' ];
677- $ index ++
678- // phpcs:ignore Squiz.ControlStructures.ForLoopDeclaration.SpacingBeforeClose
679- ) {
671+ for ($ index = $ namespaceStackPtr ; 'T_SEMICOLON ' !== ($ tokens [$ index ]['type ' ] ?? 'T_SEMICOLON ' ); $ index ++) {
680672 if ('T_STRING ' === $ tokens [$ index ]['type ' ] && 'Api ' === $ tokens [$ index ]['content ' ]) {
681673 return true ;
682674 }
You can’t perform that action at this time.
0 commit comments