| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function listAction(Request $request, NewsCategory $category = null) |
||
|
|
|||
| 13 | { |
||
| 14 | $qb = $this->getQueryBuilder(); |
||
| 15 | |||
| 16 | $currentPage = $this->getCurrentPage(); |
||
| 17 | |||
| 18 | $news = $qb->sortBy('created')->reverse() |
||
| 19 | ->where('category')->is($category) |
||
| 20 | ->limit(5)->fromPage($currentPage) |
||
| 21 | ->getModels(); |
||
| 22 | |||
| 23 | return array( |
||
| 24 | "news" => $news, |
||
| 25 | "categories" => $this->getCategories(), |
||
| 26 | "category" => $category, |
||
| 27 | "currentPage" => $currentPage, |
||
| 28 | "totalPages" => $qb->countPages() |
||
| 29 | ); |
||
| 30 | } |
||
| 31 | |||
| 54 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.