File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace MatanYadaev \EloquentSpatial \Traits ;
4
4
5
- use MatanYadaev \EloquentSpatial \Objects \Geometry ;
6
5
use MatanYadaev \EloquentSpatial \SpatialBuilder ;
6
+ use MatanYadaev \EloquentSpatial \Objects \Geometry ;
7
7
8
8
trait HasSpatial
9
9
{
@@ -12,6 +12,9 @@ public function newEloquentBuilder($query): SpatialBuilder
12
12
return new SpatialBuilder ($ query );
13
13
}
14
14
15
+ /**
16
+ * @param array<string, mixed> $attributes
17
+ */
15
18
public function setRawAttributes (array $ attributes , $ sync = false )
16
19
{
17
20
$ result = parent ::setRawAttributes ($ attributes , $ sync );
Original file line number Diff line number Diff line change 136
136
$ serialized = serialize ($ testPlace );
137
137
$ json = json_encode ($ serialized );
138
138
139
+ expect ($ json )->toBeTruthy ('JSON enxoding failed. ' );
140
+
141
+ // @phpstan-ignore-next-line
139
142
$ recoveredTestPlace = unserialize (json_decode ($ json ));
140
143
141
144
expect ($ recoveredTestPlace )->toEqual ($ testPlace );
156
159
157
160
expect ($ json )->toBeTruthy ('JSON encoding failed. ' );
158
161
162
+ // @phpstan-ignore-next-line
159
163
$ recoveredTestPlace = unserialize (json_decode ($ json ));
160
164
161
165
expect ($ recoveredTestPlace )->toEqual ($ testPlaceFromDb );
You can’t perform that action at this time.
0 commit comments