| Total Complexity | 2 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | trait HasColor |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | * |
||
| 12 | * @ORM\Column(type="string", length=7, options={"default" = ""})) |
||
| 13 | */ |
||
| 14 | private $color = ''; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Set color |
||
| 18 | * |
||
| 19 | * @API\Input(type="Color") |
||
| 20 | * |
||
| 21 | * @param string $color |
||
| 22 | */ |
||
| 23 | public function setColor(string $color): void |
||
| 24 | { |
||
| 25 | $this->color = $color; |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Get color |
||
| 30 | * |
||
| 31 | * @API\Field(type="Color") |
||
| 32 | * |
||
| 33 | * @return string |
||
| 34 | */ |
||
| 35 | public function getColor(): string |
||
| 38 | } |
||
| 39 | } |
||
| 40 |