| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | 6 | public function getRequestsSince(\DateTime $date = null) |
|
| 46 | { |
||
| 47 | 6 | $start = $date ? $date->getTimestamp() : '-inf'; |
|
| 48 | 6 | $end = time(); |
|
| 49 | |||
| 50 | 6 | return array_map( |
|
| 51 | 6 | function ($hash) { |
|
| 52 | 4 | list($timestamp, $url) = explode('#', $hash, 2); |
|
| 53 | |||
| 54 | 4 | return [intval($timestamp), $url]; |
|
| 55 | 6 | }, |
|
| 56 | 6 | $this->redis->zRangeByScore($this->key, $start, $end) |
|
| 57 | ); |
||
| 58 | } |
||
| 59 | |||
| 71 |