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

StatisticsController::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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