| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | 2 | protected static function create(array $items, bool $acceptDuplicate): ItemBagInterface |
|
| 40 | { |
||
| 41 | 2 | $itemBag = new ItemBag(); |
|
| 42 | |||
| 43 | /** @var ItemInterface $item */ |
||
| 44 | 2 | foreach ($items as $item) { |
|
| 45 | 2 | if ($item instanceof ItemInterface) { |
|
| 46 | 2 | $itemBag->addItem($item, $acceptDuplicate); |
|
| 47 | } |
||
| 48 | } |
||
| 49 | |||
| 50 | 2 | return $itemBag; |
|
| 51 | } |
||
| 53 |