Skip to content

Commit 0363f4e

Browse files
committed
Upgrade ruleset for CS
1 parent dc68e55 commit 0363f4e

File tree

3 files changed

+74
-53
lines changed

3 files changed

+74
-53
lines changed

ruleset.xml

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation.NonFullyQualifiedClassName"/>
2222
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions"/>
2323
<exclude name="SlevomatCodingStandard.Files.TypeNameMatchesFileName"/>
24+
<exclude name="SlevomatCodingStandard.Commenting.RequireOneLinePropertyDocComment.MultiLinePropertyComment"/>
25+
<exclude name="SlevomatCodingStandard.Commenting.DocCommentSpacing.IncorrectLinesCountBetweenDifferentAnnotationsTypes"/>
26+
<exclude name="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming.SuperfluousSuffix"/>
27+
<exclude name="SlevomatCodingStandard.ControlStructures.EarlyExit"/>
2428
</rule>
2529

2630
<rule ref="SlevomatCodingStandard.Types.EmptyLinesAroundTypeBraces">

src/Objects/Place.php

+69-51
Original file line numberDiff line numberDiff line change
@@ -7,73 +7,119 @@
77
*/
88
class Place
99
{
10-
/** @var string */
10+
/**
11+
* @var string
12+
*/
1113
protected $id;
1214

13-
/** @var float */
15+
/**
16+
* @var float
17+
*/
1418
protected $locationLat;
1519

16-
/** @var float */
20+
/**
21+
* @var float
22+
*/
1723
protected $locationLng;
1824

19-
/** @var string */
25+
/**
26+
* @var string
27+
*/
2028
protected $locationType;
2129

22-
/** @var float */
30+
/**
31+
* @var float
32+
*/
2333
protected $boundsNortheastLat;
2434

25-
/** @var float */
35+
/**
36+
* @var float
37+
*/
2638
protected $boundsNortheastLng;
2739

28-
/** @var float */
40+
/**
41+
* @var float
42+
*/
2943
protected $boundsSouthwestLat;
3044

31-
/** @var float */
45+
/**
46+
* @var float
47+
*/
3248
protected $boundsSouthwestLng;
3349

34-
/** @var float */
50+
/**
51+
* @var float
52+
*/
3553
protected $viewportNortheastLat;
3654

37-
/** @var float */
55+
/**
56+
* @var float
57+
*/
3858
protected $viewportNortheastLng;
3959

40-
/** @var float */
60+
/**
61+
* @var float
62+
*/
4163
protected $viewportSouthwestLat;
4264

43-
/** @var float */
65+
/**
66+
* @var float
67+
*/
4468
protected $viewportSouthwestLng;
4569

46-
/** @var string */
70+
/**
71+
* @var string
72+
*/
4773
protected $formattedAddress;
4874

49-
/** @var mixed[] */
75+
/**
76+
* @var mixed[]
77+
*/
5078
protected $types;
5179

52-
/** @var mixed[] */
80+
/**
81+
* @var mixed[]
82+
*/
5383
protected $addressComponents;
5484

55-
/** @var string */
85+
/**
86+
* @var string
87+
*/
5688
protected $streetNumber;
5789

58-
/** @var string */
90+
/**
91+
* @var string
92+
*/
5993
protected $street;
6094

61-
/** @var string */
95+
/**
96+
* @var string
97+
*/
6298
protected $city;
6399

64-
/** @var string */
100+
/**
101+
* @var string
102+
*/
65103
protected $state;
66104

67-
/** @var string */
105+
/**
106+
* @var string
107+
*/
68108
protected $zip;
69109

70-
/** @var mixed[] */
110+
/**
111+
* @var mixed[]
112+
*/
71113
protected $source;
72114

73-
/** @var string */
115+
/**
116+
* @var string
117+
*/
74118
protected $shortAddress;
75119

76-
/** @var string */
120+
/**
121+
* @var string
122+
*/
77123
protected $url;
78124

79125
/**
@@ -106,7 +152,6 @@ public function getId(): string
106152

107153
/**
108154
* @param string $id
109-
*
110155
* @return Place
111156
*/
112157
public function setId(string $id): Place
@@ -126,7 +171,6 @@ public function getLocationLat(): float
126171

127172
/**
128173
* @param float $locationLat
129-
*
130174
* @return Place
131175
*/
132176
public function setLocationLat(float $locationLat): Place
@@ -146,7 +190,6 @@ public function getLocationLng(): float
146190

147191
/**
148192
* @param float $locationLng
149-
*
150193
* @return Place
151194
*/
152195
public function setLocationLng(float $locationLng): Place
@@ -166,7 +209,6 @@ public function getLocationType(): string
166209

167210
/**
168211
* @param string $locationType
169-
*
170212
* @return Place
171213
*/
172214
public function setLocationType(string $locationType): Place
@@ -186,7 +228,6 @@ public function getBoundsNortheastLat(): float
186228

187229
/**
188230
* @param float $boundsNortheastLat
189-
*
190231
* @return Place
191232
*/
192233
public function setBoundsNortheastLat(float $boundsNortheastLat): Place
@@ -206,7 +247,6 @@ public function getBoundsNortheastLng(): float
206247

207248
/**
208249
* @param float $boundsNortheastLng
209-
*
210250
* @return Place
211251
*/
212252
public function setBoundsNortheastLng(float $boundsNortheastLng): Place
@@ -226,7 +266,6 @@ public function getBoundsSouthwestLat(): float
226266

227267
/**
228268
* @param float $boundsSouthwestLat
229-
*
230269
* @return Place
231270
*/
232271
public function setBoundsSouthwestLat(float $boundsSouthwestLat): Place
@@ -246,7 +285,6 @@ public function getBoundsSouthwestLng(): float
246285

247286
/**
248287
* @param float $boundsSouthwestLng
249-
*
250288
* @return Place
251289
*/
252290
public function setBoundsSouthwestLng(float $boundsSouthwestLng): Place
@@ -266,7 +304,6 @@ public function getViewportNortheastLat(): float
266304

267305
/**
268306
* @param float $viewportNortheastLat
269-
*
270307
* @return Place
271308
*/
272309
public function setViewportNortheastLat(float $viewportNortheastLat): Place
@@ -286,7 +323,6 @@ public function getViewportNortheastLng(): float
286323

287324
/**
288325
* @param float $viewportNortheastLng
289-
*
290326
* @return Place
291327
*/
292328
public function setViewportNortheastLng(float $viewportNortheastLng): Place
@@ -306,7 +342,6 @@ public function getViewportSouthwestLat(): float
306342

307343
/**
308344
* @param float $viewportSouthwestLat
309-
*
310345
* @return Place
311346
*/
312347
public function setViewportSouthwestLat(float $viewportSouthwestLat): Place
@@ -326,7 +361,6 @@ public function getViewportSouthwestLng(): float
326361

327362
/**
328363
* @param float $viewportSouthwestLng
329-
*
330364
* @return Place
331365
*/
332366
public function setViewportSouthwestLng(float $viewportSouthwestLng): Place
@@ -346,7 +380,6 @@ public function getTypes(): array
346380

347381
/**
348382
* @param mixed[] $types
349-
*
350383
* @return Place
351384
*/
352385
public function setTypes(array $types): Place
@@ -358,7 +391,6 @@ public function setTypes(array $types): Place
358391

359392
/**
360393
* @param string|null $formattedAddress
361-
*
362394
* @return Place
363395
*/
364396
public function setFormattedAddress(?string $formattedAddress): Place
@@ -378,7 +410,6 @@ public function getFormattedAddress(): ?string
378410

379411
/**
380412
* @param mixed[] $addressComponents
381-
*
382413
* @return Place
383414
*/
384415
public function setAddressComponents(array $addressComponents): Place
@@ -398,7 +429,6 @@ public function getAddressComponents(): ?array
398429

399430
/**
400431
* @param string|null $street
401-
*
402432
* @return Place
403433
*/
404434
public function setStreet(?string $street): Place
@@ -418,7 +448,6 @@ public function getStreet(): ?string
418448

419449
/**
420450
* @param string|null $city
421-
*
422451
* @return Place
423452
*/
424453
public function setCity(?string $city): Place
@@ -438,7 +467,6 @@ public function getCity(): ?string
438467

439468
/**
440469
* @param string|null $state
441-
*
442470
* @return Place
443471
*/
444472
public function setState(?string $state): Place
@@ -458,7 +486,6 @@ public function getState(): ?string
458486

459487
/**
460488
* @param string|null $zip
461-
*
462489
* @return Place
463490
*/
464491
public function setZip(?string $zip): Place
@@ -478,7 +505,6 @@ public function getZip(): ?string
478505

479506
/**
480507
* @param string|null $streetNumber
481-
*
482508
* @return Place
483509
*/
484510
public function setStreetNumber(?string $streetNumber): Place
@@ -498,7 +524,6 @@ public function getStreetNumber(): ?string
498524

499525
/**
500526
* @param mixed[] $data
501-
*
502527
* @return Place
503528
*/
504529
public function setSource(array $data): Place
@@ -518,7 +543,6 @@ public function getSource(): array
518543

519544
/**
520545
* @param string $shortAddress
521-
*
522546
* @return Place
523547
*/
524548
public function setShortAddress(string $shortAddress): Place
@@ -538,7 +562,6 @@ public function getShortAddress(): string
538562

539563
/**
540564
* @param string|null $url
541-
*
542565
* @return Place
543566
*/
544567
public function setUrl(?string $url): Place
@@ -566,7 +589,6 @@ public function getBorough(): ?string
566589

567590
/**
568591
* @param string|null $borough
569-
*
570592
* @return Place
571593
*/
572594
public function setBorough(?string $borough): Place
@@ -590,7 +612,6 @@ public function getSublocality(): ?string
590612
* Alias for borough
591613
*
592614
* @param string|null $borough
593-
*
594615
* @return Place
595616
*/
596617
public function setSublocality(?string $borough): Place
@@ -610,7 +631,6 @@ public function getNeighborhoods(): ?array
610631

611632
/**
612633
* @param string[]|null $neighborhoods
613-
*
614634
* @return Place
615635
*/
616636
public function setNeighborhoods(?array $neighborhoods): Place
@@ -630,7 +650,6 @@ public function getMainNeighborhood(): ?string
630650

631651
/**
632652
* @param null|string $mainNeighborhood
633-
*
634653
* @return Place
635654
*/
636655
public function setMainNeighborhood(?string $mainNeighborhood): Place
@@ -650,7 +669,6 @@ public function getCountryCode(): ?string
650669

651670
/**
652671
* @param null|string $countryCode
653-
*
654672
* @return Place
655673
*/
656674
public function setCountryCode(?string $countryCode): Place

src/PlaceSimpleFactory.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ protected function setAdministrativeAreaLevel1(array $component, Place $place):
177177
*
178178
* @return Place
179179
*/
180-
protected function setCountry(array $component, Place $place)
180+
protected function setCountry(array $component, Place $place): Place
181181
{
182182
if ($place->getCountryCode() === null) {
183183
$place->setCountryCode($component['short_name']);
@@ -238,7 +238,6 @@ protected function setNeighborhood(array $component, Place $place): Place
238238
* with first result (basic for this place). So from $googleDataResults
239239
* retrieved first element (always!)
240240
*
241-
*
242241
* @param mixed[] $googleDataResults
243242
* @param Place $place
244243
* @return Place

0 commit comments

Comments
 (0)