mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-22 11:09:11 -04:00
ALPHA 3.0.2a
This commit is contained in:
@@ -172,6 +172,7 @@ class ValidClassNamePassTest extends CodeCleanerTestCase
|
||||
['DateTime::$someMethod()'],
|
||||
['Psy\Test\CodeCleaner\Fixtures\ClassWithStatic::doStuff()'],
|
||||
['Psy\Test\CodeCleaner\Fixtures\ClassWithCallStatic::doStuff()'],
|
||||
['Psy\Test\CodeCleaner\Fixtures\TraitWithStatic::doStuff()'],
|
||||
|
||||
// Allow `self` and `static` as class names.
|
||||
['
|
||||
@@ -305,12 +306,12 @@ class ValidClassNamePassTest extends CodeCleanerTestCase
|
||||
];
|
||||
|
||||
// Ugh. There's gotta be a better way to test for this.
|
||||
if (class_exists('PhpParser\ParserFactory')) {
|
||||
if (\class_exists('PhpParser\ParserFactory')) {
|
||||
// PHP 7.0 anonymous classes, only supported by PHP Parser v2.x
|
||||
$valid[] = ['$obj = new class() {}'];
|
||||
}
|
||||
|
||||
if (version_compare(PHP_VERSION, '5.5', '>=')) {
|
||||
if (\version_compare(PHP_VERSION, '5.5', '>=')) {
|
||||
$valid[] = ['interface A {} A::class'];
|
||||
$valid[] = ['interface A {} A::CLASS'];
|
||||
$valid[] = ['class A {} A::class'];
|
||||
|
||||
Reference in New Issue
Block a user