Lines
n/a
0 / 0
Functions and Methods
n/a
0 / 0
Classes and Traits
n/a
0 / 0
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Contracts\Store; | |
| 6 | ||
| 7 | use Stewart\Contracts\Exception\StoreException; | |
| 8 | ||
| 9 | interface ReadableStore | |
| 10 | { | |
| 11 | /** @throws StoreException */ | |
| 12 | public function has(string $key): bool; | |
| 13 | ||
| 14 | /** @throws StoreException */ | |
| 15 | public function getInt(string $key): ?int; | |
| 16 | ||
| 17 | /** @throws StoreException */ | |
| 18 | public function getFloat(string $key): ?float; | |
| 19 | ||
| 20 | /** @throws StoreException */ | |
| 21 | public function getString(string $key): ?string; | |
| 22 | ||
| 23 | /** @throws StoreException */ | |
| 24 | public function getBool(string $key): ?bool; | |
| 25 | ||
| 26 | /** | |
| 27 | * @template T of Storable | |
| 28 | * @param class-string<T> $class | |
| 29 | * @return T|null | |
| 30 | * @throws StoreException | |
| 31 | */ | |
| 32 | public function getObject(string $key, string $class): ?Storable; | |
| 33 | ||
| 34 | /** | |
| 35 | * @return list<string> | |
| 36 | * @throws StoreException | |
| 37 | */ | |
| 38 | public function listKeys(): array; | |
| 39 | } |