Skip to content

Commit 73c26a8

Browse files
committed
fix phpdoc
1 parent f61c815 commit 73c26a8

File tree

8 files changed

+132
-3
lines changed

8 files changed

+132
-3
lines changed

src/Geocoder/Exception/ProviderNotRegistered.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class ProviderNotRegistered extends \RuntimeException implements Exception
1717
{
1818
/**
1919
* @param string $providerName
20+
* @param array $registeredProviders
2021
*/
2122
public function __construct($providerName, array $registeredProviders = [])
2223
{

src/Geocoder/Model/AddressFactory.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,19 @@ public function createFromArray(array $results)
5656
}
5757

5858
/**
59+
* @param array $data
5960
* @param string $key
61+
* @return double
6062
*/
6163
private function readDoubleValue(array $data, $key)
6264
{
6365
return (double) \igorw\get_in($data, explode('.', $key));
6466
}
6567

6668
/**
69+
* @param array $data
6770
* @param string $key
71+
* @return string
6872
*/
6973
private function readStringValue(array $data, $key)
7074
{

src/Geocoder/Model/Bounds.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,24 @@
1515
*/
1616
final class Bounds
1717
{
18+
/**
19+
* @var double
20+
*/
1821
private $south;
1922

23+
/**
24+
* @var double
25+
*/
2026
private $west;
2127

28+
/**
29+
* @var double
30+
*/
2231
private $north;
2332

33+
/**
34+
* @var double
35+
*/
2436
private $east;
2537

2638
/**
@@ -37,31 +49,61 @@ public function __construct($south, $west, $north, $east)
3749
$this->east = $east;
3850
}
3951

52+
/**
53+
* Returns the south bound.
54+
*
55+
* @return double
56+
*/
4057
public function getSouth()
4158
{
4259
return $this->south;
4360
}
4461

62+
/**
63+
* Returns the west bound.
64+
*
65+
* @return double
66+
*/
4567
public function getWest()
4668
{
4769
return $this->west;
4870
}
4971

72+
/**
73+
* Returns the north bound.
74+
*
75+
* @return double
76+
*/
5077
public function getNorth()
5178
{
5279
return $this->north;
5380
}
5481

82+
/**
83+
* Returns the east bound.
84+
*
85+
* @return double
86+
*/
5587
public function getEast()
5688
{
5789
return $this->east;
5890
}
5991

92+
/**
93+
* Returns whether or not bounds are defined
94+
*
95+
* @return bool
96+
*/
6097
public function isDefined()
6198
{
6299
return !empty($this->south) && !empty($this->east) && !empty($this->north) && !empty($this->west);
63100
}
64101

102+
/**
103+
* Returns an array with bounds.
104+
*
105+
* @return array
106+
*/
65107
public function toArray()
66108
{
67109
return [

src/Geocoder/Model/Coordinates.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@
1515
*/
1616
final class Coordinates
1717
{
18+
/**
19+
* @var double
20+
*/
1821
private $latitude;
1922

23+
/**
24+
* @var double
25+
*/
2026
private $longitude;
2127

2228
/**
@@ -29,11 +35,21 @@ public function __construct($latitude, $longitude)
2935
$this->longitude = $longitude;
3036
}
3137

38+
/**
39+
* Returns the latitude.
40+
*
41+
* @return double
42+
*/
3243
public function getLatitude()
3344
{
3445
return $this->latitude;
3546
}
3647

48+
/**
49+
* Returns the longitude.
50+
*
51+
* @return double
52+
*/
3753
public function getLongitude()
3854
{
3955
return $this->longitude;

src/Geocoder/Model/Country.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,18 @@
1515
*/
1616
final class Country
1717
{
18+
/**
19+
* @var string
20+
*/
1821
private $name;
1922

23+
/**
24+
* @var string
25+
*/
2026
private $code;
2127

2228
/**
29+
* @param string $name
2330
* @param string $code
2431
*/
2532
public function __construct($name, $code)
@@ -28,16 +35,31 @@ public function __construct($name, $code)
2835
$this->code = $code;
2936
}
3037

38+
/**
39+
* Returns the country name
40+
*
41+
* @return string
42+
*/
3143
public function getName()
3244
{
3345
return $this->name;
3446
}
3547

48+
/**
49+
* Returns the country ISO code.
50+
*
51+
* @return string
52+
*/
3653
public function getCode()
3754
{
3855
return $this->code;
3956
}
4057

58+
/**
59+
* Returns a string with the country name.
60+
*
61+
* @return array
62+
*/
4163
public function toString()
4264
{
4365
return $this->getName();

src/Geocoder/Model/County.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,18 @@
1515
*/
1616
final class County
1717
{
18+
/**
19+
* @var string
20+
*/
1821
private $name;
1922

23+
/**
24+
* @var string
25+
*/
2026
private $code;
2127

2228
/**
29+
* @param string $name
2330
* @param string $code
2431
*/
2532
public function __construct($name, $code)
@@ -28,16 +35,31 @@ public function __construct($name, $code)
2835
$this->code = $code;
2936
}
3037

38+
/**
39+
* Returns the country name
40+
*
41+
* @return string
42+
*/
3143
public function getName()
3244
{
3345
return $this->name;
3446
}
3547

48+
/**
49+
* Returns the county short name.
50+
*
51+
* @return string
52+
*/
3653
public function getCode()
3754
{
3855
return $this->code;
3956
}
4057

58+
/**
59+
* Returns a string with the county name.
60+
*
61+
* @return array
62+
*/
4163
public function toString()
4264
{
4365
return $this->getName();

src/Geocoder/Model/Region.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,18 @@
1515
*/
1616
final class Region
1717
{
18+
/**
19+
* @var string
20+
*/
1821
private $name;
1922

23+
/**
24+
* @var string
25+
*/
2026
private $code;
2127

2228
/**
29+
* @param string $name
2330
* @param string $code
2431
*/
2532
public function __construct($name, $code)
@@ -28,16 +35,31 @@ public function __construct($name, $code)
2835
$this->code = $code;
2936
}
3037

38+
/**
39+
* Returns the region name
40+
*
41+
* @return string
42+
*/
3143
public function getName()
3244
{
3345
return $this->name;
3446
}
3547

48+
/**
49+
* Returns the region short name.
50+
*
51+
* @return string
52+
*/
3653
public function getCode()
3754
{
3855
return $this->code;
3956
}
4057

58+
/**
59+
* Returns a string with the region name.
60+
*
61+
* @return array
62+
*/
4163
public function toString()
4264
{
4365
return $this->getName();

src/Geocoder/ProviderAggregator.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function getLimit()
9696
*
9797
* @param Provider $provider
9898
*
99-
* @return ProviderBasedGeocoder
99+
* @return ProviderAggregator
100100
*/
101101
public function registerProvider(Provider $provider)
102102
{
@@ -112,7 +112,7 @@ public function registerProvider(Provider $provider)
112112
*
113113
* @param Provider[] $providers
114114
*
115-
* @return ProviderBasedGeocoder
115+
* @return ProviderAggregator
116116
*/
117117
public function registerProviders(array $providers = [])
118118
{
@@ -128,7 +128,7 @@ public function registerProviders(array $providers = [])
128128
*
129129
* @param string $name
130130
*
131-
* @return ProviderBasedGeocoder
131+
* @return ProviderAggregator
132132
*/
133133
public function using($name)
134134
{

0 commit comments

Comments
 (0)