VisitsCounter   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 7 2
1
<?php namespace jlourenco\base\Middleware;
2
3
use Closure;
4
use Sentinel;
5
use Redirect;
6
use Base;
7
8
class VisitsCounter
9
{
10
11
    /**
12
     * Handle an incoming request.
13
     *
14
     * @param  \Illuminate\Http\Request  $request
15
     * @param  \Closure  $next
16
     * @return mixed
17
     */
18
    public function handle($request, Closure $next)
19
    {
20
        if (config('jlourenco.base.VisitCounter'))
21
            Base::RegisterVisit();
22
23
        return $next($request);
24
    }
25
26
}
27