Total Complexity | 7 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | trait TaxonAwareTrait |
||
18 | { |
||
19 | /** @var Collection|TaxonInterface[] */ |
||
20 | protected $taxonomies; |
||
21 | |||
22 | public function initializeTaxonCollection(): void |
||
23 | { |
||
24 | $this->taxonomies = new ArrayCollection(); |
||
25 | } |
||
26 | |||
27 | public function getTaxons(): Collection |
||
30 | } |
||
31 | |||
32 | public function hasTaxon(TaxonInterface $taxon): bool |
||
35 | } |
||
36 | |||
37 | public function addTaxon(TaxonInterface $taxon): void |
||
38 | { |
||
39 | if (false === $this->hasTaxon($taxon)) { |
||
40 | $this->taxonomies->add($taxon); |
||
41 | } |
||
42 | } |
||
43 | |||
44 | public function removeTaxon(TaxonInterface $taxon): void |
||
48 | } |
||
49 | } |
||
51 |