| Conditions | 4 |
| Paths | 5 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function check($value): bool |
||
| 34 | { |
||
| 35 | 2 | $this->requireParameters($this->fillableParams); |
|
| 36 | 2 | $time = $this->parameter('time'); |
|
| 37 | |||
| 38 | if (! $this->isValidDate($value)) { |
||
| 39 | 2 | throw $this->throwException($value); |
|
| 40 | } |
||
| 41 | |||
| 42 | if (! $this->isValidDate($time)) { |
||
| 43 | 2 | $time = $this->getAttribute()->getValue($time); |
|
| 44 | } |
||
| 45 | |||
| 46 | if (! $this->isValidDate($time)) { |
||
| 47 | 2 | throw $this->throwException($time); |
|
| 48 | } |
||
| 49 | |||
| 50 | 2 | return $this->getTimeStamp($time) > $this->getTimeStamp($value); |
|
| 51 | } |
||
| 53 |