public function getMethod(string $methodName) : MethodReflection
{
if (!isset($this->methods[$methodName])) {
foreach ($this->methodsClassReflectionExtensions as $extension) {
if ($extension->hasMethod($this, $methodName)) {
return $this->methods[$methodName] = $extension->getMethod($this, $methodName);
}
}
}
if (!isset($this->methods[$methodName])) {
throw new \PHPStan\Reflection\MissingMethodFromReflectionException($this->getName(), $methodName);
}
return $this->methods[$methodName];
}