Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function index(Request $request, ORMInterface $orm): Response |
||
15 | { |
||
16 | $postRepo = $orm->getRepository(Post::class); |
||
17 | $slug = $request->getAttribute('slug', null); |
||
18 | |||
19 | $item = $postRepo->fullPostPage($slug); |
||
|
|||
20 | if ($item === null) { |
||
21 | return $this->responseFactory->createResponse(404); |
||
22 | } |
||
23 | |||
24 | return $this->render('index', ['item' => $item]); |
||
25 | } |
||
27 |