Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
30 | public function query($params) |
||
31 | { |
||
32 | $query = parent::query($params); |
||
33 | $query->selectField($this->periodfield, "FilterPeriod") |
||
34 | ->addSelect("SearchLog.Query") |
||
35 | ->selectField("Count(SearchLog.ID)", "Quantity") |
||
36 | ->selectField("Max(SearchLog.Created)", "MostRecent") |
||
37 | ->selectField("Max(SearchLog.NumResults)", "NumResults"); |
||
38 | $query->addGroupby("SearchLog.Query"); |
||
39 | $query->addWhere("\"SearchLog\".\"Filters\" is null AND \"SearchLog\".\"ParentSearchID\" = '0'"); |
||
40 | $query->setOrderBy("Quantity", "DESC"); |
||
41 | return $query; |
||
42 | } |
||
43 | } |
||
44 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.