]> Raphaƫl G. Git Repositories - userbundle/blobdiff - Entity/Civility.php
Add user fixture
[userbundle] / Entity / Civility.php
index d1ccec37fe9b787d62f7337b65d2ed34cf254c21..e86b47e8b1ae614fa9aa7d3396f6e4ba129db13b 100644 (file)
@@ -22,22 +22,22 @@ use Rapsys\UserBundle\Entity\User;
  */
 class Civility {
        /**
  */
 class Civility {
        /**
-        * @var integer
+        * Primary key
         */
         */
-       protected int $id;
+       protected ?int $id = null;
 
        /**
 
        /**
-        * @var \DateTime
+        * Create datetime
         */
        protected \DateTime $created;
 
        /**
         */
        protected \DateTime $created;
 
        /**
-        * @var \DateTime
+        * Update datetime
         */
        protected \DateTime $updated;
 
        /**
         */
        protected \DateTime $updated;
 
        /**
-        * @var ArrayCollection
+        * Users collection
         */
        protected Collection $users;
 
         */
        protected Collection $users;
 
@@ -50,6 +50,8 @@ class Civility {
                //Set defaults
                $this->created = new \DateTime('now');
                $this->updated = new \DateTime('now');
                //Set defaults
                $this->created = new \DateTime('now');
                $this->updated = new \DateTime('now');
+
+               //Set collections
                $this->users = new ArrayCollection();
        }
 
                $this->users = new ArrayCollection();
        }
 
@@ -58,7 +60,7 @@ class Civility {
         *
         * @return integer
         */
         *
         * @return integer
         */
-       public function getId(): int {
+       public function getId(): ?int {
                return $this->id;
        }
 
                return $this->id;
        }