Completed
Push — master ( 5a5893...f6c5ff )
by Mahmoud
03:48
created

WebLogoutTask   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 29
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A run() 0 6 1
1
<?php
2
3
namespace App\Containers\Authentication\Tasks;
4
5
use Illuminate\Auth\AuthManager as Auth;
6
7
/**
8
 * Class WebLogoutTask.
9
 *
10
 * @author Mahmoud Zalt <[email protected]>
11
 */
12
class WebLogoutTask
13
{
14
15
    /**
16
     * @var  \Illuminate\Auth\AuthManager
17
     */
18
    private $auth;
19
20
    /**
21
     * WebAuthenticationTask constructor.
22
     *
23
     * @param \Illuminate\Auth\AuthManager $auth
24
     */
25
    public function __construct(Auth $auth)
26
    {
27
        $this->auth = $auth;
28
    }
29
30
    /**
31
     * @return  bool
32
     */
33
    public function run()
34
    {
35
        $this->auth->logout();
36
37
        return true;
38
    }
39
40
}
41