Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions WordPressVIPMinimum/Sniffs/Functions/DynamicCallsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class DynamicCallsSniff extends Sniff {
*
* @var array
*/
private $function_names = [
private $disallowed_functions = [
'assert' => true,
'compact' => true,
'extract' => true,
Expand Down Expand Up @@ -141,7 +141,7 @@ private function collect_variables() {
*/
$current_var_value = $this->strip_quotes( $this->tokens[ $value_ptr ]['content'] );

if ( isset( $this->function_names[ $current_var_value ] ) === false ) {
if ( isset( $this->disallowed_functions[ $current_var_value ] ) === false ) {
// Text string is not one of the ones we're looking for.
return;
}
Expand All @@ -167,7 +167,7 @@ private function find_dynamic_calls() {

/*
* If variable is not found in our registry of variables, do nothing, as we cannot be
* sure that the function being called is one of the blacklisted ones.
* sure that the function being called is one of the disallowed ones.
*/
if ( ! isset( $this->variables_arr[ $this->tokens[ $this->stackPtr ]['content'] ] ) ) {
return;
Expand Down