Skip to content

Commit f3a0f29

Browse files
committed
Merge branch 'feature/2354-squiz-incrementdecrementingusage-pre-vs-post' of https://github.com/jrfnl/PHP_CodeSniffer
2 parents 07ccaf2 + 80f953c commit f3a0f29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Standards/Squiz/Sniffs/Operators/IncrementDecrementUsageSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ protected function processAssignment($phpcsFile, $stackPtr)
205205
}
206206
}
207207

208-
$expected = $tokens[$assignedVar]['content'].$operator.$operator;
208+
$expected = $operator.$operator.$tokens[$assignedVar]['content'];
209209
$found = $phpcsFile->getTokensAsString($assignedVar, ($statementEnd - $assignedVar + 1));
210210

211211
if ($operator === '+') {

0 commit comments

Comments
 (0)