/**
* @param SKU $SKU
*
* @return Product
*
* @throws ProductNotFound - when product with given SKU were not found
*/
public function getBySku(SKU $SKU) : Product
{
if (isset($this->products[(string) $SKU])) {
return $this->products[(string) $SKU];
}
throw ProductNotFound::bySku($SKU);
}