Completed
Push — master ( c8c0f9...82094b )
by Maxime
19:00
created

XSS   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 2
dl 0
loc 22
ccs 0
cts 9
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 16 1
1
<?php namespace Distilleries\Expendable\Http\Middleware;
2
3
use Closure;
4
use Distilleries\Expendable\Helpers\Security;
5
use Illuminate\Http\Request;
6
7
class XSS
8
9
{
0 ignored issues
show
Coding Style introduced by
Opening brace of a class must be on the line following the class declaration; found 1 line(s)
Loading history...
10
11
    public function handle(Request $request, Closure $next)
12
    {
13
14
        $input = $request->all();
15
16
        array_walk_recursive($input, function (&$input) {
17
18
            $input = (new Security)->xss_clean($input);
19
20
        });
21
22
        $request->merge($input);
23
24
        return $next($request);
25
26
    }
27
28
}