diff --git a/Magento2/Sniffs/Annotation/MethodArgumentsSniff.php b/Magento2/Sniffs/Annotation/MethodArgumentsSniff.php index 07294a54..167aabc6 100644 --- a/Magento2/Sniffs/Annotation/MethodArgumentsSniff.php +++ b/Magento2/Sniffs/Annotation/MethodArgumentsSniff.php @@ -668,10 +668,14 @@ private function checkIfNamespaceContainsApi(File $phpcsFile) : bool return false; } $tokens = $phpcsFile->getTokens(); - for ( + // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall + for ( // phpcs:ignore Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterOpen + // phpcs:ignore Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterFirst $index = $namespaceStackPtr; + // phpcs:ignore Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterSecond array_key_exists($index, $tokens) && 'T_SEMICOLON' !== $tokens[$index]['type']; $index++ + // phpcs:ignore Squiz.ControlStructures.ForLoopDeclaration.SpacingBeforeClose ) { if ('T_STRING' === $tokens[$index]['type'] && 'Api' === $tokens[$index]['content']) { return true;