| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 33 | public function match(object|array $item, FilterInterface $filter, array $iterableFilterHandlers): bool |
|
| 24 | { |
||
| 25 | /** @var GreaterThan $filter */ |
||
| 26 | |||
| 27 | 33 | $itemValue = ArrayHelper::getValue($item, $filter->getField()); |
|
| 28 | 33 | $argumentValue = $filter->getValue(); |
|
| 29 | |||
| 30 | 33 | if (!$itemValue instanceof DateTimeInterface) { |
|
| 31 | 30 | return $itemValue > $argumentValue; |
|
| 32 | } |
||
| 33 | |||
| 34 | 3 | return $argumentValue instanceof DateTimeInterface |
|
| 35 | 3 | && $itemValue->getTimestamp() > $argumentValue->getTimestamp(); |
|
| 36 | } |
||
| 38 |