diff --git a/.phpcs.xml.dist b/.phpcs.xml.dist index 5096365e..db53aea3 100644 --- a/.phpcs.xml.dist +++ b/.phpcs.xml.dist @@ -34,6 +34,11 @@ + + + + + diff --git a/WordPressVIPMinimum/Sniffs/Functions/DynamicCallsSniff.php b/WordPressVIPMinimum/Sniffs/Functions/DynamicCallsSniff.php index 05318571..e1f6a22e 100644 --- a/WordPressVIPMinimum/Sniffs/Functions/DynamicCallsSniff.php +++ b/WordPressVIPMinimum/Sniffs/Functions/DynamicCallsSniff.php @@ -106,9 +106,7 @@ private function collect_variables() { return; } - $current_var_name = $this->tokens[ - $this->stackPtr - ]['content']; + $current_var_name = $this->tokens[ $this->stackPtr ]['content']; /* * Find assignments ( $foo = "bar"; ) @@ -202,9 +200,7 @@ private function find_dynamic_calls() { */ if ( ! isset( - $this->variables_arr[ - $this->tokens[ $this->stackPtr ]['content'] - ] + $this->variables_arr[ $this->tokens[ $this->stackPtr ]['content'] ] ) ) { return; } @@ -220,16 +216,12 @@ private function find_dynamic_calls() { $i++; } while ( 'T_WHITESPACE' === - $this->tokens[ - $this->stackPtr + $i - ]['type'] + $this->tokens[ $this->stackPtr + $i ]['type'] ); if ( 'T_OPEN_PARENTHESIS' !== - $this->tokens[ - $this->stackPtr + $i - ]['type'] + $this->tokens[ $this->stackPtr + $i ]['type'] ) { return; } @@ -242,9 +234,7 @@ private function find_dynamic_calls() { */ if ( ! in_array( - $this->variables_arr[ - $this->tokens[ $this->stackPtr ]['content'] - ], + $this->variables_arr[ $this->tokens[ $this->stackPtr ]['content'] ], $this->blacklisted_functions, true ) ) {