| Total Complexity | 5 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 18.18% |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | #[ORM\UniqueConstraint(name: 'unique_name', columns: ['name'])] |
||
| 20 | #[ORM\Entity(BookableTagRepository::class)] |
||
| 21 | class BookableTag extends AbstractModel |
||
| 22 | { |
||
| 23 | use HasColor; |
||
| 24 | use HasName; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var Collection<int, Bookable> |
||
| 28 | */ |
||
| 29 | #[ORM\ManyToMany(targetEntity: Bookable::class, inversedBy: 'bookableTags')] |
||
| 30 | private Collection $bookables; |
||
| 31 | |||
| 32 | 3 | public function __construct() |
|
| 35 | } |
||
| 36 | |||
| 37 | public function getBookables(): Collection |
||
| 38 | { |
||
| 39 | return $this->bookables; |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Add bookable. |
||
| 44 | */ |
||
| 45 | public function addBookable(Bookable $bookable): void |
||
| 50 | } |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Remove bookable. |
||
| 55 | */ |
||
| 56 | public function removeBookable(Bookable $bookable): void |
||
| 60 | } |
||
| 61 | } |
||
| 62 |