Conditions | 6 |
Paths | 4 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 6 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | 16 | public function resolve(\ReflectionParameter $parameter, array $providedParameters) |
|
33 | { |
||
34 | |||
35 | 16 | if ($parameter->isOptional() || $parameter->isDefaultValueAvailable() || $parameter->allowsNull()) { |
|
36 | try { |
||
37 | 13 | $default = $parameter->getDefaultValue(); |
|
38 | |||
39 | 9 | return null !== $default ? $default : __CLASS__; |
|
40 | 10 | } catch (\ReflectionException $e) { |
|
41 | // Can't get default values from PHP internal classes and functions |
||
46 |