Skip to content

Commit

Permalink
Correct error code in Squiz.ControlStructures.ForEachLoopDeclaration
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fredden authored and jrfnl committed Sep 29, 2024
1 parent 92c8ef5 commit 4625938
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,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) {
Expand Down

0 comments on commit 4625938

Please sign in to comment.