Completed
Push — master ( f01359...71b632 )
by Loïc
54:40 queued 48:48
created

StatisticsController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 15
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A indexAction() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of jedisjeux project.
5
 *
6
 * (c) Loïc Frémont
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace App\Controller;
13
14
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
15
use Symfony\Component\HttpFoundation\Response;
16
17
class StatisticsController extends AbstractController
18
{
19
    /** @var StatisticsProvider */
20
    private $statisticProvider;
21
22
    public function __construct(StatisticsProvider $statisticProvider)
23
    {
24
        $this->statisticProvider = $statisticProvider;
25
    }
26
27
    public function indexAction(): Response
28
    {
29
        return $this->render('backend/index.html.twig', $this->statisticProvider->getStatistics());
30
    }
31
}
32