Conditions | 4 |
Paths | 3 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
18 | 8 | public function add(array $itemData): void |
|
19 | { |
||
20 | 8 | if (!empty($this->arguments[0]) && $this->arguments[0] instanceof Collection) { |
|
21 | 4 | foreach ($this->arguments as $argument) { |
|
22 | 4 | $argument->add($itemData); |
|
23 | } |
||
24 | } else { |
||
25 | 8 | $this->arguments[] = new Item($itemData, $this->config, true); |
|
26 | } |
||
27 | 8 | } |
|
28 | } |
||
29 |