| Total Complexity | 5 | 
| Total Lines | 49 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 14 | trait ItemsTrait | ||
| 15 | { | ||
| 16 | /** @var ArrayCollection $items */ | ||
| 17 | protected $items; | ||
| 18 | |||
| 19 | /** @var int $total */ | ||
| 20 | protected $total = 0; | ||
| 21 | |||
| 22 | /** @var int $count */ | ||
| 23 | protected $count = 0; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * @param DtoInterface $dto | ||
| 27 | */ | ||
| 28 | public function addItem(DtoInterface $dto): void | ||
| 29 |     { | ||
| 30 | $this->items->add($dto); | ||
| 31 | } | ||
| 32 | |||
| 33 | /** | ||
| 34 | * @return int | ||
| 35 | */ | ||
| 36 | public function getTotal(): int | ||
| 37 |     { | ||
| 38 | return $this->total; | ||
| 39 | } | ||
| 40 | |||
| 41 | /** | ||
| 42 | * @param int $total | ||
| 43 | */ | ||
| 44 | public function setTotal(int $total): void | ||
| 47 | } | ||
| 48 | |||
| 49 | /** | ||
| 50 | * @return int | ||
| 51 | */ | ||
| 52 | public function getCount(): int | ||
| 55 | } | ||
| 56 | |||
| 57 | /** | ||
| 58 | * @param int $count | ||
| 59 | */ | ||
| 60 | public function setCount(int $count): void | ||
| 65 |