From 1fa53655f21ebc19542ba5104b9ad38f6ef052da Mon Sep 17 00:00:00 2001 From: Jacob Brown Date: Mon, 18 Dec 2023 12:42:17 -0600 Subject: [PATCH] Adding phpcs:ignore for for loop in MethodArgumentsSniff --- Magento2/Sniffs/Annotation/MethodArgumentsSniff.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Magento2/Sniffs/Annotation/MethodArgumentsSniff.php b/Magento2/Sniffs/Annotation/MethodArgumentsSniff.php index 07294a54..af7cd9a2 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 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;