Skip to content

Commit d17d268

Browse files
committed
PrefixAllGlobals: add "php" to the list of blacklisted prefixes
The `php` prefix is reserved for PHP itself. No unit tests added as the logic for this blacklist is already sufficiently unit tested. Fixes 1728
1 parent e22e842 commit d17d268

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class PrefixAllGlobalsSniff extends AbstractFunctionParameterSniff {
6565
'wordpress' => true,
6666
'wp' => true,
6767
'_' => true,
68+
'php' => true, // See #1728, the 'php' prefix is reserved by PHP itself.
6869
);
6970

7071
/**

0 commit comments

Comments
 (0)