Passed
Push — main ( 5b7f1c...98c11d )
by Vasil
03:17
created

State::getName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace VasilDakov\Speedy\Model;
6
7
use JMS\Serializer\Annotation as Serializer;
8
use VasilDakov\Speedy\ToArray;
9
10
/**
11
 * Class State
12
 *
13
 * @author Vasil Dakov <[email protected]>
14
 * @copyright 2009-2022 Neutrino.bg
15
 * @version 1.0
16
 * @Serializer\AccessType("public_method")
17
 */
18
class State
19
{
20
    use ToArray;
21
22
    /**
23
     * @var int|null
24
     * @Serializer\Type("integer")
25
     */
26
    private ?int $id = null;
27
28
    /**
29
     * @var string
30
     * @Serializer\Type("string")
31
     */
32
    private string $name;
33
34
    /**
35
     * @var string
36
     * @Serializer\Type("string")
37
     */
38
    private string $nameEn;
39
40
    /**
41
     * @var string
42
     * @Serializer\Type("string")
43
     */
44
    private string $stateAlpha;
45
46
    /**
47
     * @var int
48
     * @Serializer\Type("integer")
49
     */
50
    private int $countryId;
51
52
    /**
53
     * @return ?int
54
     */
55 1
    public function getId(): ?int
56
    {
57 1
        return $this->id;
58
    }
59
60
    /**
61
     * @param ?int $id
62
     */
63 1
    public function setId(?int $id): void
64
    {
65 1
        $this->id = $id;
66
    }
67
68
    /**
69
     * @return string
70
     */
71 1
    public function getName(): string
72
    {
73 1
        return $this->name;
74
    }
75
76
    /**
77
     * @param string $name
78
     */
79 1
    public function setName(string $name): void
80
    {
81 1
        $this->name = $name;
82
    }
83
84
    /**
85
     * @return string
86
     */
87 1
    public function getNameEn(): string
88
    {
89 1
        return $this->nameEn;
90
    }
91
92
    /**
93
     * @param string $nameEn
94
     */
95 1
    public function setNameEn(string $nameEn): void
96
    {
97 1
        $this->nameEn = $nameEn;
98
    }
99
100
    /**
101
     * @return string
102
     */
103 1
    public function getStateAlpha(): string
104
    {
105 1
        return $this->stateAlpha;
106
    }
107
108
    /**
109
     * @param string $stateAlpha
110
     */
111 1
    public function setStateAlpha(string $stateAlpha): void
112
    {
113 1
        $this->stateAlpha = $stateAlpha;
114
    }
115
116
    /**
117
     * @return int
118
     */
119 1
    public function getCountryId(): int
120
    {
121 1
        return $this->countryId;
122
    }
123
124
    /**
125
     * @param int $countryId
126
     */
127 1
    public function setCountryId(int $countryId): void
128
    {
129 1
        $this->countryId = $countryId;
130
    }
131
132
    /**
133
     * @return array
134
     */
135 1
    public function toArray(): array
136
    {
137 1
        return [
138
139 1
        ];
140
    }
141
}
142