throw new SetGroupNotFoundException($groupId);
} /**
* @param LineItemQuantity[] $groupItems
*/
private function splitQuantities(array
$groupItems): LineItemQuantityCollection
{ $items =
[];
foreach ($groupItems as $item) { $cloneItem =
new LineItemQuantity($item->
getLineItemId(), 1
);
for ($i = 1;
$i <=
$item->
getQuantity(); ++
$i) { $items[] =
clone $cloneItem;
} } return new LineItemQuantityCollection($items);
} /**
* Gets a list of in-memory group definitions
* from the list of group settings from the payload
*
* @return LineItemGroupDefinition[]
*/