Skip to content

Commit

Permalink
Remove useless if condition
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Feb 18, 2020
1 parent 71d6acd commit f9b9c7e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/Utils/Tokens.php
Expand Up @@ -55,13 +55,8 @@ public static function match(Token $token, array $pattern)
}

// Flags.
if (isset($pattern['flags'])
&& (($pattern['flags'] & $token->flags) === 0)
) {
return false;
}

return true;
return ! isset($pattern['flags'])
|| (! (($pattern['flags'] & $token->flags) === 0));
}

public static function replaceTokens($list, array $find, array $replace)
Expand Down

0 comments on commit f9b9c7e

Please sign in to comment.