From: Raphaƫl Gertz Date: Fri, 8 Mar 2024 00:15:07 +0000 (+0100) Subject: Add default values to class member variables X-Git-Tag: 0.4.0~32 X-Git-Url: https://git.rapsys.eu/airbundle/commitdiff_plain/3f4eae21e72bf3261fa8b939a50408de6b119f74?ds=inline Add default values to class member variables Cleanup --- diff --git a/Entity/User.php b/Entity/User.php index 7a82144..178bcec 100644 --- a/Entity/User.php +++ b/Entity/User.php @@ -17,31 +17,34 @@ use Doctrine\Common\Collections\ArrayCollection; use Rapsys\UserBundle\Entity\Civility; use Rapsys\UserBundle\Entity\User as BaseUser; +/** + * {@inheritdoc} + */ class User extends BaseUser { /** * City */ - private ?string $city; + private ?string $city = null; /** - * Phone + * Country */ - private ?string $phone; + private ?Country $country = null; /** - * Country + * Phone */ - private ?Country $country; + private ?string $phone = null; /** * Pseudonym */ - private ?string $pseudonym; + private ?string $pseudonym = null; /** * Zipcode */ - private ?string $zipcode; + private ?string $zipcode = null; /** * Applications collection @@ -93,13 +96,6 @@ class User extends BaseUser { //Call parent constructor parent::__construct($this->mail, $this->password, $this->civility, $this->forename, $this->surname, $this->active, $this->enable); - //Set defaults - $this->city = null; - $this->country = null; - $this->phone = null; - $this->pseudonym = null; - $this->zipcode = null; - //Set collections $this->applications = new ArrayCollection(); $this->dances = new ArrayCollection();