From: Raphaƫl Gertz Date: Wed, 11 Dec 2019 03:25:11 +0000 (+0100) Subject: Remove Title entity short field and related methods X-Git-Tag: 0.1.2~8 X-Git-Url: https://git.rapsys.eu/userbundle/commitdiff_plain/e21af741a42f006b9474700f2bff3de252e7ca36 Remove Title entity short field and related methods Add __toString magic method --- diff --git a/Entity/Title.php b/Entity/Title.php index 5a2b685..bcaf785 100644 --- a/Entity/Title.php +++ b/Entity/Title.php @@ -11,11 +11,6 @@ class Title { */ protected $id; - /** - * @var string - */ - protected $short; - /** * @var string */ @@ -52,28 +47,6 @@ class Title { return $this->id; } - /** - * Set short - * - * @param string $short - * - * @return Title - */ - public function setShort($short) { - $this->short = $short; - - return $this; - } - - /** - * Get short - * - * @return string - */ - public function getShort() { - return $this->short; - } - /** * Set title * @@ -170,4 +143,13 @@ class Title { public function getUsers() { return $this->users; } + + /** + * Returns a string representation of the title + * + * @return string + */ + public function __toString(): string { + return $this->title; + } } diff --git a/Resources/config/doctrine/Title.orm.yml b/Resources/config/doctrine/Title.orm.yml index 389e89d..85354a0 100644 --- a/Resources/config/doctrine/Title.orm.yml +++ b/Resources/config/doctrine/Title.orm.yml @@ -8,9 +8,6 @@ Rapsys\UserBundle\Entity\Title: options: unsigned: true fields: - short: - type: string - length: 4 title: type: string length: 16