@@ -898,8 +898,6 @@ public function getDeclarationName(): string;
898
898
899
899
abstract class AbstractConstName implements VariableLikeName
900
900
{
901
- abstract public function isClassConst (): bool ;
902
-
903
901
public function isUnknown (): bool
904
902
{
905
903
return strtolower ($ this ->__toString ()) === "unknown " ;
@@ -917,11 +915,6 @@ public function __construct(?Name $namespace, string $const)
917
915
$ this ->const = $ const ;
918
916
}
919
917
920
- public function isClassConst (): bool
921
- {
922
- return false ;
923
- }
924
-
925
918
public function isUnknown (): bool
926
919
{
927
920
$ name = $ this ->__toString ();
@@ -952,11 +945,6 @@ public function __construct(Name $class, string $const)
952
945
$ this ->const = $ const ;
953
946
}
954
947
955
- public function isClassConst (): bool
956
- {
957
- return true ;
958
- }
959
-
960
948
public function __toString (): string
961
949
{
962
950
return $ this ->class ->toString () . ":: " . $ this ->const ;
@@ -2810,7 +2798,7 @@ public function getDeclaration(array $allConstInfos): string
2810
2798
2811
2799
// Condition will be added by generateCodeWithConditions()
2812
2800
2813
- if ($ this ->name -> isClassConst () ) {
2801
+ if ($ this ->name instanceof ClassConstName ) {
2814
2802
$ code = $ this ->getClassConstDeclaration ($ value , $ allConstInfos );
2815
2803
} else {
2816
2804
$ code = $ this ->getGlobalConstDeclaration ($ value );
@@ -6388,7 +6376,7 @@ function(?ArgInfo $aliasArg, ?ArgInfo $aliasedArg) use ($aliasFunc, $aliasedFunc
6388
6376
6389
6377
if ($ verifyManual ) {
6390
6378
foreach ($ undocumentedConstMap as $ constName => $ info ) {
6391
- if ($ info ->name -> isClassConst () || $ info ->isUndocumentable ) {
6379
+ if ($ info ->name instanceof ClassConstName || $ info ->isUndocumentable ) {
6392
6380
continue ;
6393
6381
}
6394
6382
0 commit comments