AuthProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
eloc 3
c 3
b 0
f 0
dl 0
loc 15
ccs 0
cts 3
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 5 1
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