From: Raphaƫl Gertz Date: Sat, 28 Aug 2021 07:54:43 +0000 (+0200) Subject: Add default values X-Git-Tag: 0.2.0~46 X-Git-Url: https://git.rapsys.eu/airbundle/commitdiff_plain/1b020b02e1d1fa56e737c8c5dbf5d7e5f48d587e?ds=inline;hp=8510be1ab5c41f41c1ef85ca801f62c19f017a10 Add default values Remove donate, profile and link attributes --- diff --git a/Entity/User.php b/Entity/User.php index 8a41601..1fb9f1a 100644 --- a/Entity/User.php +++ b/Entity/User.php @@ -23,12 +23,7 @@ class User extends BaseUser { /** * @var string */ - protected $donate; - - /** - * @var string - */ - protected $link; + protected $pseudonym; /** * @var string @@ -38,7 +33,7 @@ class User extends BaseUser { /** * @var string */ - protected $profile; + protected $slug; /** * @var ArrayCollection @@ -79,6 +74,11 @@ class User extends BaseUser { //Call parent constructor parent::__construct($mail); + //Set defaults + $this->pseudonym = null; + $this->phone = null; + $this->slug = null; + //Set collections $this->applications = new ArrayCollection(); $this->dances = new ArrayCollection(); @@ -89,47 +89,25 @@ class User extends BaseUser { } /** - * Set donate - * - * @param string $donate - * - * @return User - */ - public function setDonate(?string $donate): User { - $this->donate = $donate; - - return $this; - } - - /** - * Get donate - * - * @return string - */ - public function getDonate(): ?string { - return $this->donate; - } - - /** - * Set link + * Set pseudonym * - * @param string $link + * @param string $pseudonym * * @return User */ - public function setLink(?string $link): User { - $this->link = $link; + public function setPseudonym(?string $pseudonym): User { + $this->pseudonym = $pseudonym; return $this; } /** - * Get link + * Get pseudonym * * @return string */ - public function getLink(): ?string { - return $this->link; + public function getPseudonym(): ?string { + return $this->pseudonym; } /** @@ -155,25 +133,25 @@ class User extends BaseUser { } /** - * Set profile + * Set slug * - * @param string $profile + * @param string $slug * * @return User */ - public function setProfile(string $profile): User { - $this->profile = $profile; + public function setSlug(?string $slug): User { + $this->slug = $slug; return $this; } /** - * Get profile + * Get slug * * @return string */ - public function getProfile(): ?string { - return $this->profile; + public function getSlug(): ?string { + return $this->slug; } /**