AuthProvider::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 2
b 0
f 0
nc 1
nop 2
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Terranet\Administrator\Middleware;
4
5
use Closure;
6
use Illuminate\Http\Request;
7
8
/**
9
 * Class AuthProvider.
10
 */
11
class AuthProvider
12
{
13
    /**
14
     * Handle an incoming request.
15
     *
16
     * @param  Request $request
17
     * @param  Closure $next
18
     *
19
     * @return mixed
20
     */
21
    public function handle($request, Closure $next)
22
    {
23
        auth()->shouldUse('admin');
0 ignored issues
show
Bug introduced by
The function auth was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

23
        /** @scrutinizer ignore-call */ 
24
        auth()->shouldUse('admin');
Loading history...
24
25
        return $next($request);
26
    }
27
}
28