| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function modify(AbstractQuery $query) |
||
| 30 | { |
||
| 31 | foreach ($query->getParameters() as $parameter) { |
||
| 32 | /* @var $parameter Parameter */ |
||
| 33 | if ($parameter->getValue() instanceof \DateTimeInterface) { |
||
| 34 | // round down so that the results do not include data that should not be there. |
||
| 35 | $date = clone $parameter->getValue(); |
||
| 36 | $date = $date->setTimestamp(floor($date->getTimestamp() / $this->roundSeconds) * $this->roundSeconds); |
||
| 37 | |||
| 38 | $query->setParameter($parameter->getName(), $date, $parameter->getType()); |
||
| 39 | } |
||
| 40 | } |
||
| 41 | } |
||
| 42 | } |
||
| 43 |