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