@@ -861,19 +861,15 @@ public function __toString(): string;
861861 public function getDeclarationName (): string ;
862862}
863863
864- interface ConstOrClassConstName extends VariableLikeName {
865- public function equals (ConstOrClassConstName $ const ): bool ;
866- public function isClassConst (): bool ;
867- public function isUnknown (): bool ;
868- }
869-
870- abstract class AbstractConstName implements ConstOrClassConstName
864+ abstract class AbstractConstName implements VariableLikeName
871865{
872- public function equals (ConstOrClassConstName $ const ): bool
866+ public function equals (AbstractConstName $ const ): bool
873867 {
874868 return $ this ->__toString () === $ const ->__toString ();
875869 }
876870
871+ abstract public function isClassConst (): bool ;
872+
877873 public function isUnknown (): bool
878874 {
879875 return strtolower ($ this ->__toString ()) === "unknown " ;
@@ -2468,7 +2464,7 @@ protected function addFlagForVersionsAbove(array $flags, string $flag, int $mini
24682464
24692465class ConstInfo extends VariableLike
24702466{
2471- public /* readonly */ ConstOrClassConstName $name;
2467+ public /* readonly */ AbstractConstName $name;
24722468 public /* readonly */ Expr $value;
24732469 public bool $isDeprecated;
24742470 public ?string $valueString;
@@ -2481,7 +2477,7 @@ class ConstInfo extends VariableLike
24812477 * @var AttributeInfo[] $attributes
24822478 */
24832479 public function __construct(
2484- ConstOrClassConstName $name,
2480+ AbstractConstName $name,
24852481 int $flags,
24862482 Expr $value,
24872483 ?string $valueString,
@@ -4455,7 +4451,7 @@ function parseFunctionLike(
44554451 */
44564452function parseConstLike(
44574453 PrettyPrinterAbstract $prettyPrinter,
4458- ConstOrClassConstName $name,
4454+ AbstractConstName $name,
44594455 Node\Const_ $const,
44604456 int $flags,
44614457 ?Node $type,
0 commit comments