diff --git a/build/gen_stub.php b/build/gen_stub.php index 9b1545c0ea29..dc762f8d6cbc 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -1010,7 +1010,7 @@ public function __construct(Name $class, string $property) $this->property = $property; } - public function __toString() + public function __toString(): string { return $this->class->toString() . "::$" . $this->property; } @@ -2248,7 +2248,7 @@ static function (Expr $expr) use ($allConstInfos, &$isUnknownConstValue) { return null; } - throw new Exception("Constant " . $originatingConstName->__toString() . " cannot be found"); + throw new Exception("Constant " . $constName . " cannot be found"); } );