From: Raphaël Gertz Date: Sat, 28 Aug 2021 09:08:04 +0000 (+0200) Subject: Initialize all fields X-Git-Tag: 0.2.0~28 X-Git-Url: https://git.rapsys.eu/userbundle/commitdiff_plain/4410d36adc12ea31e92ae01163fd4d69238d501a?hp=92df56260494a1a27a5c509493200ac8594d50d8 Initialize all fields Cleanup --- diff --git a/Entity/Civility.php b/Entity/Civility.php index 4d2671a..9ec56e9 100644 --- a/Entity/Civility.php +++ b/Entity/Civility.php @@ -1,7 +1,7 @@ * @@ -51,7 +51,10 @@ class Civility { * @param string $title The civility name */ public function __construct(string $title) { + //Set defaults $this->title = $title; + $this->created = new \DateTime('now'); + $this->updated = new \DateTime('now'); $this->users = new ArrayCollection(); }