/**
* {@inheritdoc}
*/
public function release(StockableInterface $stockable, $quantity)
{
Assert::greaterThan($quantity, 0, 'Quantity of units must be greater than 0.');
$this->dispatchEvent(SyliusStockableEvents::PRE_RELEASE, $stockable);
$stockable->setOnHold($stockable->getOnHold() - $quantity);
$this->dispatchEvent(SyliusStockableEvents::POST_RELEASE, $stockable);
}