Skip to content

Commit

Permalink
Temporarily disable the prelim check to pass tests
Browse files Browse the repository at this point in the history
I need to find another to solve this. May need to compare the perfomance of `is_targetted_token()` and  `is_callback_function()` with the `prelim_check_regex`
  • Loading branch information
grappler committed May 26, 2018
1 parent f28de3f commit fa2ca4d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WordPress/AbstractFunctionRestrictionsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ public function process_token( $stackPtr ) {
// Preliminary check. If the content of the T_STRING is not one of the functions we're
// looking for, we can bow out before doing the heavy lifting of checking whether
// this is a function call.
if ( preg_match( $this->prelim_check_regex, $this->tokens[ $stackPtr ]['content'] ) !== 1 ) {
return;
}
// if ( preg_match( $this->prelim_check_regex, $this->tokens[ $stackPtr ]['content'] ) !== 1 ) {
// return;
// }

if ( false === $this->is_targetted_token( $stackPtr ) ) {
return;
Expand Down

0 comments on commit fa2ca4d

Please sign in to comment.