Dumplie\Customer\Infrastructure\InMemory\InMemoryOrders::getById PHP Method

getById() public method

public getById ( OrderId $id ) : Order
$id Dumplie\Customer\Domain\OrderId
return Dumplie\Customer\Domain\Order
    public function getById(OrderId $id) : Order
    {
        if (!$this->exists($id)) {
            throw new OrderNotFoundException();
        }
        return $this->orders[(string) $id];
    }