Skip to content

Commit 29ca799

Browse files
authored
Removed Exception suffix (#712)
1 parent 1603596 commit 29ca799

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/Common/Collection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
namespace Geocoder;
1414

1515
use Geocoder\Exception\CollectionIsEmpty;
16-
use Geocoder\Exception\OutOfBoundsException;
16+
use Geocoder\Exception\OutOfBounds;
1717

1818
/**
1919
* This is the interface that is always return from a Geocoder.
@@ -48,7 +48,7 @@ public function has(int $index): bool;
4848
/**
4949
* @return Location
5050
*
51-
* @throws OutOfBoundsException
51+
* @throws OutOfBounds
5252
*/
5353
public function get(int $index): Location;
5454

src/Common/Exception/OutOfBoundsException.php renamed to src/Common/Exception/OutOfBounds.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
/**
1414
* @author Tobias Nyholm <[email protected]>
1515
*/
16-
class OutOfBoundsException extends \OutOfBoundsException implements Exception
16+
class OutOfBounds extends \OutOfBoundsException implements Exception
1717
{
1818
}

src/Common/Model/AddressCollection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use Geocoder\Collection;
1616
use Geocoder\Exception\CollectionIsEmpty;
17-
use Geocoder\Exception\OutOfBoundsException;
17+
use Geocoder\Exception\OutOfBounds;
1818
use Geocoder\Location;
1919

2020
class AddressCollection implements Collection
@@ -90,7 +90,7 @@ public function has(int $index): bool
9090
public function get(int $index): Location
9191
{
9292
if (!isset($this->locations[$index])) {
93-
throw new OutOfBoundsException(sprintf('The index "%s" does not exist in this collection.', $index));
93+
throw new OutOfBounds(sprintf('The index "%s" does not exist in this collection.', $index));
9494
}
9595

9696
return $this->locations[$index];

src/Common/Model/AdminLevelCollection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use Geocoder\Exception\CollectionIsEmpty;
1616
use Geocoder\Exception\InvalidArgument;
17-
use Geocoder\Exception\OutOfBoundsException;
17+
use Geocoder\Exception\OutOfBounds;
1818

1919
/**
2020
* @author Giorgio Premi <[email protected]>
@@ -132,7 +132,7 @@ public function all(): array
132132
private function checkLevel(int $level)
133133
{
134134
if ($level <= 0 || $level > self::MAX_LEVEL_DEPTH) {
135-
throw new OutOfBoundsException(
135+
throw new OutOfBounds(
136136
sprintf('Administrative level should be an integer in [1,%d], %d given', self::MAX_LEVEL_DEPTH, $level)
137137
);
138138
}

0 commit comments

Comments
 (0)