Game::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
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 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\DwhBundle\Repository\GameRepository;
9
use VideoGamesRecords\CoreBundle\Traits as VgrCoreTraits;
10
use VideoGamesRecords\DwhBundle\Traits\Entity\DateTrait;
11
use VideoGamesRecords\DwhBundle\Traits\Entity\NbPostDay;
12
13
#[ORM\Table(name:'dwh_game')]
14
#[ORM\Entity(repositoryClass: GameRepository::class)]
15
class Game
16
{
17
    use DateTrait;
18
    use NbPostDay;
19
    use VgrCoreTraits\Entity\NbPostTrait;
20
21
    #[ORM\Id, ORM\Column]
22
    private ?int $id;
23
24
    public function __toString()
25
    {
26
        return sprintf('%s [%s]', $this->id, $this->id);
27
    }
28
29
    public function setId(int $id): void
30
    {
31
        $this->id = $id;
32
    }
33
34
    public function getId(): ?int
35
    {
36
        return $this->id;
37
    }
38
39
    public function setFromArray(array $row): void
40
    {
41
        foreach ($row as $key => $value) {
42
            $this->$key = $value;
43
        }
44
    }
45
}
46