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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user