| Total Complexity | 7 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class ProductionLine |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var Worker[] |
||
| 13 | */ |
||
| 14 | protected $workers; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param Worker[] $workers |
||
| 18 | */ |
||
| 19 | public function __construct(array $workers = []) |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | public function addWorker(Worker $worker): void |
||
| 29 | { |
||
| 30 | $this->workers[] = $worker; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function count(): int |
||
| 34 | { |
||
| 35 | return count($this->workers); |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return Worker[] |
||
| 40 | */ |
||
| 41 | public function getWorkers(): array |
||
| 42 | { |
||
| 43 | return $this->workers; |
||
| 44 | } |
||
| 45 | |||
| 46 | public function workOn(Element $element): void |
||
| 50 | } |
||
| 51 | } |
||
| 52 | } |
||
| 53 |