Skip to content

Commit 7f99f56

Browse files
committed
!fixup 5397ebd
1 parent 5397ebd commit 7f99f56

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Traits/HasSpatial.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace MatanYadaev\EloquentSpatial\Traits;
44

5-
use MatanYadaev\EloquentSpatial\Objects\Geometry;
65
use MatanYadaev\EloquentSpatial\SpatialBuilder;
6+
use MatanYadaev\EloquentSpatial\Objects\Geometry;
77

88
trait HasSpatial
99
{
@@ -12,6 +12,9 @@ public function newEloquentBuilder($query): SpatialBuilder
1212
return new SpatialBuilder($query);
1313
}
1414

15+
/**
16+
* @param array<string, mixed> $attributes
17+
*/
1518
public function setRawAttributes(array $attributes, $sync = false)
1619
{
1720
$result = parent::setRawAttributes($attributes, $sync);

tests/GeometryCastTest.php

+4
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@
136136
$serialized = serialize($testPlace);
137137
$json = json_encode($serialized);
138138

139+
expect($json)->toBeTruthy('JSON enxoding failed.');
140+
141+
// @phpstan-ignore-next-line
139142
$recoveredTestPlace = unserialize(json_decode($json));
140143

141144
expect($recoveredTestPlace)->toEqual($testPlace);
@@ -156,6 +159,7 @@
156159

157160
expect($json)->toBeTruthy('JSON encoding failed.');
158161

162+
// @phpstan-ignore-next-line
159163
$recoveredTestPlace = unserialize(json_decode($json));
160164

161165
expect($recoveredTestPlace)->toEqual($testPlaceFromDb);

0 commit comments

Comments
 (0)