@@ -46,7 +46,7 @@ trait SpatialTrait
4646 'equals ' ,
4747 'intersects ' ,
4848 'overlaps ' ,
49- 'touches '
49+ 'touches ' ,
5050 ];
5151
5252 /**
@@ -103,7 +103,7 @@ public function getSpatialFields()
103103
104104 public function isColumnAllowed ($ geometryColumn )
105105 {
106- if (! in_array ($ geometryColumn , $ this ->getSpatialFields ())) {
106+ if (!in_array ($ geometryColumn , $ this ->getSpatialFields ())) {
107107 throw new SpatialFieldsNotDefinedException ();
108108 }
109109
@@ -169,7 +169,7 @@ public function scopeDistanceSphereExcludingSelf($query, $geometryColumn, $geome
169169 $ query = $ this ->scopeDistanceSphere ($ query , $ geometryColumn , $ geometry , $ distance );
170170
171171 $ query ->whereRaw ("st_distance_sphere( $ geometryColumn, ST_GeomFromText(?)) != 0 " , [
172- $ geometry ->toWkt ()
172+ $ geometry ->toWkt (),
173173 ]);
174174
175175 return $ query ;
@@ -185,20 +185,20 @@ public function scopeDistanceSphereValue($query, $geometryColumn, $geometry)
185185 $ query ->select ('* ' );
186186 }
187187 $ query ->selectRaw ("st_distance_sphere(` $ geometryColumn`, ST_GeomFromText(?)) as distance " , [
188- $ geometry ->toWkt ()
188+ $ geometry ->toWkt (),
189189 ]);
190190 }
191191
192192 public function scopeComparison ($ query , $ geometryColumn , $ geometry , $ relationship )
193193 {
194194 $ this ->isColumnAllowed ($ geometryColumn );
195195
196- if (! in_array ($ relationship , $ this ->stRelations )) {
196+ if (!in_array ($ relationship , $ this ->stRelations )) {
197197 throw new UnknownSpatialRelationFunction ($ relationship );
198198 }
199199
200200 $ query ->whereRaw ("st_ {$ relationship }(` $ geometryColumn`, ST_GeomFromText(?)) " , [
201- $ geometry ->toWkt ()
201+ $ geometry ->toWkt (),
202202 ]);
203203
204204 return $ query ;
0 commit comments