diff --git a/src/Traits/HasSpatial.php b/src/Traits/HasSpatial.php index 55108e5..d113d60 100644 --- a/src/Traits/HasSpatial.php +++ b/src/Traits/HasSpatial.php @@ -2,8 +2,8 @@ namespace MatanYadaev\EloquentSpatial\Traits; -use MatanYadaev\EloquentSpatial\Objects\Geometry; use MatanYadaev\EloquentSpatial\SpatialBuilder; +use MatanYadaev\EloquentSpatial\Objects\Geometry; trait HasSpatial { @@ -12,6 +12,9 @@ public function newEloquentBuilder($query): SpatialBuilder return new SpatialBuilder($query); } + /** + * @param array $attributes + */ public function setRawAttributes(array $attributes, $sync = false) { $result = parent::setRawAttributes($attributes, $sync); diff --git a/tests/GeometryCastTest.php b/tests/GeometryCastTest.php index 8187bf9..bd72948 100644 --- a/tests/GeometryCastTest.php +++ b/tests/GeometryCastTest.php @@ -136,6 +136,9 @@ $serialized = serialize($testPlace); $json = json_encode($serialized); + expect($json)->toBeTruthy('JSON enxoding failed.'); + + // @phpstan-ignore-next-line $recoveredTestPlace = unserialize(json_decode($json)); expect($recoveredTestPlace)->toEqual($testPlace); @@ -156,6 +159,7 @@ expect($json)->toBeTruthy('JSON encoding failed.'); + // @phpstan-ignore-next-line $recoveredTestPlace = unserialize(json_decode($json)); expect($recoveredTestPlace)->toEqual($testPlaceFromDb);