Skip to content

Commit 4976d41

Browse files
committed
Various fixes thanks to Scrutinizer
1 parent 56e3800 commit 4976d41

25 files changed

+78
-16
lines changed

src/Geocoder/Adapter/GeoIP2Adapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
namespace Geocoder\Adapter;
1212

13+
use GeoIp2\ProviderInterface;
1314
use Geocoder\Exception\InvalidArgument;
1415
use Geocoder\Exception\UnsupportedOperation;
15-
use GeoIp2\ProviderInterface;
1616

1717
/**
1818
* @author Jens Wiese <jens@howtrueisfalse.de>

src/Geocoder/Model/Address.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ final class Address
7070
*/
7171
private $timezone;
7272

73+
/**
74+
* @param string $streetNumber
75+
* @param string $streetName
76+
* @param string $postalCode
77+
* @param string $locality
78+
* @param string $subLocality
79+
*/
7380
public function __construct(
7481
Coordinates $coordinates = null,
7582
Bounds $bounds = null,

src/Geocoder/Model/AddressFactory.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ private function readStringValue(array $data, $key)
7575
return $this->valueOrNull(\igorw\get_in($data, [ $key ]));
7676
}
7777

78+
/**
79+
* @return string
80+
*/
7881
private function valueOrNull($str)
7982
{
8083
return empty($str) ? null : $str;
@@ -98,6 +101,10 @@ private function upperize($str)
98101
return null;
99102
}
100103

104+
/**
105+
* @param double $latitude
106+
* @param double $longitude
107+
*/
101108
private function createCoordinates($latitude, $longitude)
102109
{
103110
if (null === $latitude || null === $longitude) {

src/Geocoder/Model/Country.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getCode()
5858
/**
5959
* Returns a string with the country name.
6060
*
61-
* @return array
61+
* @return string
6262
*/
6363
public function toString()
6464
{

src/Geocoder/Model/County.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getCode()
5858
/**
5959
* Returns a string with the county name.
6060
*
61-
* @return array
61+
* @return string
6262
*/
6363
public function toString()
6464
{

src/Geocoder/Model/Region.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getCode()
5858
/**
5959
* Returns a string with the region name.
6060
*
61-
* @return array
61+
* @return string
6262
*/
6363
public function toString()
6464
{

src/Geocoder/Provider/ArcGISOnline.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ private function buildQuery($query)
155155
return sprintf('%s&maxLocations=%d&f=%s&outFields=*', $query, $this->getLimit(), 'json');
156156
}
157157

158+
/**
159+
* @param string $query
160+
*/
158161
private function executeQuery($query)
159162
{
160163
$query = $this->buildQuery($query);

src/Geocoder/Provider/BingMaps.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ public function setLocale($locale)
112112
return $this;
113113
}
114114

115+
/**
116+
* @param string $query
117+
*/
115118
private function executeQuery($query)
116119
{
117120
if (null !== $this->getLocale()) {

src/Geocoder/Provider/Chain.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
namespace Geocoder\Provider;
1212

13-
use Geocoder\Exception\InvalidCredentials;
1413
use Geocoder\Exception\ChainNoResult;
14+
use Geocoder\Exception\InvalidCredentials;
1515

1616
/**
1717
* @author Markus Bachmann <markus.bachmann@bachi.biz>

src/Geocoder/Provider/FreeGeoIp.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ public function getName()
5757
return 'free_geo_ip';
5858
}
5959

60+
/**
61+
* @param string $query
62+
*/
6063
private function executeQuery($query)
6164
{
6265
$content = (string) $this->getAdapter()->get($query)->getBody();

0 commit comments

Comments
 (0)