1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace VasilDakov\Econt\Model; |
||
6 | |||
7 | use JMS\Serializer\Annotation as Serializer; |
||
8 | use VasilDakov\Econt\Constants; |
||
9 | |||
10 | final readonly class Quarter |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
11 | { |
||
12 | public function __construct( |
||
13 | #[Serializer\Type('int')] |
||
14 | public ?int $id = null, |
||
15 | |||
16 | #[Serializer\Type('int')] |
||
17 | public ?int $cityId = null, |
||
18 | |||
19 | #[Serializer\Type('string')] |
||
20 | public ?string $name = null, |
||
21 | |||
22 | #[Serializer\Type('string')] |
||
23 | public ?string $nameEn = null, |
||
24 | ) {} |
||
25 | |||
26 | public function toArray(): array |
||
27 | { |
||
28 | return [ |
||
29 | Constants::ID => $this->id, |
||
30 | Constants::CITY_ID => $this->cityId, |
||
31 | Constants::NAME => $this->name, |
||
32 | Constants::NAME_EN => $this->nameEn, |
||
33 | ]; |
||
34 | } |
||
35 | } |