Total Complexity | 4 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class ActionResponse |
||
9 | { |
||
10 | public static function message(string $text, string $type = 'success') |
||
15 | ]); |
||
16 | } |
||
17 | |||
18 | public static function redirect(string $url) |
||
19 | { |
||
20 | return static::response('redirect', [ |
||
21 | 'content' => $url, |
||
22 | ]); |
||
23 | } |
||
24 | |||
25 | public static function openInNewTab(string $url) |
||
29 | ]); |
||
30 | } |
||
31 | |||
32 | protected static function response(string $action, array $data = []) |
||
39 |