| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 43 | public function pack(): PackedBoxList |
||
| 44 | { |
||
| 45 | $itemList = clone $this->items; |
||
| 46 | |||
| 47 | while (true) { |
||
| 48 | try { |
||
| 49 | return parent::pack(); |
||
| 50 | } catch (ItemTooLargeException $e) { |
||
| 51 | $this->unpackedItems->insert($e->getItem()); |
||
| 52 | $itemList->remove($e->getItem()); |
||
| 53 | $this->setItems($itemList); |
||
| 54 | } |
||
| 58 |