diff --git a/src/ArrayDefinition.php b/src/ArrayDefinition.php index 0aa2f74..c4b7903 100644 --- a/src/ArrayDefinition.php +++ b/src/ArrayDefinition.php @@ -60,20 +60,16 @@ public function withReferenceContainer(?ContainerInterface $referenceContainer): } /** - * Create ArrayDefinition from array config. + * Create `ArrayDefinition` from array config. * * @psalm-param ArrayDefinitionConfig $config */ public static function fromConfig(array $config): self { - /** - * @psalm-suppress MixedArgument - */ return new self( $config[self::CLASS_NAME], $config[self::CONSTRUCTOR] ?? [], - // Already normalized config. Ignore all the rest parameters - $config['methodsAndProperties'] ?? self::getMethodsAndPropertiesFromConfig($config), + self::getMethodsAndPropertiesFromConfig($config), ); } diff --git a/src/LazyDefinition.php b/src/LazyDefinition.php index aa9142d..4830728 100644 --- a/src/LazyDefinition.php +++ b/src/LazyDefinition.php @@ -25,19 +25,12 @@ public function resolve(ContainerInterface $container): VirtualProxyInterface { /** @var LazyLoadingValueHolderFactory $factory */ $factory = $container->get(LazyLoadingValueHolderFactory::class); - /** - * @var mixed $definition - */ $definition = $this->definition; - $class = $this->class; return $factory->createProxy( - $class, - static function (mixed &$wrappedObject) use ($container, $class, $definition) { - $definition = Normalizer::normalize($definition, $class); - /** - * @var mixed $wrappedObject - */ + $this->class, + static function (mixed &$wrappedObject) use ($container, $definition) { + $definition = Normalizer::normalize($definition); $wrappedObject = $definition->resolve($container); return true; }