Completed
Pull Request — master (#200)
by Loïc
02:06
created

DashboardController::__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 monofony.
5
 *
6
 * (c) Mobizel
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
declare(strict_types=1);
13
14
namespace App\Controller;
15
16
use App\Dashboard\DashboardStatisticsProvider;
17
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
18
use Symfony\Component\HttpFoundation\Response;
19
20
class DashboardController extends AbstractController
21
{
22
    /** @var DashboardStatisticsProvider */
23
    private $statisticsProvider;
24
25
    public function __construct(DashboardStatisticsProvider $statisticsProvider)
26
    {
27
        $this->statisticsProvider = $statisticsProvider;
28
    }
29
30
    public function indexAction(): Response
31
    {
32
        $statistics = $this->statisticsProvider->getStatistics();
33
34
        return $this->render('backend/index.html.twig', ['statistics' => $statistics]);
35
    }
36
}
37