Skip to content

Commit

Permalink
move invalid argument exception to same interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladyslav Yarysh authored and gabplch committed Dec 4, 2023
1 parent 845c70b commit a857120
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/BoundingBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace GeoJson;

use GeoJson\Exception\InvalidArgumentException;
use GeoJson\Exception\UnserializationException;
use InvalidArgumentException;
use JsonSerializable;

use function count;
Expand Down
9 changes: 9 additions & 0 deletions src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

namespace GeoJson\Exception;

class InvalidArgumentException extends \InvalidArgumentException implements Exception
{
}
2 changes: 1 addition & 1 deletion src/Feature/FeatureCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
use Countable;
use GeoJson\BoundingBox;
use GeoJson\CoordinateReferenceSystem\CoordinateReferenceSystem;
use GeoJson\Exception\InvalidArgumentException;
use GeoJson\GeoJson;
use InvalidArgumentException;
use IteratorAggregate;
use Traversable;

Expand Down
2 changes: 1 addition & 1 deletion src/Geometry/GeometryCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use Countable;
use GeoJson\BoundingBox;
use GeoJson\CoordinateReferenceSystem\CoordinateReferenceSystem;
use InvalidArgumentException;
use GeoJson\Exception\InvalidArgumentException;
use IteratorAggregate;
use Traversable;

Expand Down
2 changes: 1 addition & 1 deletion src/Geometry/LineString.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use GeoJson\BoundingBox;
use GeoJson\CoordinateReferenceSystem\CoordinateReferenceSystem;
use InvalidArgumentException;
use GeoJson\Exception\InvalidArgumentException;

use function count;

Expand Down
2 changes: 1 addition & 1 deletion src/Geometry/LinearRing.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use GeoJson\BoundingBox;
use GeoJson\CoordinateReferenceSystem\CoordinateReferenceSystem;
use InvalidArgumentException;
use GeoJson\Exception\InvalidArgumentException;

use function count;
use function end;
Expand Down
2 changes: 1 addition & 1 deletion src/Geometry/Point.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use GeoJson\BoundingBox;
use GeoJson\CoordinateReferenceSystem\CoordinateReferenceSystem;
use InvalidArgumentException;
use GeoJson\Exception\InvalidArgumentException;

use function count;
use function is_float;
Expand Down
2 changes: 1 addition & 1 deletion tests/BoundingBoxTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
namespace GeoJson\Tests;

use GeoJson\BoundingBox;
use GeoJson\Exception\InvalidArgumentException;
use GeoJson\Exception\UnserializationException;
use GeoJson\JsonUnserializable;
use InvalidArgumentException;
use PHPUnit\Framework\TestCase;
use stdClass;

Expand Down
2 changes: 1 addition & 1 deletion tests/Feature/FeatureCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

namespace GeoJson\Tests\Feature;

use GeoJson\Exception\InvalidArgumentException;
use GeoJson\Exception\UnserializationException;
use GeoJson\Feature\Feature;
use GeoJson\Feature\FeatureCollection;
use GeoJson\GeoJson;
use GeoJson\Geometry\Point;
use GeoJson\Tests\BaseGeoJsonTest;
use InvalidArgumentException;
use stdClass;

use function is_subclass_of;
Expand Down
2 changes: 1 addition & 1 deletion tests/Geometry/GeometryCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

namespace GeoJson\Tests\Geometry;

use GeoJson\Exception\InvalidArgumentException;
use GeoJson\Exception\UnserializationException;
use GeoJson\GeoJson;
use GeoJson\Geometry\Geometry;
use GeoJson\Geometry\GeometryCollection;
use GeoJson\Geometry\Point;
use GeoJson\Tests\BaseGeoJsonTest;
use InvalidArgumentException;
use stdClass;

use function is_subclass_of;
Expand Down
2 changes: 1 addition & 1 deletion tests/Geometry/LineStringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace GeoJson\Tests\Geometry;

use GeoJson\Exception\InvalidArgumentException;
use GeoJson\GeoJson;
use GeoJson\Geometry\LineString;
use GeoJson\Geometry\MultiPoint;
use GeoJson\Tests\BaseGeoJsonTest;
use InvalidArgumentException;

use function is_subclass_of;
use function json_decode;
Expand Down
2 changes: 1 addition & 1 deletion tests/Geometry/LinearRingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

namespace GeoJson\Tests\Geometry;

use GeoJson\Exception\InvalidArgumentException;
use GeoJson\GeoJson;
use GeoJson\Geometry\LinearRing;
use GeoJson\Geometry\LineString;
use GeoJson\Geometry\Point;
use GeoJson\Tests\BaseGeoJsonTest;
use InvalidArgumentException;

use function is_subclass_of;

Expand Down
2 changes: 1 addition & 1 deletion tests/Geometry/PointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

namespace GeoJson\Tests\Geometry;

use GeoJson\Exception\InvalidArgumentException;
use GeoJson\GeoJson;
use GeoJson\Geometry\Geometry;
use GeoJson\Geometry\Point;
use GeoJson\Tests\BaseGeoJsonTest;
use InvalidArgumentException;
use stdClass;

use function func_get_args;
Expand Down

0 comments on commit a857120

Please sign in to comment.