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