public function get()
    {
        if ($this->store instanceof StoreInterface) {
            return $this->store;
        }

        $stores = $this
            ->storeRepository
            ->findAll();

        if (empty($stores)) {
            throw new StoreNotFoundException();
        }

        $this->store = reset($stores);

        return $this->store;
    }
public function get()
    {
        if ($this->store instanceof StoreInterface) {
            return $this->store;
        }

        $stores = $this
            ->storeRepository
            ->findAll();

        if (empty($stores)) {
            throw new StoreNotFoundException();
        }

        $this->store = reset($stores);

        return $this->store;
    }
public function get ( ) { if ( $ this -> store instanceof StoreInterface ) { return $ this -> store ; } $ stores = $ this -> storeRepository -> findAll ( ) ; if ( empty ( $ stores ) ) { throw new StoreNotFoundException ( ) ; } $ this -> store = reset ( $ stores ) ; return $ this -> store ; }
Load store.

@return StoreInterface $store Loaded store

@throws StoreNotFoundException Store not found
Load store .