Team::getId()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VideoGamesRecords\DwhBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use VideoGamesRecords\CoreBundle\Traits as VgrCoreTraits;
9
use VideoGamesRecords\DwhBundle\Repository\TeamRepository;
10
use VideoGamesRecords\DwhBundle\Traits\Entity\DateTrait;
11
use VideoGamesRecords\DwhBundle\Traits\Entity\NbPostDay;
12
13
#[ORM\Table(name:'dwh_team')]
14
#[ORM\Entity(repositoryClass: TeamRepository::class)]
15
class Team
16
{
17
    use DateTrait;
18
    use NbPostDay;
19
    use VgrCoreTraits\Entity\ChartRank0Trait;
20
    use VgrCoreTraits\Entity\ChartRank1Trait;
21
    use VgrCoreTraits\Entity\ChartRank2Trait;
22
    use VgrCoreTraits\Entity\ChartRank3Trait;
23
    use VgrCoreTraits\Entity\PointChartTrait;
24
    use VgrCoreTraits\Entity\RankPointChartTrait;
25
    use VgrCoreTraits\Entity\RankMedalTrait;
26
    use VgrCoreTraits\Entity\RankPointBadgeTrait;
27
    use VgrCoreTraits\Entity\PointBadgeTrait;
28
    use VgrCoreTraits\Entity\NbMasterBadgeTrait;
29
    use VgrCoreTraits\Entity\PointGameTrait;
30
    use VgrCoreTraits\Entity\RankPointGameTrait;
31
32
    #[ORM\Id, ORM\Column]
33
    private ?int $id;
34
35
    public function __toString()
36
    {
37
        return sprintf('%s [%s]', $this->id, $this->id);
38
    }
39
40
    public function setId(int $id): void
41
    {
42
        $this->id = $id;
43
    }
44
45
    public function getId(): ?int
46
    {
47
        return $this->id;
48
    }
49
50
    public function setFromArray(array $row): void
51
    {
52
        foreach ($row as $key => $value) {
53
            $this->$key = $value;
54
        }
55
    }
56
}
57