Skip to content

Commit

Permalink
CS: Use pre-increment over post-increment
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryJones committed Jan 24, 2023
1 parent 8953e4a commit f5a7c20
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ protected function processTokenWithinScope( File $phpcsFile, $stackPtr, $currSco
return;
}
}
$i++;
++$i;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,9 @@ private function processFunctionBody( $stackPtr ) {

while ( $returnTokenPtr ) {
if ( $this->isInsideIfConditonal( $returnTokenPtr ) ) {
$insideIfConditionalReturn++;
++$insideIfConditionalReturn;
} else {
$outsideConditionalReturn++;
++$outsideConditionalReturn;
}
if ( $this->isReturningVoid( $returnTokenPtr ) ) {
$message = 'Please, make sure that a callback to `%s` filter is returning void intentionally.';
Expand Down

0 comments on commit f5a7c20

Please sign in to comment.