Total Complexity | 7 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
10 | trait VendorsTrait |
||
11 | { |
||
12 | /** @var Collection|VendorInterface[] */ |
||
13 | protected $vendors; |
||
14 | |||
15 | public function __construct() |
||
16 | { |
||
17 | $this->vendors = new ArrayCollection(); |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * @return Collection|VendorInterface[] |
||
22 | */ |
||
23 | public function getVendors(): Collection |
||
24 | { |
||
25 | return $this->vendors; |
||
26 | } |
||
27 | |||
28 | /** |
||
29 | * @param VendorInterface $vendor |
||
30 | * @return bool |
||
31 | */ |
||
32 | public function hasVendor(VendorInterface $vendor): bool |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * @param VendorInterface $vendor |
||
39 | */ |
||
40 | public function addVendor(VendorInterface $vendor): void |
||
44 | } |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @param VendorInterface $vendor |
||
49 | */ |
||
50 | public function removeVendor(VendorInterface $vendor): void |
||
57 |