Skip to content

Commit 17e801e

Browse files
committed
NamingConventions/PrefixAllGlobals: modify test to include class constant type
This commit modifies one of the existing class constants in the code used in the `WordPress.NamingConventions.PrefixAllGlobal` tests to have a type. This is just to ensure that there is a test for typed class constants added in PHP 8.3 as this sniff listens to the `T_CONST` token. The sniff was already handling typed class constants correctly and no change to the sniff code is needed.
1 parent 00e9af7 commit 17e801e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WordPress/Tests/NamingConventions/PrefixAllGlobalsUnitTest.1.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ apply_filters( $_REQUEST['else'] ); // Warning.
276276

277277
class Acronym_Dynamic_Hooks {
278278
const FILTER = 'acronym';
279-
const FILTER_WITH_UNDERSCORE = 'acronym_';
279+
const ?string FILTER_WITH_UNDERSCORE = 'acronym_';
280280

281281
protected $filter = 'acronym';
282282
protected $filter_with_underscore = 'acronym_';

0 commit comments

Comments
 (0)