Total Lines | 70 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | interface EnsuranceInterface |
||
12 | { |
||
13 | /** |
||
14 | * @param mixed $value |
||
15 | * |
||
16 | * @return mixed |
||
17 | */ |
||
18 | public function then($value); |
||
19 | |||
20 | /** |
||
21 | * @param mixed $value |
||
22 | * |
||
23 | * @return mixed |
||
24 | */ |
||
25 | public function else($value); |
||
26 | |||
27 | /** |
||
28 | * @param mixed $default |
||
29 | * |
||
30 | * @return mixed |
||
31 | */ |
||
32 | public function get($default = null); |
||
33 | |||
34 | /** |
||
35 | * @return bool |
||
36 | */ |
||
37 | public function isEnsured(): bool; |
||
38 | |||
39 | /** |
||
40 | * @param string $message |
||
41 | * @param mixed ...$args |
||
42 | * |
||
43 | * @return mixed |
||
44 | */ |
||
|
|||
45 | public function orThrow(string $message, ...$args); |
||
46 | |||
47 | /** |
||
48 | * @return bool |
||
49 | */ |
||
50 | public function hasThrowable(): bool; |
||
51 | |||
52 | /** |
||
53 | * @param Throwable $throwable |
||
54 | * |
||
55 | * @return mixed |
||
56 | */ |
||
57 | public function setThrowable(Throwable $throwable); |
||
58 | |||
59 | /** |
||
60 | * @return Throwable|null |
||
61 | */ |
||
62 | public function getThrowable(): ?Throwable; |
||
63 | |||
64 | /** |
||
65 | * @return mixed |
||
66 | */ |
||
67 | public function disregardThrowable(); |
||
68 | |||
69 | /** |
||
70 | * @return Throwable|null |
||
71 | */ |
||
72 | public function releaseThrowable(): ?Throwable; |
||
73 | |||
74 | /** |
||
75 | * @param self $ensurance |
||
76 | * |
||
77 | * @return mixed |
||
78 | */ |
||
79 | public function transferEnsurance(self $ensurance); |
||
80 | } |
||
81 |