Total Complexity | 5 |
Total Lines | 64 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class City |
||
8 | { |
||
9 | |||
10 | /** |
||
11 | * @var int |
||
12 | */ |
||
13 | private $id; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $name; |
||
19 | |||
20 | /** |
||
21 | * @var int |
||
22 | */ |
||
23 | private $version; |
||
24 | |||
25 | /** |
||
26 | * @var \DateTime |
||
27 | */ |
||
28 | private $updatedAt; |
||
29 | |||
30 | /** |
||
31 | * City constructor. |
||
32 | * @param int $id |
||
33 | * @param string $name |
||
34 | * @param int $version |
||
35 | */ |
||
36 | public function __construct(int $id, string $name, int $version, \DateTime $updatedAt) |
||
37 | { |
||
38 | $this->id = $id; |
||
39 | $this->name = $name; |
||
40 | $this->version = $version; |
||
41 | $this->updatedAt = $updatedAt; |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @return int |
||
46 | */ |
||
47 | public function getId(): int |
||
48 | { |
||
49 | return $this->id; |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | public function getName(): string |
||
58 | } |
||
59 | |||
60 | /** |
||
61 | * @return int |
||
62 | */ |
||
63 | public function getVersion(): int |
||
66 | } |
||
67 | |||
68 | public function getUpdatedAt(): \DateTime |
||
71 | } |
||
72 | } |
||
73 |