Skip to content

Commit 2f396d1

Browse files
authored
Merge pull request #1799 from WordPress/feature/yodaconditions-minor-efficiency-fix
YodaConditions: minor efficiency fix
2 parents 9c506d6 + 9a89756 commit 2f396d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WordPress/Sniffs/PHP/YodaConditionsSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function process_token( $stackPtr ) {
108108

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

0 commit comments

Comments
 (0)