Skip to content

Commit 49d99e1

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents ac8fc8f + f6cac4b commit 49d99e1

File tree

2 files changed

+17
-19
lines changed

2 files changed

+17
-19
lines changed

src/Fields/Map.php

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ class Map extends Field
5757
* Main field config variables
5858
*/
5959
private array $mapConfig = [
60-
'autocomplete' => false,
61-
'autocompleteReverse' => false,
62-
'geolocate' => false,
63-
'geolocateLabel' => '',
64-
'draggable' => true,
65-
'clickable' => false,
66-
'defaultLocation' => [
60+
'autocomplete' => false,
61+
'autocompleteReverse' => false,
62+
'geolocate' => false,
63+
'geolocateLabel' => '',
64+
'draggable' => true,
65+
'clickable' => false,
66+
'defaultLocation' => [
6767
'lat' => 15.3419776,
6868
'lng' => 44.2171392,
6969
],
70-
'controls' => [],
71-
'drawingControl' => false,
72-
'drawingModes' => [
70+
'controls' => [],
71+
'drawingControl' => false,
72+
'drawingModes' => [
7373
'marker' => true,
7474
'circle' => true,
7575
'rectangle' => true,
@@ -231,7 +231,6 @@ public function getGeolocateLabel(): string
231231
/**
232232
* Add drawing controls to the map
233233
*
234-
* @param Closure|bool $drawingControl
235234
* @return $this
236235
*/
237236
public function drawingControl(Closure|bool $drawingControl = true): static
@@ -280,7 +279,6 @@ public function getDrawingField(): ?string
280279
* 'rectangle' => true,
281280
* ]
282281
*
283-
* @param Closure|array $drawingModes
284282
* @return $this
285283
*/
286284
public function drawingModes(Closure|array $drawingModes): static
@@ -424,6 +422,7 @@ public function getMapControls(): string
424422
$controls = $this->evaluate($this->mapControls);
425423

426424
return json_encode(array_merge($this->controls, $controls), JSON_THROW_ON_ERROR);
425+
427426
return json_encode(array_merge($this->controls, $controls), JSON_THROW_ON_ERROR);
428427
}
429428

@@ -539,7 +538,7 @@ public function mapsHasJs(): bool
539538

540539
public function mapsJsUrl(): string
541540
{
542-
$manifest = json_decode(file_get_contents(__DIR__ . '/../../dist/mix-manifest.json'), true);
541+
$manifest = json_decode(file_get_contents(__DIR__.'/../../dist/mix-manifest.json'), true);
543542

544543
return url($manifest['/cheesegrits/filament-google-maps/filament-google-maps.js']);
545544
}
@@ -551,7 +550,7 @@ public function mapsHasCss(): bool
551550

552551
public function mapsCssUrl(): string
553552
{
554-
$manifest = json_decode(file_get_contents(__DIR__ . '/../../dist/mix-manifest.json'), true);
553+
$manifest = json_decode(file_get_contents(__DIR__.'/../../dist/mix-manifest.json'), true);
555554

556555
return url($manifest['/cheesegrits/filament-google-maps/filament-google-maps.css']);
557556
}

src/Filters/RadiusFilter.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ class RadiusFilter extends BaseFilter
2929

3030
protected int|Closure|null $radius = null;
3131

32-
protected string | Closure | null $attribute = null;
33-
32+
protected string|Closure|null $attribute = null;
3433

3534
public function getColumns(): array|int|null
3635
{
@@ -83,8 +82,8 @@ public function apply(Builder $query, array $data = []): Builder
8382
// $sql = "((ACOS(SIN(? * PI() / 180) * SIN(" . $latName . " * PI() / 180) + COS(? * PI() / 180) * COS(" .
8483
// $latName . " * PI() / 180) * COS((? - " . $lngName . ") * PI() / 180)) * 180 / PI()) * 60 * ?) as distance";
8584

86-
$sql = "((ACOS(SIN($latitude * PI() / 180) * SIN(" . $latName . " * PI() / 180) + COS($latitude * PI() / 180) * COS(" .
87-
$latName . " * PI() / 180) * COS(($longitude - " . $lngName . ") * PI() / 180)) * 180 / PI()) * 60 * %f) < $distance";
85+
$sql = "((ACOS(SIN($latitude * PI() / 180) * SIN(".$latName." * PI() / 180) + COS($latitude * PI() / 180) * COS(".
86+
$latName." * PI() / 180) * COS(($longitude - ".$lngName.") * PI() / 180)) * 180 / PI()) * 60 * %f) < $distance";
8887

8988
$sql = sprintf($sql, $kilometers ? (1.1515 * 1.609344) : 1.1515);
9089

@@ -257,7 +256,7 @@ public function isRelationship(): bool
257256
return ! empty($this->getRelationship());
258257
}
259258

260-
public function attribute(string | Closure | null $name): static
259+
public function attribute(string|Closure|null $name): static
261260
{
262261
$this->attribute = $name;
263262

0 commit comments

Comments
 (0)