1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

gen_stub: replace FunctionOrMethodName::isMethod() with instanceof

This commit is contained in:
Daniel Scherzer
2025-05-15 13:35:50 -04:00
parent 49f1685cde
commit 0b01640b58

View File

@@ -955,7 +955,6 @@ interface FunctionOrMethodName {
public function getMethodSynopsisFilename(): string;
public function getNameForAttributes(): string;
public function __toString(): string;
public function isMethod(): bool;
public function isConstructor(): bool;
public function isDestructor(): bool;
}
@@ -1018,10 +1017,6 @@ class FunctionName implements FunctionOrMethodName {
return $this->name->toString();
}
public function isMethod(): bool {
return false;
}
public function isConstructor(): bool {
return false;
}
@@ -1067,10 +1062,6 @@ class MethodName implements FunctionOrMethodName {
return "$this->className::$this->methodName";
}
public function isMethod(): bool {
return true;
}
public function isConstructor(): bool {
return $this->methodName === "__construct";
}
@@ -1385,7 +1376,7 @@ class FuncInfo {
public function isMethod(): bool
{
return $this->name->isMethod();
return $this->name instanceof MethodName;
}
public function isFinalMethod(): bool