Passed
Push — develop ( d93fae...fdcb02 )
by BENARD
04:10
created

PlayerChartEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 10
c 1
b 0
f 0
dl 0
loc 26
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getPlayerChart() 0 3 1
A getOldRank() 0 3 1
A getOldNbEqual() 0 3 1
1
<?php
2
3
namespace VideoGamesRecords\CoreBundle\Event;
4
5
use Symfony\Contracts\EventDispatcher\Event;
6
use VideoGamesRecords\CoreBundle\Entity\PlayerChart;
7
8
class PlayerChartEvent extends Event
9
{
10
    protected PlayerChart $playerChart;
11
    protected ?int $oldRank;
12
    protected int $oldNbEqual;
13
14
    public function __construct(PlayerChart $playerChart, ?int $oldRank, int $oldNbEqual)
15
    {
16
        $this->playerChart = $playerChart;
17
        $this->oldRank = $oldRank;
18
        $this->oldNbEqual = $oldNbEqual;
19
    }
20
21
    public function getPlayerChart(): PlayerChart
22
    {
23
        return $this->playerChart;
24
    }
25
26
    public function getOldRank(): ?int
27
    {
28
        return $this->oldRank;
29
    }
30
31
    public function getOldNbEqual(): int
32
    {
33
        return $this->oldNbEqual;
34
    }
35
}
36