Passed
Branch develop (e4e9af)
by BENARD
05:38
created

PlayerChartStatsController::playerChartStatus()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace VideoGamesRecords\CoreBundle\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
6
use Symfony\Component\HttpFoundation\Request;
7
use VideoGamesRecords\CoreBundle\Entity\Player;
8
use VideoGamesRecords\CoreBundle\Repository\PlayerChartStatusRepository;
9
use VideoGamesRecords\CoreBundle\Repository\PlayerRepository;
10
11
/**
12
 * Class PlayerController
13
 */
14
class PlayerChartStatsController extends AbstractController
15
{
16
    private PlayerChartStatusRepository $playerChartStatusRepository;
17
18
    public function __construct(PlayerChartStatusRepository $playerChartStatusRepository)
19
    {
20
        $this->playerChartStatusRepository = $playerChartStatusRepository;
21
    }
22
23
    /**
24
     * @param Player    $player
25
     * @return mixed
26
     */
27
    public function playerChartStatus(Player $player): mixed
28
    {
29
        return $this->playerChartStatusRepository->getStatsFromPlayer($player);
30
    }
31
}
32