From 92404ee9297c66750a7be29a2b5933e1dc825d82 Mon Sep 17 00:00:00 2001 From: Dan Wallis Date: Mon, 29 Jul 2024 23:15:20 +0100 Subject: [PATCH] Correct error code in Squiz.ControlStructures.ForEachLoopDeclaration From what we can determine, this is a typographical error / mistake. It seems that the intention here was to use the same error code for both sides of this if/else block. --- .../Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php b/src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php index b04ecda9d4..498849209f 100644 --- a/src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php +++ b/src/Standards/Squiz/Sniffs/ControlStructures/ForEachLoopDeclarationSniff.php @@ -88,7 +88,7 @@ public function process(File $phpcsFile, $stackPtr) $this->requiredSpacesAfterOpen, $spaceAfterOpen, ]; - $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpacingAfterOpen', $data); + $fix = $phpcsFile->addFixableError($error, $stackPtr, 'SpaceAfterOpen', $data); if ($fix === true) { $padding = str_repeat(' ', $this->requiredSpacesAfterOpen); if ($spaceAfterOpen === 0) {