Skip to content

Commit 3a56af3

Browse files
committed
Docs: improve consistency and specificity [2]
This fixes up the `@var` type declarations for all `AbstractFunctionParameterSniff::$target_functions` properties.
1 parent 12154a6 commit 3a56af3

File tree

5 files changed

+5
-17
lines changed

5 files changed

+5
-17
lines changed

WordPressVIPMinimum/Sniffs/Functions/StripTagsSniff.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ class StripTagsSniff extends AbstractFunctionParameterSniff {
2626
/**
2727
* Functions this sniff is looking for.
2828
*
29-
* @var array The only requirement for this array is that the top level
30-
* array keys are the names of the functions you're looking for.
31-
* Other than that, the array can have arbitrary content
32-
* depending on your needs.
29+
* @var array<string, bool> Key is the function name, value irrelevant.
3330
*/
3431
protected $target_functions = [
3532
'strip_tags' => true,

WordPressVIPMinimum/Sniffs/Hooks/RestrictedHooksSniff.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ class RestrictedHooksSniff extends AbstractFunctionParameterSniff {
2626
/**
2727
* Functions this sniff is looking for.
2828
*
29-
* @var array The only requirement for this array is that the top level
30-
* array keys are the names of the functions you're looking for.
31-
* Other than that, the array can have arbitrary content
32-
* depending on your needs.
29+
* @var array<string, bool> Key is the function name, value irrelevant.
3330
*/
3431
protected $target_functions = [
3532
'add_filter' => true,

WordPressVIPMinimum/Sniffs/Performance/LowExpiryCacheTimeSniff.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@ class LowExpiryCacheTimeSniff extends AbstractFunctionParameterSniff {
3030
/**
3131
* Functions this sniff is looking for.
3232
*
33-
* @var array The only requirement for this array is that the top level
34-
* array keys are the names of the functions you're looking for.
35-
* Other than that, the array can have arbitrary content
36-
* depending on your needs.
33+
* @var array<string, bool> Key is the function name, value irrelevant.
3734
*/
3835
protected $target_functions = [
3936
'wp_cache_set' => true,

WordPressVIPMinimum/Sniffs/Security/PHPFilterFunctionsSniff.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ class PHPFilterFunctionsSniff extends AbstractFunctionParameterSniff {
2626
/**
2727
* Functions this sniff is looking for.
2828
*
29-
* @var array The only requirement for this array is that the top level
30-
* array keys are the names of the functions you're looking for.
31-
* Other than that, the array can have arbitrary content
32-
* depending on your needs.
29+
* @var array<string, bool> Key is the function name, value irrelevant.
3330
*/
3431
protected $target_functions = [
3532
'filter_var' => true,

WordPressVIPMinimum/Sniffs/UserExperience/AdminBarRemovalSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class AdminBarRemovalSniff extends AbstractFunctionParameterSniff {
4848
/**
4949
* Functions this sniff is looking for.
5050
*
51-
* @var array
51+
* @var array<string, bool> Key is the function name, value irrelevant.
5252
*/
5353
protected $target_functions = [
5454
'show_admin_bar' => true,

0 commit comments

Comments
 (0)