Skip to content

Commit ac18653

Browse files
committed
Rephrase exception messages
Mainly remove 'Provider' keyword
1 parent 0e84a04 commit ac18653

30 files changed

+95
-93
lines changed

src/Geocoder/Provider/BingMaps.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getGeocodedData($address)
5858

5959
// This API doesn't handle IPs
6060
if (filter_var($address, FILTER_VALIDATE_IP)) {
61-
throw new UnsupportedOperation('The BingMapsProvider does not support IP addresses.');
61+
throw new UnsupportedOperation('The BingMaps does not support IP addresses.');
6262
}
6363

6464
$query = sprintf(self::GEOCODE_ENDPOINT_URL, $this->getMaxResults(), urlencode($address), $this->apiKey);

src/Geocoder/Provider/FreeGeoIp.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class FreeGeoIp extends AbstractProvider implements Provider
2929
public function getGeocodedData($address)
3030
{
3131
if (!filter_var($address, FILTER_VALIDATE_IP)) {
32-
throw new UnsupportedOperation('The FreeGeoIpProvider does not support Street addresses.');
32+
throw new UnsupportedOperation('The FreeGeoIp does not support Street addresses.');
3333
}
3434

3535
if (in_array($address, array('127.0.0.1', '::1'))) {
@@ -46,7 +46,7 @@ public function getGeocodedData($address)
4646
*/
4747
public function getReversedData(array $coordinates)
4848
{
49-
throw new UnsupportedOperation('The FreeGeoIpProvider is not able to do reverse geocoding.');
49+
throw new UnsupportedOperation('The FreeGeoIp is not able to do reverse geocoding.');
5050
}
5151

5252
/**

src/Geocoder/Provider/GeoIPs.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ public function getGeocodedData($address)
6464
}
6565

6666
if (!filter_var($address, FILTER_VALIDATE_IP)) {
67-
throw new UnsupportedOperation('The GeoIPsProvider does not support street addresses.');
67+
throw new UnsupportedOperation('The GeoIPs does not support street addresses.');
6868
}
6969

7070
// This API does not support IPv6
7171
if (filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
72-
throw new UnsupportedOperation('The GeoIPsProvider does not support IPv6 addresses.');
72+
throw new UnsupportedOperation('The GeoIPs does not support IPv6 addresses.');
7373
}
7474

7575
if ('127.0.0.1' === $address) {
@@ -86,7 +86,7 @@ public function getGeocodedData($address)
8686
*/
8787
public function getReversedData(array $coordinates)
8888
{
89-
throw new UnsupportedOperation('The GeoIPsProvider is not able to do reverse geocoding.');
89+
throw new UnsupportedOperation('The GeoIPs is not able to do reverse geocoding.');
9090
}
9191

9292
/**

src/Geocoder/Provider/GeoPlugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class GeoPlugin extends AbstractProvider implements Provider
2929
public function getGeocodedData($address)
3030
{
3131
if (!filter_var($address, FILTER_VALIDATE_IP)) {
32-
throw new UnsupportedOperation('The GeoPluginProvider does not support street addresses.');
32+
throw new UnsupportedOperation('The GeoPlugin does not support street addresses.');
3333
}
3434

3535
if (in_array($address, array('127.0.0.1', '::1'))) {
@@ -46,7 +46,7 @@ public function getGeocodedData($address)
4646
*/
4747
public function getReversedData(array $coordinates)
4848
{
49-
throw new UnsupportedOperation('The GeoPluginProvider is not able to do reverse geocoding.');
49+
throw new UnsupportedOperation('The GeoPlugin is not able to do reverse geocoding.');
5050
}
5151

5252
/**

src/Geocoder/Provider/Geoip.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ public function __construct()
3737
public function getGeocodedData($address)
3838
{
3939
if (!filter_var($address, FILTER_VALIDATE_IP)) {
40-
throw new UnsupportedOperation('The GeoipProvider does not support Street addresses.');
40+
throw new UnsupportedOperation('The Geoip does not support Street addresses.');
4141
}
4242

4343
// This API does not support IPv6
4444
if (filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
45-
throw new UnsupportedOperation('The GeoipProvider does not support IPv6 addresses.');
45+
throw new UnsupportedOperation('The Geoip does not support IPv6 addresses.');
4646
}
4747

4848
if ('127.0.0.1' === $address) {
@@ -76,7 +76,7 @@ public function getGeocodedData($address)
7676
*/
7777
public function getReversedData(array $coordinates)
7878
{
79-
throw new UnsupportedOperation('The GeoipProvider is not able to do reverse geocoding.');
79+
throw new UnsupportedOperation('The Geoip is not able to do reverse geocoding.');
8080
}
8181

8282
/**

src/Geocoder/Provider/Geonames.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function getGeocodedData($address)
5858

5959
// This API doesn't handle IPs
6060
if (filter_var($address, FILTER_VALIDATE_IP)) {
61-
throw new UnsupportedOperation('The GeonamesProvider does not support IP addresses.');
61+
throw new UnsupportedOperation('The Geonames does not support IP addresses.');
6262
}
6363

6464
$query = sprintf(self::GEOCODE_ENDPOINT_URL, urlencode($address), $this->getMaxResults(), $this->username);

src/Geocoder/Provider/GoogleMaps.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function getGeocodedData($address)
7070
// Google API returns invalid data if IP address given
7171
// This API doesn't handle IPs
7272
if (filter_var($address, FILTER_VALIDATE_IP)) {
73-
throw new UnsupportedOperation('The GoogleMapsProvider does not support IP addresses.');
73+
throw new UnsupportedOperation('The GoogleMaps does not support IP addresses.');
7474
}
7575

7676
$query = sprintf(

src/Geocoder/Provider/HostIp.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ class HostIp extends AbstractProvider implements Provider
2929
public function getGeocodedData($address)
3030
{
3131
if (!filter_var($address, FILTER_VALIDATE_IP)) {
32-
throw new UnsupportedOperation('The HostIpProvider does not support Street addresses.');
32+
throw new UnsupportedOperation('The HostIp does not support Street addresses.');
3333
}
3434

3535
// This API does not support IPv6
3636
if (filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
37-
throw new UnsupportedOperation('The HostIpProvider does not support IPv6 addresses.');
37+
throw new UnsupportedOperation('The HostIp does not support IPv6 addresses.');
3838
}
3939

4040
if ('127.0.0.1' === $address) {
@@ -51,7 +51,7 @@ public function getGeocodedData($address)
5151
*/
5252
public function getReversedData(array $coordinates)
5353
{
54-
throw new UnsupportedOperation('The HostIpProvider is not able to do reverse geocoding.');
54+
throw new UnsupportedOperation('The HostIp is not able to do reverse geocoding.');
5555
}
5656

5757
/**

src/Geocoder/Provider/IpInfoDb.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ public function getGeocodedData($address)
5151
}
5252

5353
if (!filter_var($address, FILTER_VALIDATE_IP)) {
54-
throw new UnsupportedOperation('The IpInfoDbProvider does not support Street addresses.');
54+
throw new UnsupportedOperation('The IpInfoDb does not support Street addresses.');
5555
}
5656

5757
// This API does not support IPv6
5858
if (filter_var($address, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {
59-
throw new UnsupportedOperation('The IpInfoDbProvider does not support IPv6 addresses.');
59+
throw new UnsupportedOperation('The IpInfoDb does not support IPv6 addresses.');
6060
}
6161

6262
if ('127.0.0.1' === $address) {
@@ -73,7 +73,7 @@ public function getGeocodedData($address)
7373
*/
7474
public function getReversedData(array $coordinates)
7575
{
76-
throw new UnsupportedOperation('The IpInfoDbProvider is not able to do reverse geocoding.');
76+
throw new UnsupportedOperation('The IpInfoDb is not able to do reverse geocoding.');
7777
}
7878

7979
/**

src/Geocoder/Provider/MapQuest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function getGeocodedData($address)
7474
{
7575
// This API doesn't handle IPs
7676
if (filter_var($address, FILTER_VALIDATE_IP)) {
77-
throw new UnsupportedOperation('The MapQuestProvider does not support IP addresses.');
77+
throw new UnsupportedOperation('The MapQuest does not support IP addresses.');
7878
}
7979

8080
if (null === $this->apiKey) {

0 commit comments

Comments
 (0)