PostController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 15
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A showAction() 0 6 1
1
<?php
2
3
namespace Skobkin\Bundle\PointToolsBundle\Controller;
4
5
use Skobkin\Bundle\PointToolsBundle\Entity\Blogs\Post;
6
use Skobkin\Bundle\PointToolsBundle\Repository\Blogs\PostRepository;
7
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
8
use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter;
9
use Symfony\Component\HttpFoundation\Response;
10
11
class PostController extends AbstractController
12
{
13
    /**
14
     * @ParamConverter("post", class="SkobkinPointToolsBundle:Blogs\Post")
15
     *
16
     * @return Response
17 1
     */
18
    public function showAction(Post $post, PostRepository $postRepository): Response
19 1
    {
20 1
        return $this->render('SkobkinPointToolsBundle:Post:show.html.twig', [
21
            'post' => $postRepository->getPostWithComments($post->getId()),
22
        ]);
23
    }
24
25
}
26