method = $method; } /** * @template TArgs * @template TMixed * * @param string $method * @param array $args * * @return TMixed */ public function __call($method, $args) { /** @var TMixed */ return $this->method->{$method}(...$args); } /** * @return list */ public function getParameters() { return array_map(static function (ReflectionParameter $parameter) { return new Parameter($parameter); }, $this->method->getParameters()); } /** * @return null|string */ public function getReturnType() { return Reflector::getReturnType($this->method); } }