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