| Conditions | 3 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function index(Request $request, CommentService $service): Response |
||
| 22 | { |
||
| 23 | $paginator = $service->getFeedPaginator(); |
||
| 24 | if ($request->getAttribute('next') !== null) { |
||
| 25 | $paginator = $paginator->withNextPageToken((string)$request->getAttribute('next')); |
||
| 26 | } |
||
| 27 | |||
| 28 | if ($this->isAjaxRequest($request)) { |
||
| 29 | return $this->viewRenderer->renderPartial('_comments', ['data' => $paginator]); |
||
| 30 | } |
||
| 31 | |||
| 32 | return $this->viewRenderer->render('index', ['data' => $paginator]); |
||
| 33 | } |
||
| 40 |