Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding phpcs:ignore for for loop in MethodArgumentsSniff
Browse files Browse the repository at this point in the history
JacobBrownAustin committed Dec 18, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
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
@@ -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;

0 comments on commit 1fa5365

Please sign in to comment.