Completed
Push — master ( 08597b...c6ec6e )
by ARCANEDEV
03:52
created

ImpersonateController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 17
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A stop() 0 10 2
1
<?php namespace Arcanesoft\Auth\Http\Controllers\Front;
2
3
use Arcanesoft\Auth\Helpers\UserImpersonator;
4
5
/**
6
 * Class     ImpersonateController
7
 *
8
 * @package  Arcanesoft\Auth\Http\Controllers\Front
9
 * @author   ARCANEDEV <[email protected]>
10
 */
11
class ImpersonateController extends Controller
12
{
13
    /* ------------------------------------------------------------------------------------------------
14
     |  Main Functions
15
     | ------------------------------------------------------------------------------------------------
16
     */
17
    public function stop()
18
    {
19
        if (UserImpersonator::isImpersonating()) {
20
            UserImpersonator::stop();
21
22
            return redirect()->to('/');
23
        }
24
25
        return self::pageNotFound();
26
    }
27
}
28