Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | public function index(Request $request, PostRepository $postRepository): Response |
||
19 | { |
||
20 | $slug = $request->getAttribute('slug', null); |
||
21 | $item = $postRepository->fullPostPage($slug); |
||
22 | if ($item === null) { |
||
23 | return $this->responseFactory->createResponse(404); |
||
|
|||
24 | } |
||
25 | |||
26 | return $this->viewRenderer->render('index', ['item' => $item]); |
||
27 | } |
||
29 |