diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 22164e32..93ad38ad 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -19,40 +19,27 @@ $requestedName + $requestedName - + new $requestedName() new $requestedName() new $requestedName(...$parameters) - + function (ReflectionParameter $parameter) use ($container, $requestedName) { - - $requestedName - - - $requestedName - $requestedName - $requestedName - new $requestedName() new $requestedName() new $requestedName(...$parameters) - - DispatchableInterface - $type is_string($type) - - DispatchableInterface - @@ -350,16 +337,6 @@ - - assertInstanceOf - assertInstanceOf - assertInstanceOf - assertInstanceOf - assertInstanceOf - assertInstanceOf - assertInstanceOf - assertInstanceOf - array diff --git a/src/AbstractFactory/ReflectionBasedAbstractFactory.php b/src/AbstractFactory/ReflectionBasedAbstractFactory.php index 4f4654bd..cfb90b05 100644 --- a/src/AbstractFactory/ReflectionBasedAbstractFactory.php +++ b/src/AbstractFactory/ReflectionBasedAbstractFactory.php @@ -106,7 +106,9 @@ public function __construct(array $aliases = []) /** * {@inheritDoc} * - * @return DispatchableInterface + * @param class-string|string $requestedName + * @return ($requestedName is class-string ? T : object) + * @template T of object */ public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) {