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