@@ -898,8 +898,6 @@ public function getDeclarationName(): string;
898898
899899abstract class AbstractConstName implements VariableLikeName
900900{
901- abstract public function isClassConst (): bool ;
902-
903901 public function isUnknown (): bool
904902 {
905903 return strtolower ($ this ->__toString ()) === "unknown " ;
@@ -917,11 +915,6 @@ public function __construct(?Name $namespace, string $const)
917915 $ this ->const = $ const ;
918916 }
919917
920- public function isClassConst (): bool
921- {
922- return false ;
923- }
924-
925918 public function isUnknown (): bool
926919 {
927920 $ name = $ this ->__toString ();
@@ -952,11 +945,6 @@ public function __construct(Name $class, string $const)
952945 $ this ->const = $ const ;
953946 }
954947
955- public function isClassConst (): bool
956- {
957- return true ;
958- }
959-
960948 public function __toString (): string
961949 {
962950 return $ this ->class ->toString () . ":: " . $ this ->const ;
@@ -2800,7 +2788,7 @@ public function getDeclaration(array $allConstInfos): string
28002788 $ code .= "#if {$ this ->cond }\n" ;
28012789 }
28022790
2803- if ($ this ->name -> isClassConst () ) {
2791+ if ($ this ->name instanceof ClassConstName ) {
28042792 $ code .= $ this ->getClassConstDeclaration ($ value , $ allConstInfos );
28052793 } else {
28062794 $ code .= $ this ->getGlobalConstDeclaration ($ value );
@@ -6276,7 +6264,7 @@ function(?ArgInfo $aliasArg, ?ArgInfo $aliasedArg) use ($aliasFunc, $aliasedFunc
62766264
62776265if ($ verifyManual ) {
62786266 foreach ($ undocumentedConstMap as $ constName => $ info ) {
6279- if ($ info ->name -> isClassConst () || $ info ->isUndocumentable ) {
6267+ if ($ info ->name instanceof ClassConstName || $ info ->isUndocumentable ) {
62806268 continue ;
62816269 }
62826270
0 commit comments