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

FullFrameGuard   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 4
dl 0
loc 16
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 7 1
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