Conditions | 4 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public static function normalize($definition, string $id = null): DefinitionInterface |
||
24 | { |
||
25 | if (is_array($definition) && isset($definition[DefinitionParser::IS_PREPARED_ARRAY_DEFINITION_DATA])) { |
||
26 | [$class, $constructorArguments, $methodsAndProperties] = $definition; |
||
27 | |||
28 | $class = $class ?? $id; |
||
29 | if ($class === null) { |
||
30 | throw new InvalidConfigException('Invalid definition: don\'t set class name.'); |
||
31 | } |
||
32 | |||
33 | return ArrayDefinition::fromPreparedData($class, $constructorArguments, $methodsAndProperties); |
||
|
|||
34 | } |
||
35 | |||
36 | return Normalizer::normalize($definition, $id); |
||
37 | } |
||
39 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.