@@ -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 ;
@@ -2800,7 +2788,7 @@ public function getDeclaration(array $allConstInfos): string
2800
2788
$ code .= "#if {$ this ->cond }\n" ;
2801
2789
}
2802
2790
2803
- if ($ this ->name -> isClassConst () ) {
2791
+ if ($ this ->name instanceof ClassConstName ) {
2804
2792
$ code .= $ this ->getClassConstDeclaration ($ value , $ allConstInfos );
2805
2793
} else {
2806
2794
$ code .= $ this ->getGlobalConstDeclaration ($ value );
@@ -6276,7 +6264,7 @@ function(?ArgInfo $aliasArg, ?ArgInfo $aliasedArg) use ($aliasFunc, $aliasedFunc
6276
6264
6277
6265
if ($ verifyManual ) {
6278
6266
foreach ($ undocumentedConstMap as $ constName => $ info ) {
6279
- if ($ info ->name -> isClassConst () || $ info ->isUndocumentable ) {
6267
+ if ($ info ->name instanceof ClassConstName || $ info ->isUndocumentable ) {
6280
6268
continue ;
6281
6269
}
6282
6270
0 commit comments