Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 33 |
|
0.00% |
0 / 22 |
CRAP | |
0.00% |
0 / 1 |
Panini2024Picture | |
0.00% |
0 / 33 |
|
0.00% |
0 / 22 |
756 | |
0.00% |
0 / 1 |
getId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
6 | |||
setId | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getLine1 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setLine1 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getLine2 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setLine2 | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getAssociation | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setAssociation | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getImgSrc | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setImgSrc | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getImgStyle | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setImgStyle | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getIsLandscape | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setIsLandscape | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getHasTop | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setHasTop | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getBirthdate | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setBirthdate | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getNumMispunches | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
setNumMispunches | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
getInfos | |
0.00% |
0 / 9 |
|
0.00% |
0 / 1 |
20 | |||
setInfos | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 |
1 | <?php |
2 | |
3 | namespace Olz\Entity\Panini2024; |
4 | |
5 | use Doctrine\ORM\Mapping as ORM; |
6 | use Olz\Entity\Common\OlzEntity; |
7 | use Olz\Repository\Panini2024\Panini2024PictureRepository; |
8 | |
9 | #[ORM\Table(name: 'panini24')] |
10 | #[ORM\Entity(repositoryClass: Panini2024PictureRepository::class)] |
11 | class Panini2024Picture extends OlzEntity { |
12 | #[ORM\Id] |
13 | #[ORM\Column(type: 'bigint', nullable: false)] |
14 | #[ORM\GeneratedValue] |
15 | private int|string $id; |
16 | |
17 | #[ORM\Column(type: 'string', nullable: false)] |
18 | private string $line1; |
19 | |
20 | #[ORM\Column(type: 'string', nullable: true)] |
21 | private ?string $line2; |
22 | |
23 | #[ORM\Column(type: 'string', nullable: true)] |
24 | private ?string $association; |
25 | |
26 | #[ORM\Column(type: 'string', nullable: false)] |
27 | private string $img_src; |
28 | |
29 | #[ORM\Column(type: 'string', nullable: false)] |
30 | private string $img_style; |
31 | |
32 | #[ORM\Column(type: 'boolean', nullable: false)] |
33 | private bool $is_landscape; |
34 | |
35 | #[ORM\Column(type: 'boolean', nullable: false)] |
36 | private bool $has_top; |
37 | |
38 | #[ORM\Column(type: 'date', nullable: true)] |
39 | private ?\DateTime $birthdate; |
40 | |
41 | #[ORM\Column(type: 'integer', nullable: true)] |
42 | private ?int $num_mispunches; |
43 | |
44 | #[ORM\Column(type: 'text', nullable: false)] |
45 | private string $infos; |
46 | |
47 | public function getId(): ?int { |
48 | return isset($this->id) ? intval($this->id) : null; |
49 | } |
50 | |
51 | public function setId(int $new_value): void { |
52 | $this->id = $new_value; |
53 | } |
54 | |
55 | public function getLine1(): string { |
56 | return $this->line1; |
57 | } |
58 | |
59 | public function setLine1(string $new_value): void { |
60 | $this->line1 = $new_value; |
61 | } |
62 | |
63 | public function getLine2(): ?string { |
64 | return $this->line2; |
65 | } |
66 | |
67 | public function setLine2(?string $new_value): void { |
68 | $this->line2 = $new_value; |
69 | } |
70 | |
71 | public function getAssociation(): ?string { |
72 | return $this->association; |
73 | } |
74 | |
75 | public function setAssociation(?string $new_value): void { |
76 | $this->association = $new_value; |
77 | } |
78 | |
79 | public function getImgSrc(): string { |
80 | return $this->img_src; |
81 | } |
82 | |
83 | public function setImgSrc(string $new_value): void { |
84 | $this->img_src = $new_value; |
85 | } |
86 | |
87 | public function getImgStyle(): string { |
88 | return $this->img_style; |
89 | } |
90 | |
91 | public function setImgStyle(string $new_value): void { |
92 | $this->img_style = $new_value; |
93 | } |
94 | |
95 | public function getIsLandscape(): bool { |
96 | return $this->is_landscape; |
97 | } |
98 | |
99 | public function setIsLandscape(bool $new_value): void { |
100 | $this->is_landscape = $new_value; |
101 | } |
102 | |
103 | public function getHasTop(): bool { |
104 | return $this->has_top; |
105 | } |
106 | |
107 | public function setHasTop(bool $new_value): void { |
108 | $this->has_top = $new_value; |
109 | } |
110 | |
111 | public function getBirthdate(): ?\DateTime { |
112 | return $this->birthdate; |
113 | } |
114 | |
115 | public function setBirthdate(?\DateTime $new_value): void { |
116 | $this->birthdate = $new_value; |
117 | } |
118 | |
119 | public function getNumMispunches(): ?int { |
120 | return $this->num_mispunches; |
121 | } |
122 | |
123 | public function setNumMispunches(?int $new_value): void { |
124 | $this->num_mispunches = $new_value; |
125 | } |
126 | |
127 | /** @return array<string> */ |
128 | public function getInfos(): array { |
129 | $array = json_decode($this->infos ?? '[]', true); |
130 | if (!is_array($array)) { |
131 | return []; |
132 | } |
133 | $strings = []; |
134 | foreach ($array as $string) { |
135 | if (!is_string($string)) { |
136 | return []; |
137 | } |
138 | $strings[] = $string; |
139 | } |
140 | return $strings; |
141 | } |
142 | |
143 | /** @param array<string> $new_value */ |
144 | public function setInfos(array $new_value): void { |
145 | $sane_value = json_encode($new_value); |
146 | if (!$sane_value) { |
147 | return; |
148 | } |
149 | $this->infos = $sane_value; |
150 | } |
151 | } |