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 59b5d46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions 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();
// 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;
Expand Down

0 comments on commit 59b5d46

Please sign in to comment.