Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
46 / 46
100.00% covered (success)
100.00%
31 / 31
CRAP
100.00% covered (success)
100.00%
1 / 1
Store
100.00% covered (success)
100.00%
46 / 46
100.00% covered (success)
100.00%
31 / 31
31
100.00% covered (success)
100.00%
1 / 1
 __toString
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 getId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setId
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getUserId
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setUserId
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getDestination
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setDestination
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getValAlq
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setValAlq
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getCntLanfort
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setCntLanfort
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getCntNeon
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setCntNeon
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getCntSwitch
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setCntSwitch
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getCntToma
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setCntToma
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getCntVentana
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setCntVentana
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getCntLlaves
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setCntLlaves
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getCntMedAgua
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setCntMedAgua
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getCntMedElec
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setCntMedElec
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getMedElectrico
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setMedElectrico
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getMedAgua
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setMedAgua
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
 getUser
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 setUser
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2
3declare(strict_types=1);
4
5namespace App\Entity;
6
7use App\Repository\StoreRepository;
8use Doctrine\DBAL\Types\Types;
9use Doctrine\ORM\Mapping\Column;
10use Doctrine\ORM\Mapping\Entity;
11use Doctrine\ORM\Mapping\GeneratedValue;
12use Doctrine\ORM\Mapping\Id;
13use Doctrine\ORM\Mapping\JoinColumn;
14use Doctrine\ORM\Mapping\ManyToOne;
15use Override;
16use Stringable;
17
18#[Entity(repositoryClass: StoreRepository::class)]
19class Store implements Stringable
20{
21    #[Column, Id, GeneratedValue]
22    private ?int $id = null;
23
24    #[Column(nullable: true)]
25    private ?int $userId = 0;
26
27    #[Column(length: 50, nullable: false)]
28    private string $destination = '';
29
30    #[Column(type: Types::FLOAT, precision: 10, scale: 0, nullable: false)]
31    private float $valAlq = 0;
32
33    #[Column(nullable: false)]
34    private int $cntLanfort = 0;
35
36    #[Column(nullable: false)]
37    private int $cntNeon = 0;
38
39    #[Column(nullable: false)]
40    private int $cntSwitch = 0;
41
42    #[Column(nullable: false)]
43    private int $cntToma = 0;
44
45    #[Column(nullable: false)]
46    private int $cntVentana = 0;
47
48    #[Column(nullable: false)]
49    private int $cntLlaves = 0;
50
51    #[Column(nullable: false)]
52    private int $cntMedAgua = 0;
53
54    #[Column(length: 50)]
55    private string $medAgua = '';
56
57    #[Column(nullable: false)]
58    private int $cntMedElec = 0;
59
60    #[Column(length: 50)]
61    private string $medElectrico = '';
62
63    #[ManyToOne(targetEntity: User::class, inversedBy: 'stores')]
64    #[JoinColumn(name: 'user_id', referencedColumnName: 'id')]
65    private ?User $user = null;
66
67    #[Override]
68    public function __toString(): string
69    {
70        return sprintf('%d - %s', $this->id, $this->destination);
71    }
72
73    public function getId(): ?int
74    {
75        return $this->id;
76    }
77
78    public function setId(?int $id): Store
79    {
80        $this->id = $id;
81
82        return $this;
83    }
84
85    public function getUserId(): ?int
86    {
87        return $this->userId;
88    }
89
90    public function setUserId(int $idUser): static
91    {
92        $this->userId = $idUser;
93
94        return $this;
95    }
96
97    public function getDestination(): string
98    {
99        return $this->destination;
100    }
101
102    public function setDestination(string $destination): static
103    {
104        $this->destination = $destination;
105
106        return $this;
107    }
108
109    public function getValAlq(): float
110    {
111        return $this->valAlq;
112    }
113
114    public function setValAlq(float $valAlq): static
115    {
116        $this->valAlq = $valAlq;
117
118        return $this;
119    }
120
121    public function getCntLanfort(): int
122    {
123        return $this->cntLanfort;
124    }
125
126    public function setCntLanfort(int $cntLanfort): static
127    {
128        $this->cntLanfort = $cntLanfort;
129
130        return $this;
131    }
132
133    public function getCntNeon(): int
134    {
135        return $this->cntNeon;
136    }
137
138    public function setCntNeon(int $cntNeon): static
139    {
140        $this->cntNeon = $cntNeon;
141
142        return $this;
143    }
144
145    public function getCntSwitch(): int
146    {
147        return $this->cntSwitch;
148    }
149
150    public function setCntSwitch(int $cntSwitch): static
151    {
152        $this->cntSwitch = $cntSwitch;
153
154        return $this;
155    }
156
157    public function getCntToma(): int
158    {
159        return $this->cntToma;
160    }
161
162    public function setCntToma(int $cntToma): static
163    {
164        $this->cntToma = $cntToma;
165
166        return $this;
167    }
168
169    public function getCntVentana(): int
170    {
171        return $this->cntVentana;
172    }
173
174    public function setCntVentana(int $cntVentana): static
175    {
176        $this->cntVentana = $cntVentana;
177
178        return $this;
179    }
180
181    public function getCntLlaves(): int
182    {
183        return $this->cntLlaves;
184    }
185
186    public function setCntLlaves(int $cntLlaves): static
187    {
188        $this->cntLlaves = $cntLlaves;
189
190        return $this;
191    }
192
193    public function getCntMedAgua(): int
194    {
195        return $this->cntMedAgua;
196    }
197
198    public function setCntMedAgua(int $cntMedAgua): static
199    {
200        $this->cntMedAgua = $cntMedAgua;
201
202        return $this;
203    }
204
205    public function getCntMedElec(): int
206    {
207        return $this->cntMedElec;
208    }
209
210    public function setCntMedElec(int $cntMedElec): static
211    {
212        $this->cntMedElec = $cntMedElec;
213
214        return $this;
215    }
216
217    public function getMedElectrico(): string
218    {
219        return $this->medElectrico;
220    }
221
222    public function setMedElectrico(string $medElectrico): static
223    {
224        $this->medElectrico = $medElectrico;
225
226        return $this;
227    }
228
229    public function getMedAgua(): string
230    {
231        return $this->medAgua;
232    }
233
234    public function setMedAgua(string $medAgua): static
235    {
236        $this->medAgua = $medAgua;
237
238        return $this;
239    }
240
241    public function getUser(): ?User
242    {
243        return $this->user;
244    }
245
246    public function setUser(?User $user): static
247    {
248        $this->user = $user;
249
250        return $this;
251    }
252}