| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | 16 | public function add(array $itemData): void |
|
| 8 | { |
||
| 9 | 16 | if (!empty($this->arguments[0]) && $this->arguments[0] instanceof Collection) { |
|
| 10 | 8 | foreach ($this->arguments as $argument) { |
|
| 11 | 8 | $argument->add($itemData); |
|
| 12 | } |
||
| 13 | } else { |
||
| 14 | 16 | $this->arguments[] = new Item($itemData, $this->config, true); |
|
| 15 | } |
||
| 16 | 16 | } |
|
| 17 | |||
| 25 |