| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | 6 | private function buildOptional(): string |
|
| 51 | { |
||
| 52 | 6 | if ($this->definition->hasDefault()) { |
|
| 53 | 3 | return ''; |
|
| 54 | } |
||
| 55 | |||
| 56 | 5 | if (!$this->definition->optional()) { |
|
| 57 | 4 | return sprintf( |
|
| 58 | 4 | 'throw new %s(\'Missing argument "%s"\');', |
|
| 59 | 4 | LogicException::class, |
|
| 60 | 4 | $this->definition->name() |
|
| 61 | ); |
||
| 62 | } |
||
| 63 | |||
| 64 | 3 | return 'return null;'; |
|
| 65 | } |
||
| 67 |