Completed
Push — feature/va_scan_fixes ( ecc34c )
by Tristan
11:25
created

FullFrameGuard::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 7
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 2
1
<?php
2
namespace App\Http\Middleware;
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
4
5
class FullFrameGuard
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class FullFrameGuard
Loading history...
6
{
7
    /**
8
     * Set X-FRAME-OPTIONS header to DENY
9
     *
10
     * @param  \Illuminate\Http\Request  $request
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter type; 2 found
Loading history...
11
     * @param  \Closure  $next
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 17 spaces after parameter type; 2 found
Loading history...
12
     * @return mixed
0 ignored issues
show
Coding Style introduced by
Tag cannot be grouped with parameter tags in a doc comment
Loading history...
13
     */
14
    public function handle($request, Closure $next) {
0 ignored issues
show
Bug introduced by
The type App\Http\Middleware\Closure was not found. Did you mean Closure? If so, make sure to prefix the type with \.
Loading history...
15
16
        $response = $next($request);
17
18
        $response->headers->set('X-Frame-Options', 'DENY');
19
20
        return $response;
21
    }
22
}
23