| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 35 | public function getSubmissionStats($from) |
||
| 36 | { |
||
| 37 | $this->repository->clearCriteria(); |
||
| 38 | |||
| 39 | $rawSql = 'DATE_FORMAT(created_at,\'%Y-%m-%d\') as date, count(*) as number'; |
||
| 40 | $this->repository->pushCriteria(new RawSelect($rawSql)); |
||
| 41 | $this->repository->pushCriteria(new Where('created_at', $from->format('Y-m-d h:i:s'), '>')); |
||
| 42 | $this->repository->pushCriteria(new GroupBy('date')); |
||
| 43 | $this->repository->pushCriteria(new OrderBy('date', 'desc')); |
||
| 44 | |||
| 45 | return $this->repository->all(); |
||
| 46 | } |
||
| 48 |