Passed
Pull Request — master (#1558)
by Darko
12:16 queued 04:35
created

Logout   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 11
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 6 1
1
<?php
2
3
namespace App\Livewire\Actions;
4
5
use Illuminate\Support\Facades\Auth;
6
use Illuminate\Support\Facades\Session;
7
8
class Logout
9
{
10
    /**
11
     * Log the current user out of the application.
12
     */
13
    public function __invoke(): void
14
    {
15
        Auth::guard('web')->logout();
16
17
        Session::invalidate();
18
        Session::regenerateToken();
19
    }
20
}
21