Total Complexity | 8 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
9 | final class Reactions |
||
10 | { |
||
11 | use BeforeReaction; |
||
12 | |||
13 | 2 | public function response(): Responder |
|
16 | } |
||
17 | |||
18 | 7 | public function redirect(): Redirector |
|
21 | } |
||
22 | |||
23 | 4 | public function weThrowNew(string $exception, string $message = '') |
|
24 | { |
||
25 | 4 | $this->commit(func_get_args(), 'exception'); |
|
26 | |||
27 | 4 | return new Then($this); |
|
28 | } |
||
29 | |||
30 | 2 | public function abort($code, string $message = '', array $headers = []) |
|
31 | { |
||
32 | 2 | $this->commit(func_get_args(), __FUNCTION__); |
|
33 | |||
34 | 2 | return new Then($this); |
|
35 | } |
||
36 | |||
37 | 1 | public function weRespondFrom($callback, array $parameters = []) |
|
38 | { |
||
39 | 1 | $this->commit(func_get_args(), 'respondFrom'); |
|
40 | |||
41 | 1 | return new Then($this); |
|
42 | } |
||
43 | |||
44 | 81 | public function weDenyAccess(string $message = '') |
|
49 | } |
||
50 | |||
51 | 93 | public function __destruct() |
|
52 | { |
||
53 | 93 | resolve(Chain::class)->submitChainConfig(); |
|
54 | 93 | } |
|
55 | |||
56 | 84 | private function commit($args, $methodName) |
|
59 | 84 | } |
|
60 | } |
||
61 |