Test Failed
Push — master ( fddcfc...5cf65e )
by Philippe
09:09 queued 01:05
created

MonitorMiddleware   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 7 2
1
<?php
2
3
namespace Thinktomorrow\Chief\HealthMonitor\Middleware;
4
5
use Closure;
6
use Illuminate\Support\Facades\Auth;
7
use Thinktomorrow\Chief\HealthMonitor\Monitor;
8
9
class MonitorMiddleware
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 ($request->isMethod('get')) {
21
            Monitor::check();
22
        }
23
24
        return $next($request);
25
    }
26
}
27