@@ -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 ;
@@ -2810,7 +2798,7 @@ public function getDeclaration(array $allConstInfos): string
28102798
28112799 // Condition will be added by generateCodeWithConditions()
28122800
2813- if ($ this ->name -> isClassConst () ) {
2801+ if ($ this ->name instanceof ClassConstName ) {
28142802 $ code = $ this ->getClassConstDeclaration ($ value , $ allConstInfos );
28152803 } else {
28162804 $ code = $ this ->getGlobalConstDeclaration ($ value );
@@ -6388,7 +6376,7 @@ function(?ArgInfo $aliasArg, ?ArgInfo $aliasedArg) use ($aliasFunc, $aliasedFunc
63886376
63896377if ($ verifyManual ) {
63906378 foreach ($ undocumentedConstMap as $ constName => $ info ) {
6391- if ($ info ->name -> isClassConst () || $ info ->isUndocumentable ) {
6379+ if ($ info ->name instanceof ClassConstName || $ info ->isUndocumentable ) {
63926380 continue ;
63936381 }
63946382
0 commit comments