| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | 46 | public function resolve(DependencyResolverInterface $container) |
|
| 37 | { |
||
| 38 | 46 | if ($this->parameter->isDefaultValueAvailable()) { |
|
| 39 | 42 | return $this->parameter->getDefaultValue(); |
|
| 40 | } |
||
| 41 | |||
| 42 | 4 | if ($this->parameter->allowsNull()) { |
|
| 43 | 2 | return null; |
|
| 44 | } |
||
| 45 | |||
| 46 | 2 | if ($this->isOptional()) { |
|
| 47 | 1 | throw new NotDetermineDefaultValueOfPhpInternalException($this->parameter); |
|
| 48 | } |
||
| 49 | |||
| 50 | 1 | throw new NotInstantiableException('Parameter definition does not contain a value.'); |
|
| 51 | } |
||
| 53 |