| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 1.0109 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 3 | public function resolve(ContainerInterface $container): mixed |
|
| 27 | { |
||
| 28 | /** @var LazyLoadingValueHolderFactory $factory */ |
||
| 29 | 3 | $factory = $container->get(LazyLoadingValueHolderFactory::class); |
|
| 30 | /** |
||
| 31 | * @var mixed $definition |
||
| 32 | */ |
||
| 33 | 3 | $definition = $this->definition; |
|
| 34 | 3 | $objectClass = $this->objectClass; |
|
| 35 | |||
| 36 | /** @psalm-suppress InvalidArgument */ |
||
| 37 | 3 | return $factory->createProxy( |
|
| 38 | 3 | $objectClass, |
|
| 39 | 3 | function (mixed &$wrappedObject) use ($container, $objectClass, $definition) { |
|
| 40 | $definition = Normalizer::normalize($definition, $objectClass); |
||
| 41 | /** |
||
| 42 | * @var mixed $wrappedObject |
||
| 43 | */ |
||
| 44 | $wrappedObject = $definition->resolve($container); |
||
| 45 | 3 | } |
|
| 49 |