From 41f05211da7f18a8e3a0891e606e447e8f125ed9 Mon Sep 17 00:00:00 2001 From: Philipp Lang Date: Tue, 16 May 2023 16:09:26 +0200 Subject: [PATCH] Add switch --- src/Geolocatable.php | 2 +- src/HasGeolocation.php | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/Geolocatable.php b/src/Geolocatable.php index 92e6412..43ce4ac 100644 --- a/src/Geolocatable.php +++ b/src/Geolocatable.php @@ -8,5 +8,5 @@ interface Geolocatable public function getAddressForGeolocation(): ?Address; - public function destroyCoordinate(); + public function destroyCoordinate(): void; } diff --git a/src/HasGeolocation.php b/src/HasGeolocation.php index 9888118..b7a50b5 100644 --- a/src/HasGeolocation.php +++ b/src/HasGeolocation.php @@ -4,7 +4,7 @@ namespace Zoomyboy\Osm; trait HasGeolocation { - public static $geolocationEnabled = true; + public static bool $geolocationEnabled = true; public static function bootHasGeolocation(): void { @@ -25,12 +25,4 @@ trait HasGeolocation { static::$geolocationEnabled = true; } - - public function destroyCoordinate(): void - { - $this->updateQuietly([ - 'lat' => null, - 'lon' => null, - ]); - } }