From 7c929ed199ece6713e03b943415cbf5b3f68e254 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Fri, 8 Mar 2024 02:57:46 +0100 Subject: [PATCH] Add location default values --- Entity/Location.php | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/Entity/Location.php b/Entity/Location.php index 75f6f45..f0e1a17 100644 --- a/Entity/Location.php +++ b/Entity/Location.php @@ -24,51 +24,11 @@ class Location { */ private ?int $id = null; - /** - * @var string - */ - private $title; - /** * @var string */ private ?string $description = null; - /** - * @var string - */ - private $address; - - /** - * @var string - */ - private $zipcode; - - /** - * @var string - */ - private $city; - - /** - * @var string - */ - private $latitude; - - /** - * @var string - */ - private $longitude; - - /** - * @var bool - */ - private $indoor; - - /** - * @var bool - */ - private $hotspot; - /** * Create datetime */ @@ -97,7 +57,7 @@ class Location { /** * Constructor */ - public function __construct() { + public function __construct(private string $title = '', private string $address = '', private string $zipcode = '', private string $city = '', private float $latitude = 0, private float $longitude = 0, private bool $hotspot = false, private bool $indoor = false) { //Set defaults $this->created = new \DateTime('now'); $this->updated = new \DateTime('now'); -- 2.41.0