src/Entity/Traits/NameMethodTrait.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Traits;
  3. /**
  4.  *
  5.  * @author wendell.zheng <wxzheng@ustc.edu.cn>
  6.  */
  7. trait NameMethodTrait
  8. {
  9.     public function getName(): string
  10.     {
  11.         return $this->name;
  12.     }
  13.     public function setName(string $name): void
  14.     {
  15.         $this->name $name;
  16.     }
  17.     public function __toString(): string
  18.     {
  19.         return $this->name;
  20.     }
  21. }