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:
Rodrigo Primo 2025-07-16 10:11:12 -03:00
parent 0620684fe4
commit d541631e93

View file

@ -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';