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 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Store; | |
| 6 | ||
| 7 | use Stewart\Contracts\App\AppId; | |
| 8 | use Stewart\Contracts\Exception\StoreError; | |
| 9 | use Stewart\Contracts\Exception\StoreException; | |
| 10 | use Stewart\Contracts\Store\ReadableStore; | |
| 11 | use Stewart\Contracts\Store\Store; | |
| 12 | ||
| 13 | final 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 | } |