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

PlayerChartEvent::getOldRank()   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 0
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