Conditions | 2 |
Paths | 2 |
Total Lines | 25 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
27 | 2 | public function process() : string |
|
28 | { |
||
29 | 2 | $auth = new Auth($this->_request); |
|
30 | 2 | $auth->init(); |
|
31 | |||
32 | /* handle logout */ |
||
33 | |||
34 | 2 | if ($auth->logout()) |
|
35 | { |
||
36 | 1 | return $this->_success( |
|
37 | [ |
||
38 | 1 | 'route' => 'login', |
|
39 | 1 | 'timeout' => 0, |
|
40 | 1 | 'message' => $this->_language->get('logged_out'), |
|
41 | 1 | 'title' => $this->_language->get('goodbye') |
|
42 | ]); |
||
43 | } |
||
44 | |||
45 | /* handle error */ |
||
46 | |||
47 | 1 | return $this->_error( |
|
48 | [ |
||
49 | 1 | 'route' => 'login' |
|
50 | ]); |
||
51 | } |
||
52 | } |
||
53 |