diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 22164e32..56dc5922 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 @@ -504,6 +481,7 @@ $second $shared + $shared $callback() diff --git a/src/AbstractFactory/ReflectionBasedAbstractFactory.php b/src/AbstractFactory/ReflectionBasedAbstractFactory.php index 4f4654bd..93783dc9 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 as object */ public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) {