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
3declare(strict_types=1);
4
5namespace Stewart\Contracts\Store;
6
7use Stewart\Contracts\Exception\StoreException;
8use Stewart\Contracts\Exception\TimeException;
9use Stewart\Contracts\Time\Duration;
10
11interface Store extends ReadableStore
12{
13    /**
14     * @throws StoreException
15     * @throws TimeException
16     */
17    public function set(string $key, bool|int|float|string|Storable $value, ?Duration $ttl = null): void;
18
19    /** @throws StoreException */
20    public function increment(string $key, int $by = 1): int;
21
22    /** @throws StoreException */
23    public function delete(string $key): void;
24
25    /** @throws StoreException */
26    public function clear(): void;
27}