Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4.8437 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | 15 | protected function argumentWithoutType(ReflectionParameter $reflector) |
|
23 | { |
||
24 | 15 | if (false === $reflector->isOptional()) { |
|
25 | 6 | throw ContainerException::findType($reflector->getName()); |
|
26 | } |
||
27 | |||
28 | 9 | if ($reflector->isDefaultValueAvailable()) { |
|
29 | 9 | return $reflector->getDefaultValue(); |
|
30 | } |
||
31 | |||
32 | if (true === $reflector->allowsNull()) { |
||
33 | return null; |
||
34 | } |
||
35 | |||
36 | throw ContainerException::findType($reflector->getName()); |
||
37 | } |
||
63 |