| Total Complexity | 3 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 11 | trait Tagging |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var array |
||
| 15 | */ |
||
| 16 | private $tags = []; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @param string ...$tags |
||
| 20 | * @return bool |
||
| 21 | */ |
||
| 22 | public function hasTags(string ...$tags) : bool |
||
| 23 | { |
||
| 24 | return count(array_intersect($this->tags, $tags)) === count($tags); |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param string ...$tags |
||
| 29 | * @return self |
||
| 30 | */ |
||
| 31 | public function setTags(string ...$tags) : self |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return array |
||
| 39 | */ |
||
| 40 | public function getTags() : array |
||
| 45 |