Platform   A
last analyzed

Complexity

Total Complexity 29

Size/Duplication

Total Lines 185
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 61
c 1
b 0
f 0
dl 0
loc 185
rs 10
wmc 29

28 Methods

Rating   Name   Duplication   Size   Complexity  
A setCreatedAt() 0 3 1
A __construct() 0 4 1
A getAbbreviation() 0 3 1
A setName() 0 3 1
A setPlatformType() 0 3 1
A setAlternativeName() 0 3 1
A getId() 0 3 1
A getAlternativeName() 0 3 1
A setUpdatedAt() 0 3 1
A getChecksum() 0 3 1
A getPlatformType() 0 3 1
A getPlatformLogo() 0 3 1
A setAbbreviation() 0 3 1
A getUpdatedAt() 0 3 1
A setUrl() 0 3 1
A setSummary() 0 3 1
A setPlatformLogo() 0 3 1
A getSummary() 0 3 1
A getUrl() 0 3 1
A setId() 0 3 1
A getName() 0 3 1
A getGeneration() 0 3 1
A setGeneration() 0 3 1
A getCreatedAt() 0 3 1
A setSlug() 0 3 1
A setChecksum() 0 3 1
A getSlug() 0 3 1
A __toString() 0 3 2
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_platform')]
11
class Platform
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, nullable: true)]
21
    private ?string $abbreviation = null;
22
23
    #[ORM\Column(type: 'string', length: 255, nullable: true)]
24
    private ?string $alternativeName = null;
25
26
    #[ORM\Column(type: 'integer', nullable: true)]
27
    private ?int $generation = null;
28
29
    #[ORM\Column(type: 'string', length: 255, nullable: true)]
30
    private ?string $slug = null;
31
32
    #[ORM\Column(type: 'text', nullable: true)]
33
    private ?string $summary = null;
34
35
    #[ORM\Column(type: 'string', length: 500, nullable: true)]
36
    private ?string $url = null;
37
38
    #[ORM\Column(type: 'string', length: 255, nullable: true)]
39
    private ?string $checksum = null;
40
41
    #[ORM\ManyToOne(targetEntity: PlatformType::class)]
42
    #[ORM\JoinColumn(name: 'platform_type_id', referencedColumnName: 'id', nullable: true)]
43
    private ?PlatformType $platformType = null;
44
45
    #[ORM\ManyToOne(targetEntity: PlatformLogo::class)]
46
    #[ORM\JoinColumn(name: 'platform_logo_id', referencedColumnName: 'id', nullable: true)]
47
    private ?PlatformLogo $platformLogo = null;
48
49
    #[ORM\Column(type: 'datetime_immutable')]
50
    private \DateTimeImmutable $createdAt;
51
52
    #[ORM\Column(type: 'datetime_immutable')]
53
    private \DateTimeImmutable $updatedAt;
54
55
    public function __construct()
56
    {
57
        $this->createdAt = new \DateTimeImmutable();
58
        $this->updatedAt = new \DateTimeImmutable();
59
    }
60
61
    public function getId(): int
62
    {
63
        return $this->id;
64
    }
65
66
    public function setId(int $id): void
67
    {
68
        $this->id = $id;
69
    }
70
71
    public function getName(): string
72
    {
73
        return $this->name;
74
    }
75
76
    public function setName(string $name): void
77
    {
78
        $this->name = $name;
79
    }
80
81
    public function getAbbreviation(): ?string
82
    {
83
        return $this->abbreviation;
84
    }
85
86
    public function setAbbreviation(?string $abbreviation): void
87
    {
88
        $this->abbreviation = $abbreviation;
89
    }
90
91
    public function getAlternativeName(): ?string
92
    {
93
        return $this->alternativeName;
94
    }
95
96
    public function setAlternativeName(?string $alternativeName): void
97
    {
98
        $this->alternativeName = $alternativeName;
99
    }
100
101
    public function getGeneration(): ?int
102
    {
103
        return $this->generation;
104
    }
105
106
    public function setGeneration(?int $generation): void
107
    {
108
        $this->generation = $generation;
109
    }
110
111
    public function getSlug(): ?string
112
    {
113
        return $this->slug;
114
    }
115
116
    public function setSlug(?string $slug): void
117
    {
118
        $this->slug = $slug;
119
    }
120
121
    public function getSummary(): ?string
122
    {
123
        return $this->summary;
124
    }
125
126
    public function setSummary(?string $summary): void
127
    {
128
        $this->summary = $summary;
129
    }
130
131
    public function getUrl(): ?string
132
    {
133
        return $this->url;
134
    }
135
136
    public function setUrl(?string $url): void
137
    {
138
        $this->url = $url;
139
    }
140
141
    public function getChecksum(): ?string
142
    {
143
        return $this->checksum;
144
    }
145
146
    public function setChecksum(?string $checksum): void
147
    {
148
        $this->checksum = $checksum;
149
    }
150
151
    public function getPlatformType(): ?PlatformType
152
    {
153
        return $this->platformType;
154
    }
155
156
    public function setPlatformType(?PlatformType $platformType): void
157
    {
158
        $this->platformType = $platformType;
159
    }
160
161
    public function getPlatformLogo(): ?PlatformLogo
162
    {
163
        return $this->platformLogo;
164
    }
165
166
    public function setPlatformLogo(?PlatformLogo $platformLogo): void
167
    {
168
        $this->platformLogo = $platformLogo;
169
    }
170
171
    public function getCreatedAt(): \DateTimeImmutable
172
    {
173
        return $this->createdAt;
174
    }
175
176
    public function setCreatedAt(\DateTimeImmutable $createdAt): void
177
    {
178
        $this->createdAt = $createdAt;
179
    }
180
181
    public function getUpdatedAt(): \DateTimeImmutable
182
    {
183
        return $this->updatedAt;
184
    }
185
186
    public function setUpdatedAt(\DateTimeImmutable $updatedAt): void
187
    {
188
        $this->updatedAt = $updatedAt;
189
    }
190
191
    public function __toString(): string
192
    {
193
        return $this->name . ($this->abbreviation ? ' (' . $this->abbreviation . ')' : '');
194
    }
195
}
196