From: Raphaƫl Gertz Date: Fri, 8 Mar 2024 01:57:46 +0000 (+0100) Subject: Add location default values X-Git-Tag: 0.4.0~12 X-Git-Url: https://git.rapsys.eu/.gitweb.cgi/airbundle/commitdiff_plain/7c929ed199ece6713e03b943415cbf5b3f68e254?ds=sidebyside;hp=ae0d339ee9f1003b9e9cea62f18c5859d8b87b54 Add location default values --- 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');