| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function index(Request $request, ORMInterface $orm): Response |
||
| 19 | { |
||
| 20 | $postRepo = $orm->getRepository(Post::class); |
||
| 21 | $slug = $request->getAttribute('slug', null); |
||
| 22 | |||
| 23 | $item = $postRepo->fullPostPage($slug); |
||
|
|
|||
| 24 | if ($item === null) { |
||
| 25 | return $this->responseFactory->createResponse(404); |
||
| 26 | } |
||
| 27 | |||
| 28 | $output = $this->render('index', ['item' => $item]); |
||
| 29 | |||
| 30 | $response = $this->responseFactory->createResponse(); |
||
| 31 | $response->getBody()->write($output); |
||
| 32 | return $response; |
||
| 33 | } |
||
| 35 |