hasReturnType()) { $returnType = FakeType::from($reflection->getReturnType()->getName()); // @phpstan-ignore-line } $parameters = array_map( static fn (ReflectionParameter $reflection) => FakeParameterDefinition::fromReflection($reflection), $reflection->getParameters() ); return new MethodDefinition( $reflection->name, 'Signature::' . $reflection->name, new Parameters(...$parameters), $reflection->isStatic(), $reflection->isPublic(), $returnType ); } }