Authenticate   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 7 2
1
<?php
2
3
namespace PavelMironchik\LaravelBackupPanel\Http\Middleware;
4
5
use Closure;
6
use Illuminate\Http\Request;
7
use Illuminate\Http\Response;
8
use PavelMironchik\LaravelBackupPanel\LaravelBackupPanel;
9
10
class Authenticate
11
{
12
    /**
13
     * Handle the incoming request.
14
     *
15
     * @param  Request  $request
16
     * @param  Closure  $next
17
     * @return Response|void
18
     */
19
    public function handle($request, $next)
20
    {
21
        if (LaravelBackupPanel::check($request)) {
22
            return $next($request);
23
        }
24
25
        abort(403);
26
    }
27
}
28