Lines 100.00% 3 / 3
Functions and Methods 100.00% 3 / 3
Classes and Traits 100.00% 1 / 1
Name Lines Functions and Methods CRAP Classes and Traits
DisabledStores 100.00% 3 / 3 100.00% 3 / 3 3 100.00% 1 / 1
 openAppStore 100.00% 1 / 1 100.00% 1 / 1 1
 openGlobalStore 100.00% 1 / 1 100.00% 1 / 1 1
 openPeerStoreForReading 100.00% 1 / 1 100.00% 1 / 1 1
1<?php
2
3declare(strict_types=1);
4
5namespace Stewart\Store;
6
7use Stewart\Contracts\App\AppId;
8use Stewart\Contracts\Exception\StoreError;
9use Stewart\Contracts\Exception\StoreException;
10use Stewart\Contracts\Store\ReadableStore;
11use Stewart\Contracts\Store\Store;
12
13final readonly class DisabledStores implements Stores
14{
15    public function openAppStore(AppId $appId): Store
16    {
17        throw StoreException::createForReason(StoreError::NotConfigured);
18    }
19
20    public function openGlobalStore(): Store
21    {
22        throw StoreException::createForReason(StoreError::NotConfigured);
23    }
24
25    public function openPeerStoreForReading(AppId $appId): ReadableStore
26    {
27        throw StoreException::createForReason(StoreError::NotConfigured);
28    }
29}