| Total Complexity | 9 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Coverage | 94.12% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class DefinitionResolver |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Resolves dependencies by replacing them with the actual object instances. |
||
| 13 | * @param ContainerInterface $container |
||
| 14 | * @param DefinitionInterface[] $dependencies the dependencies |
||
| 15 | * @return array the resolved dependencies |
||
| 16 | */ |
||
| 17 | 37 | public static function resolveArray(ContainerInterface $container, array $dependencies): array |
|
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * This function resolves a definition recursively, checking for loops. |
||
| 29 | * @param ContainerInterface $container |
||
| 30 | * @param mixed $definition |
||
| 31 | * @return mixed |
||
| 32 | */ |
||
| 33 | 14 | public static function resolve(ContainerInterface $container, $definition) |
|
| 42 | } |
||
| 43 | |||
| 44 | 8 | public static function ensureResolvable($value) |
|
| 56 |