Skip to content

Commit 3676953

Browse files
cheesegritsgithub-actions[bot]
authored andcommitted
chore: fix code style
1 parent ce6d138 commit 3676953

File tree

3 files changed

+474
-477
lines changed

3 files changed

+474
-477
lines changed

resources/lang/en/fgm.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
'label' => 'Go To',
4949
],
5050
],
51-
'geolocate' => [
52-
'label' => 'Set Current Location',
53-
]
51+
'geolocate' => [
52+
'label' => 'Set Current Location',
53+
],
5454
];

src/Fields/Geocomplete.php

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ class Geocomplete extends Field implements CanBeLengthConstrained
3030
protected Closure|bool $isLocation = false;
3131

3232
protected Closure|bool $geocodeOnLoad = false;
33-
33+
3434
protected Closure|bool $geolocate = false;
35-
36-
protected Closure|string $geolocateIcon = 'heroicon-s-map';
35+
36+
protected Closure|string $geolocateIcon = 'heroicon-s-map';
3737

3838
protected Closure|array $reverseGeocode = [];
3939

@@ -163,40 +163,40 @@ public function getGeocodeOnLoad(): bool|null
163163
return $this->evaluate($this->geocodeOnLoad);
164164
}
165165

166-
/**
167-
* Adds a configurable suffix button to the field which requests the user's location, and if granted will reverse
168-
* geocode the resulting coordinates and fill the field with the formatted_address.
169-
*
170-
* @return $this
171-
*/
172-
public function geolocate(Closure|bool $geolocate = true): static
173-
{
174-
$this->geolocate = $geolocate;
175-
176-
return $this;
177-
}
178-
179-
public function getGeolocate(): bool|null
180-
{
181-
return $this->evaluate($this->geolocate);
182-
}
183-
184-
/**
185-
* Override the icon to use for the geolocate feature, defaults to heroicon-s-map
186-
*
187-
* @return $this
188-
*/
189-
public function geolocateIcon(Closure|string $geolocateIcon): static
190-
{
191-
$this->geolocateIcon = $geolocateIcon;
192-
193-
return $this;
194-
}
195-
196-
public function getGeolocateIcon(): string
197-
{
198-
return $this->evaluate($this->geolocateIcon);
199-
}
166+
/**
167+
* Adds a configurable suffix button to the field which requests the user's location, and if granted will reverse
168+
* geocode the resulting coordinates and fill the field with the formatted_address.
169+
*
170+
* @return $this
171+
*/
172+
public function geolocate(Closure|bool $geolocate = true): static
173+
{
174+
$this->geolocate = $geolocate;
175+
176+
return $this;
177+
}
178+
179+
public function getGeolocate(): bool|null
180+
{
181+
return $this->evaluate($this->geolocate);
182+
}
183+
184+
/**
185+
* Override the icon to use for the geolocate feature, defaults to heroicon-s-map
186+
*
187+
* @return $this
188+
*/
189+
public function geolocateIcon(Closure|string $geolocateIcon): static
190+
{
191+
$this->geolocateIcon = $geolocateIcon;
192+
193+
return $this;
194+
}
195+
196+
public function getGeolocateIcon(): string
197+
{
198+
return $this->evaluate($this->geolocateIcon);
199+
}
200200

201201
/**
202202
* Optionally provide an array of field names and format strings as key and value, if you would like the map to reverse geocode
@@ -283,19 +283,19 @@ public function getPlaceField(): string|null
283283
return $this->evaluate($this->placeField) ?? 'formatted_address';
284284
}
285285

286-
public function getSuffixAction(): ?Action
287-
{
288-
if ($this->getGeolocate()) {
289-
return Action::make('geolocate')
290-
->iconButton()
291-
->icon($this->getGeolocateIcon())
292-
->extraAttributes(['id' => $this->getId() . '-geolocate']);
293-
}
294-
295-
return null;
296-
}
297-
298-
protected function setUp(): void
286+
public function getSuffixAction(): ?Action
287+
{
288+
if ($this->getGeolocate()) {
289+
return Action::make('geolocate')
290+
->iconButton()
291+
->icon($this->getGeolocateIcon())
292+
->extraAttributes(['id' => $this->getId().'-geolocate']);
293+
}
294+
295+
return null;
296+
}
297+
298+
protected function setUp(): void
299299
{
300300
parent::setUp();
301301

0 commit comments

Comments
 (0)