diff --git a/src/AbstractFactory/ReflectionBasedAbstractFactory.php b/src/AbstractFactory/ReflectionBasedAbstractFactory.php index 254b8ebc..27f078e5 100644 --- a/src/AbstractFactory/ReflectionBasedAbstractFactory.php +++ b/src/AbstractFactory/ReflectionBasedAbstractFactory.php @@ -85,7 +85,7 @@ public function __construct( /** * {@inheritDoc} */ - public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null) + public function __invoke(ContainerInterface $container, $requestedName, ?array $options = null): object { if (! class_exists($requestedName)) { throw new InvalidArgumentException(sprintf('%s can only be used with class names.', self::class)); @@ -101,7 +101,7 @@ public function __invoke(ContainerInterface $container, $requestedName, ?array $ } /** {@inheritDoc} */ - public function canCreate(ContainerInterface $container, $requestedName) + public function canCreate(ContainerInterface $container, $requestedName): bool { return class_exists($requestedName) && $this->canCallConstructor($requestedName); }