diff --git a/Magento2/Sniffs/Annotation/MethodArgumentsSniff.php b/Magento2/Sniffs/Annotation/MethodArgumentsSniff.php index 07294a54..b0be59ec 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(); + // phpcs:ignore Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterOpen,Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed for ( + // 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;