Skip to content

Commit

Permalink
Merge pull request #1799 from WordPress/feature/yodaconditions-minor-…
Browse files Browse the repository at this point in the history
…efficiency-fix

YodaConditions: minor efficiency fix
  • Loading branch information
dingo-d authored Sep 20, 2019
2 parents 9c506d6 + 9a89756 commit 2f396d1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WordPress/Sniffs/PHP/YodaConditionsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function process_token( $stackPtr ) {

if ( \in_array( $this->tokens[ $next_non_empty ]['code'], array( \T_SELF, \T_PARENT, \T_STATIC ), true ) ) {
$next_non_empty = $this->phpcsFile->findNext(
array_merge( Tokens::$emptyTokens, array( \T_DOUBLE_COLON ) ),
( Tokens::$emptyTokens + array( \T_DOUBLE_COLON => \T_DOUBLE_COLON ) ),
( $next_non_empty + 1 ),
null,
true
Expand Down

0 comments on commit 2f396d1

Please sign in to comment.