| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | { |
||
| 14 | $instance = clone $this; |
||
| 15 | $instance->setStopSign($stopSign); |
||
| 16 | return $instance; |
||
| 17 | } |
||
| 18 | |||
| 19 | protected function setStopSign(int $stopSign): void |
||
| 20 | { |
||
| 21 | if (! in_array($stopSign, StopSign::allowed())) { |
||
| 22 | throw new InvalidArgumentException(sprintf('Invalid stop sign (%s)', $stopSign)); |
||
| 33 |