FrontController::homepageAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 3
dl 0
loc 6
ccs 5
cts 5
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace App\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6
7
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
8
9
use App\Manager\Community\CommunityManager;
10
use App\Manager\MemberManager;
11
use App\Manager\Project\ProjectManager;
12
13
class FrontController extends Controller
14
{
15
    /**
16
     * @Route("/", name="homepage", methods={"GET"})
17
     */
18 1
    public function homepageAction(CommunityManager $communityManager, MemberManager $memberManager, ProjectManager $projectManager)
19
    {
20 1
        return $this->render('front/homepage.html.twig', [
21 1
            'nb_camps' => $communityManager->countAll(),
22 1
            'nb_members' => $memberManager->countAll(),
23 1
            'nb_projects' => $projectManager->countAll(),
24
        ]);
25
    }
26
}
27