| Conditions | 4 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public static function normalize(mixed $definition, string $id): DefinitionInterface |
||
| 27 | { |
||
| 28 | if (is_array($definition) && isset($definition[DefinitionParser::IS_PREPARED_ARRAY_DEFINITION_DATA])) { |
||
| 29 | /** @psalm-suppress MixedArgument Definition should be valid {@see Container::$validate} */ |
||
| 30 | return ArrayDefinition::fromPreparedData( |
||
| 31 | $definition['class'] ?? $id, |
||
| 32 | $definition['__construct()'], |
||
| 33 | $definition['methodsAndProperties'] |
||
| 34 | ); |
||
| 35 | } |
||
| 36 | |||
| 37 | if ($definition instanceof ExtensibleService) { |
||
| 38 | return $definition; |
||
| 39 | } |
||
| 40 | |||
| 41 | return Normalizer::normalize($definition, $id); |
||
| 42 | } |
||
| 44 |