Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
11 | abstract class Guard implements GuardContract |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $exception; |
||
17 | |||
18 | /** |
||
19 | * The exception that gets thrown when the condition is satisfied. |
||
20 | * |
||
21 | * @return \Throwable |
||
22 | * @throws ResolveFailedException |
||
23 | */ |
||
24 | 2 | public function exception(): \Throwable |
|
25 | { |
||
26 | 2 | return $this->resolveException($this->exception); |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param $exception |
||
31 | * @return \Throwable |
||
32 | * @throws ResolveFailedException |
||
33 | */ |
||
34 | 2 | protected function resolveException($exception) :\Throwable |
|
45 | } |
||
46 | } |
||
47 |