Skip to content

Commit e5569b6

Browse files
committed
Generic/JumbledIncrementer: fix inconsistency
The name of the sniff uses "Incrementer", while the error message uses "Incrementor". This feels inconsistent. Based on some light research, both terms can be used interchangable, so I'm proposing to make the error message consistent with the sniff name, as changing the sniff name would be a breaking change. Includes making the same change in an inline comment.
1 parent b3a6b32 commit e5569b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function process(File $phpcsFile, $stackPtr)
6767
return;
6868
}
6969

70-
// Find incrementors for outer loop.
70+
// Find incrementers for outer loop.
7171
$outer = $this->findIncrementers($tokens, $token);
7272

7373
// Skip if empty.
@@ -88,7 +88,7 @@ public function process(File $phpcsFile, $stackPtr)
8888
$diff = array_intersect($outer, $inner);
8989

9090
if (count($diff) !== 0) {
91-
$error = 'Loop incrementor (%s) jumbling with inner loop';
91+
$error = 'Loop incrementer (%s) jumbling with inner loop';
9292
$data = [implode(', ', $diff)];
9393
$phpcsFile->addWarning($error, $stackPtr, 'Found', $data);
9494
}

0 commit comments

Comments
 (0)