Adresse::getDistance()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
/*
4
 * This file is part of the geo-api-library package.
5
 *
6
 * (c) 2020 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Library\GeoAPI\Model;
13
14
use WBW\Library\Core\Model\Attribute\StringIdTrait;
15
use WBW\Library\Core\Model\Attribute\StringLabelTrait;
16
use WBW\Library\Core\Model\Attribute\StringNameTrait;
17
use WBW\Library\Core\Model\Attribute\StringTypeTrait;
18
19
/**
20
 * Adresse.
21
 *
22
 * @author webeweb <https://github.com/webeweb/>
23
 * @package WBW\Library\GeoAPI\Model
24
 */
25
class Adresse {
26
27 1
    use StringIdTrait;
28 1
    use StringLabelTrait;
29 1
    use StringNameTrait;
30 1
    use StringTypeTrait;
31
32
    /**
33
     * City.
34
     *
35
     * @var string|null
36
     */
37
    private $city;
38
39
    /**
40
     * City code.
41
     *
42
     * @var string|null
43
     */
44
    private $cityCode;
45
46
    /**
47
     * Columns.
48
     *
49
     * @var array
50
     */
51
    private $columns;
52
53
    /**
54
     * Context.
55
     *
56
     * @var string|null
57
     */
58
    private $context;
59
60
    /**
61
     * Distance.
62
     *
63
     * @var string|null
64
     */
65
    private $distance;
66
67
    /**
68
     * District.
69
     *
70
     * @var string|null
71
     */
72
    private $district;
73
74
    /**
75
     * House number.
76
     *
77
     * @var string|null
78
     */
79
    private $houseNumber;
80
81
    /**
82
     * Latitude.
83
     *
84
     * @var string|null
85
     */
86
    private $latitude;
87
88
    /**
89
     * Longitude.
90
     *
91
     * @var string|null
92
     */
93
    private $longitude;
94
95
    /**
96
     * Old city.
97
     *
98
     * @var string|null
99
     */
100
    private $oldCity;
101
102
    /**
103
     * Old city code.
104
     *
105
     * @var string|null
106
     */
107
    private $oldCityCode;
108
109
    /**
110
     * Postcode.
111
     *
112
     * @var string|null
113
     */
114
    private $postcode;
115
116
    /**
117
     * Score.
118
     *
119
     * @var string|null
120
     */
121
    private $score;
122
123
    /**
124
     * Street.
125
     *
126
     * @var string|null
127
     */
128
    private $street;
129
130
    /**
131
     * Constructor.
132
     */
133 105
    public function __construct() {
134 105
        $this->setColumns([]);
135 105
    }
136
137
    /**
138
     * Add a column.
139
     *
140
     * @param string $k The key.
141
     * @param string $v The value.
142
     * @return Adresse Returns this adresse.
143
     */
144 30
    public function addColumn(string $k, string $v): Adresse {
145 30
        $this->columns[$k] = $v;
146 30
        return $this;
147
    }
148
149
    /**
150
     * Get the city.
151
     *
152
     * @return string|null Returns the city.
153
     */
154 20
    public function getCity(): ?string {
155 20
        return $this->city;
156
    }
157
158
    /**
159
     * Get the city code.
160
     *
161
     * @return string|null Returns the city.
162
     */
163 20
    public function getCityCode(): ?string {
164 20
        return $this->cityCode;
165
    }
166
167
    /**
168
     * Get the columns.
169
     *
170
     * @return array Returns the columns.
171
     */
172 20
    public function getColumns(): array {
173 20
        return $this->columns;
174
    }
175
176
    /**
177
     * Get the context.
178
     *
179
     * @return string|null Returns the context.
180
     */
181 20
    public function getContext(): ?string {
182 20
        return $this->context;
183
    }
184
185
    /**
186
     * Get the distance.
187
     *
188
     * @return string|null Returns the distance.
189
     */
190 20
    public function getDistance(): ?string {
191 20
        return $this->distance;
192
    }
193
194
    /**
195
     * Get the district.
196
     *
197
     * @return string|null Returns the district.
198
     */
199 20
    public function getDistrict(): ?string {
200 20
        return $this->district;
201
    }
202
203
    /**
204
     * Get the house number.
205
     *
206
     * @return string|null Returns the house number.
207
     */
208 20
    public function getHouseNumber(): ?string {
209 20
        return $this->houseNumber;
210
    }
211
212
    /**
213
     * Set the latitude.
214
     *
215
     * @return string|null Returns the latitude.
216
     */
217 20
    public function getLatitude(): ?string {
218 20
        return $this->latitude;
219
    }
220
221
    /**
222
     * Get the longitude.
223
     *
224
     * @return string|null Returns the longitude.
225
     */
226 20
    public function getLongitude(): ?string {
227 20
        return $this->longitude;
228
    }
229
230
    /**
231
     * Get the old city.
232
     *
233
     * @return string|null Returns the old city.
234
     */
235 20
    public function getOldCity(): ?string {
236 20
        return $this->oldCity;
237
    }
238
239
    /**
240
     * Get the old city code.
241
     *
242
     * @return string|null Returns the old city code.
243
     */
244 20
    public function getOldCityCode(): ?string {
245 20
        return $this->oldCityCode;
246
    }
247
248
    /**
249
     * Get the postcode.
250
     *
251
     * @return string|null Returns the postcode.
252
     */
253 20
    public function getPostcode(): ?string {
254 20
        return $this->postcode;
255
    }
256
257
    /**
258
     * Get the score.
259
     *
260
     * @return string|null Returns the score.
261
     */
262 20
    public function getScore(): ?string {
263 20
        return $this->score;
264
    }
265
266
    /**
267
     * Get the street.
268
     *
269
     * @return string|null Returns the street.
270
     */
271 20
    public function getStreet(): ?string {
272 20
        return $this->street;
273
    }
274
275
    /**
276
     * Set the city.
277
     *
278
     * @param string|null $city The city.
279
     * @return Adresse Returns this adresse.
280
     */
281 25
    public function setCity(?string $city): Adresse {
282 25
        $this->city = $city;
283 25
        return $this;
284
    }
285
286
    /**
287
     * Set the city code.
288
     *
289
     * @param string|null $cityCode The city code.
290
     * @return Adresse Returns this adresse.
291
     */
292 25
    public function setCityCode(?string $cityCode): Adresse {
293 25
        $this->cityCode = $cityCode;
294 25
        return $this;
295
    }
296
297
    /**
298
     * Set the columns.
299
     *
300
     * @param array $columns The columns.
301
     * @return Adresse Returns this adresse.
302
     */
303 105
    protected function setColumns(array $columns): Adresse {
304 105
        $this->columns = $columns;
305 105
        return $this;
306
    }
307
308
    /**
309
     * Set the context.
310
     *
311
     * @param string|null $context The context.
312
     * @return Adresse Returns this adresse.
313
     */
314 25
    public function setContext(?string $context): Adresse {
315 25
        $this->context = $context;
316 25
        return $this;
317
    }
318
319
    /**
320
     * The distance.
321
     *
322
     * @param string|null $distance The distance.
323
     * @return Adresse Returns this adresse.
324
     */
325 15
    public function setDistance(?string $distance): Adresse {
326 15
        $this->distance = $distance;
327 15
        return $this;
328
    }
329
330
    /**
331
     * Set the district.
332
     *
333
     * @param string|null $district The district.
334
     * @return Adresse Returns this adresse.
335
     */
336 20
    public function setDistrict(?string $district): Adresse {
337 20
        $this->district = $district;
338 20
        return $this;
339
    }
340
341
    /**
342
     * Set the house number.
343
     *
344
     * @param string|null $houseNumber The house number.
345
     * @return Adresse Returns this adresse.
346
     */
347 25
    public function setHouseNumber(?string $houseNumber): Adresse {
348 25
        $this->houseNumber = $houseNumber;
349 25
        return $this;
350
    }
351
352
    /**
353
     * Set the latitude.
354
     *
355
     * @param string|null $latitude The latitude.
356
     * @return Adresse Returns this adresse.
357
     */
358 15
    public function setLatitude(?string $latitude): Adresse {
359 15
        $this->latitude = $latitude;
360 15
        return $this;
361
    }
362
363
    /**
364
     * Set the longitude.
365
     *
366
     * @param string|null $longitude The longitude.
367
     * @return Adresse Returns this adresse.
368
     */
369 15
    public function setLongitude(?string $longitude): Adresse {
370 15
        $this->longitude = $longitude;
371 15
        return $this;
372
    }
373
374
    /**
375
     * Set the old city.
376
     *
377
     * @param string|null $oldCity The old city.
378
     * @return Adresse Returns this adresse.
379
     */
380 25
    public function setOldCity(?string $oldCity): Adresse {
381 25
        $this->oldCity = $oldCity;
382 25
        return $this;
383
    }
384
385
    /**
386
     * Set the old city code.
387
     *
388
     * @param string|null $oldCityCode The old city code.
389
     * @return Adresse Returns this adresse.
390
     */
391 25
    public function setOldCityCode(?string $oldCityCode): Adresse {
392 25
        $this->oldCityCode = $oldCityCode;
393 25
        return $this;
394
    }
395
396
    /**
397
     * Set the postcode.
398
     *
399
     * @param string|null $postcode The postcode.
400
     * @return Adresse Returns this adresse.
401
     */
402 25
    public function setPostcode(?string $postcode): Adresse {
403 25
        $this->postcode = $postcode;
404 25
        return $this;
405
    }
406
407
    /**
408
     * Set the score.
409
     *
410
     * @param string|null $score Teh score.
411
     * @return Adresse Returns this adresse.
412
     */
413 20
    public function setScore(?string $score): Adresse {
414 20
        $this->score = $score;
415 20
        return $this;
416
    }
417
418
    /**
419
     * Set the street.
420
     *
421
     * @param string|null $street The street.
422
     * @return Adresse Returns this adresse.
423
     */
424 25
    public function setStreet(?string $street): Adresse {
425 25
        $this->street = $street;
426 25
        return $this;
427
    }
428
}