Passed
Push — develop ( a751d7...a53779 )
by Septianata
03:31
created

AuthenticateOnVerifying::unauthenticated()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 6
ccs 0
cts 4
cp 0
crap 2
rs 10
1
<?php
2
3
namespace App\Http\Middleware;
4
5
use Illuminate\Auth\AuthenticationException;
6
use Illuminate\Support\Facades\Session;
7
8
class AuthenticateOnVerifying extends Authenticate
9
{
10
    /**
11
     * {@inheritDoc}
12
     */
13
    protected function unauthenticated($request, array $guards)
14
    {
15
        Session::flash('verifying', true);
16
17
        throw new AuthenticationException(
18
            'Unauthenticated.', $guards, $this->redirectTo($request)
19
        );
20
    }
21
}
22