Skip to content

Commit

Permalink
Adding phpcs:ignore for for loop in MethodArgumentsSniff
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobBrownAustin committed Dec 18, 2023
1 parent 38f565c commit 1fa5365
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Magento2/Sniffs/Annotation/MethodArgumentsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -668,10 +668,14 @@ private function checkIfNamespaceContainsApi(File $phpcsFile) : bool
return false;
}
$tokens = $phpcsFile->getTokens();
for (
// phpcs:ignore Squiz.ControlStructures.ForLoopDeclaration.SpacingAfterOpen
for ( // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
// 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;
Expand Down

0 comments on commit 1fa5365

Please sign in to comment.