Genre   A
last analyzed

Complexity

Total Complexity 14

Size/Duplication

Total Lines 92
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 31
c 1
b 0
f 0
dl 0
loc 92
rs 10
wmc 14

14 Methods

Rating   Name   Duplication   Size   Complexity  
A getUrl() 0 3 1
A setCreatedAt() 0 3 1
A getName() 0 3 1
A setUpdatedAt() 0 3 1
A __construct() 0 4 1
A setUrl() 0 3 1
A getId() 0 3 1
A __toString() 0 3 1
A setId() 0 3 1
A setName() 0 3 1
A getCreatedAt() 0 3 1
A setSlug() 0 3 1
A getSlug() 0 3 1
A getUpdatedAt() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VideoGamesRecords\IgdbBundle\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
9
#[ORM\Entity]
10
#[ORM\Table(name: 'igdb_genre')]
11
class Genre
12
{
13
    #[ORM\Id]
14
    #[ORM\Column(type: 'integer')]
15
    private int $id;
16
17
    #[ORM\Column(type: 'string', length: 255)]
18
    private string $name;
19
20
    #[ORM\Column(type: 'string', length: 255)]
21
    private string $slug;
22
23
    #[ORM\Column(type: 'text', nullable: true)]
24
    private ?string $url = null;
25
26
    #[ORM\Column(type: 'datetime_immutable')]
27
    private \DateTimeImmutable $createdAt;
28
29
    #[ORM\Column(type: 'datetime_immutable')]
30
    private \DateTimeImmutable $updatedAt;
31
32
    public function __construct()
33
    {
34
        $this->createdAt = new \DateTimeImmutable();
35
        $this->updatedAt = new \DateTimeImmutable();
36
    }
37
38
    public function getId(): int
39
    {
40
        return $this->id;
41
    }
42
43
    public function setId(int $id): void
44
    {
45
        $this->id = $id;
46
    }
47
48
    public function getName(): string
49
    {
50
        return $this->name;
51
    }
52
53
    public function setName(string $name): void
54
    {
55
        $this->name = $name;
56
    }
57
58
    public function getSlug(): string
59
    {
60
        return $this->slug;
61
    }
62
63
    public function setSlug(string $slug): void
64
    {
65
        $this->slug = $slug;
66
    }
67
68
    public function getUrl(): ?string
69
    {
70
        return $this->url;
71
    }
72
73
    public function setUrl(?string $url): void
74
    {
75
        $this->url = $url;
76
    }
77
78
    public function getCreatedAt(): \DateTimeImmutable
79
    {
80
        return $this->createdAt;
81
    }
82
83
    public function setCreatedAt(\DateTimeImmutable $createdAt): void
84
    {
85
        $this->createdAt = $createdAt;
86
    }
87
88
    public function getUpdatedAt(): \DateTimeImmutable
89
    {
90
        return $this->updatedAt;
91
    }
92
93
    public function setUpdatedAt(\DateTimeImmutable $updatedAt): void
94
    {
95
        $this->updatedAt = $updatedAt;
96
    }
97
98
    public function __toString(): string
99
    {
100
        return $this->name;
101
    }
102
}
103