mirror of
https://github.com/WordPress/WordPress-Coding-Standards.git
synced 2025-08-30 03:11:24 +08:00
NamingConventions/PrefixAllGlobals: modify a test to use readonly anonymous classes
This commit modifies an existing test to use readonly anonymous classes to the `WordPress.NamingConventions.PrefixAllGlobals` tests. This is just to ensure that the part of the sniff code that checks for `T_ANON_CLASS` tokens works correctly with readonly anonymous class added in PHP 8.3. The sniff was already handling readonly anonymous classes correctly, and no change to the sniff code is needed.
This commit is contained in:
parent
0620684fe4
commit
d541631e93
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ class Acronym_Example {
|
|||
function do_something( $param = 'default' ) {}
|
||||
}
|
||||
|
||||
$acronym_class = new class {
|
||||
$acronym_class = new readonly class {
|
||||
const SOME_CONSTANT = 'value';
|
||||
|
||||
public $var = 'abc';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue