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