]> Raphaƫl G. Git Repositories - userbundle/blobdiff - Entity/Group.php
Strict types
[userbundle] / Entity / Group.php
index d1550026cbdfc986c58f7b2066b333ec46b05fcc..13b16ef821049e9bcfa41682b038911d33cd2b7a 100644 (file)
@@ -22,22 +22,22 @@ use Rapsys\UserBundle\Entity\User;
  */
 class Group {
        /**
  */
 class Group {
        /**
-        * @var integer
+        * Primary key
         */
         */
-       protected int $id;
+       protected ?int $id = null;
 
        /**
 
        /**
-        * @var \DateTime
+        * Creation 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 Group {
                //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 Group {
         *
         * @return integer
         */
         *
         * @return integer
         */
-       public function getId(): int {
+       public function getId(): ?int {
                return $this->id;
        }
 
                return $this->id;
        }