Skip to content

Commit 0496ce9

Browse files
authored
Merge pull request #596 from Automattic/remove_blacklisted_word
Functions/DynamicCalls: Remove the word "blacklisted" and use "disallowed"
2 parents 387d448 + b99c31d commit 0496ce9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

WordPressVIPMinimum/Sniffs/Functions/DynamicCallsSniff.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class DynamicCallsSniff extends Sniff {
3030
*
3131
* @var array
3232
*/
33-
private $function_names = [
33+
private $disallowed_functions = [
3434
'assert' => true,
3535
'compact' => true,
3636
'extract' => true,
@@ -141,7 +141,7 @@ private function collect_variables() {
141141
*/
142142
$current_var_value = $this->strip_quotes( $this->tokens[ $value_ptr ]['content'] );
143143

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

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

0 commit comments

Comments
 (0)