Dumplie\Customer\Infrastructure\InMemory\InMemoryProducts::getBySku PHP Method

getBySku() public method

public getBySku ( SKU $sku ) : Product
$sku Dumplie\SharedKernel\Domain\Product\SKU
return Dumplie\Customer\Domain\Product
    public function getBySku(SKU $sku) : Product
    {
        if (!array_key_exists((string) $sku, $this->products)) {
            throw ProductNotFoundException::bySku($sku);
        }
        return $this->products[(string) $sku];
    }
InMemoryProducts