LaravelBlocker   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 7 2
1
<?php
2
3
namespace jeremykenedy\LaravelBlocker\App\Http\Middleware;
4
5
use Closure;
6
use Illuminate\Http\Request;
7
use jeremykenedy\LaravelBlocker\App\Traits\LaravelCheckBlockedTrait;
8
9
class LaravelBlocker
10
{
11
    use LaravelCheckBlockedTrait;
0 ignored issues
show
introduced by
The trait jeremykenedy\LaravelBloc...aravelCheckBlockedTrait requires some properties which are not provided by jeremykenedy\LaravelBloc...ddleware\LaravelBlocker: $geoplugin_dmaCode, $geoplugin_continentCode, $geoplugin_areaCode, $geoplugin_longitude, $email, $geoplugin_countryCode, $geoplugin_countryName, $uri, $id, $geoplugin_region, $geoplugin_regionName, $geoplugin_city, $geoplugin_latitude, $geoplugin_currencyCode, $value
Loading history...
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
        if (config('laravelblocker.laravelBlockerEnabled')) {
0 ignored issues
show
Bug introduced by
The function config 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
        if (/** @scrutinizer ignore-call */ config('laravelblocker.laravelBlockerEnabled')) {
Loading history...
24
            LaravelCheckBlockedTrait::checkBlocked();
25
        }
26
27
        return $next($request);
28
    }
29
}
30