diff --git a/build/gen_stub.php b/build/gen_stub.php index 87a2ea76f24..263151a2dff 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -898,8 +898,6 @@ interface VariableLikeName { abstract class AbstractConstName implements VariableLikeName { - abstract public function isClassConst(): bool; - public function isUnknown(): bool { return strtolower($this->__toString()) === "unknown"; @@ -917,11 +915,6 @@ class ConstName extends AbstractConstName { $this->const = $const; } - public function isClassConst(): bool - { - return false; - } - public function isUnknown(): bool { $name = $this->__toString(); @@ -952,11 +945,6 @@ class ClassConstName extends AbstractConstName { $this->const = $const; } - public function isClassConst(): bool - { - return true; - } - public function __toString(): string { return $this->class->toString() . "::" . $this->const; @@ -2810,7 +2798,7 @@ class ConstInfo extends VariableLike // Condition will be added by generateCodeWithConditions() - if ($this->name->isClassConst()) { + if ($this->name instanceof ClassConstName) { $code = $this->getClassConstDeclaration($value, $allConstInfos); } else { $code = $this->getGlobalConstDeclaration($value); @@ -6388,7 +6376,7 @@ if ($generateOptimizerInfo) { if ($verifyManual) { foreach ($undocumentedConstMap as $constName => $info) { - if ($info->name->isClassConst() || $info->isUndocumentable) { + if ($info->name instanceof ClassConstName || $info->isUndocumentable) { continue; }