| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | trait HasName |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | * @ORM\Column(type="string", length=191) |
||
| 17 | */ |
||
| 18 | private $name; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Constructor |
||
| 22 | * |
||
| 23 | * @param string $name |
||
| 24 | */ |
||
| 25 | public function __construct($name = '') |
||
| 26 | { |
||
| 27 | $this->setName($name); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Set name |
||
| 32 | * |
||
| 33 | * @param string $name |
||
| 34 | */ |
||
| 35 | public function setName($name): void |
||
| 36 | { |
||
| 37 | $this->name = $name; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Get name |
||
| 42 | * |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | public function getName(): string |
||
| 48 | } |
||
| 49 | } |
||
| 50 |