Total Complexity | 8 |
Total Lines | 87 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | final class PhotonAddress extends Address |
||
21 | { |
||
22 | /** |
||
23 | * @var int|null |
||
24 | */ |
||
25 | private $osmId; |
||
26 | |||
27 | /** |
||
28 | * @var string|null |
||
29 | */ |
||
30 | private $osmType; |
||
31 | |||
32 | /** |
||
33 | * @var \stdclass|null |
||
34 | */ |
||
35 | private $osmTag; |
||
36 | |||
37 | /** |
||
38 | * @return int|null |
||
39 | */ |
||
40 | public function getOSMId() |
||
41 | { |
||
42 | return $this->osmId; |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @param int|null $osmId |
||
47 | * |
||
48 | * @return PhotonAddress |
||
49 | */ |
||
50 | public function withOSMId(int $osmId = null): self |
||
51 | { |
||
52 | $new = clone $this; |
||
53 | $new->osmId = $osmId; |
||
54 | |||
55 | return $new; |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @return string|null |
||
60 | */ |
||
61 | public function getOSMType() |
||
62 | { |
||
63 | return $this->osmType; |
||
64 | } |
||
65 | |||
66 | /** |
||
67 | * @param string|null $osmType |
||
68 | * |
||
69 | * @return PhotonAddress |
||
70 | */ |
||
71 | public function withOSMType(string $osmType = null): self |
||
72 | { |
||
73 | $new = clone $this; |
||
74 | $new->osmType = $osmType; |
||
75 | |||
76 | return $new; |
||
77 | } |
||
78 | |||
79 | /** |
||
80 | * @return object|null |
||
81 | */ |
||
82 | public function getOSMTag() |
||
83 | { |
||
84 | return $this->osmTag; |
||
85 | } |
||
86 | |||
87 | /** |
||
88 | * @param string|null $key |
||
89 | * @param string|null $value |
||
90 | * |
||
91 | * @return PhotonAddress |
||
92 | */ |
||
93 | public function withOSMTag(string $key = null, string $value = null): self |
||
107 | } |
||
108 | } |
||
109 |