| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 60 | 5 | protected function withModifier(array $matches, int $now) |
|
| 61 | { |
||
| 62 | 5 | $modifier = strtolower($matches[2]); |
|
| 63 | 5 | if (empty($this->timeModifier[$modifier])) { |
|
| 64 | 1 | throw new UserException(sprintf('Invalid time modifier %s', $modifier)); |
|
| 65 | } |
||
| 66 | |||
| 67 | 4 | return $now + $matches[1] * $this->timeModifier[$modifier]; |
|
| 68 | } |
||
| 69 | } |
||
| 70 |