ResponseXFrameHeaderMiddleware   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
1
<?php
2
3
namespace Distilleries\Expendable\Http\Middleware;
4
5
use Closure;
6
7
class ResponseXFrameHeaderMiddleware
8
{
9
    /**
10
     * Handle an incoming request.
11
     *
12
     * @param \Illuminate\Http\Request $request
13
     * @param \Closure $next
14
     * @return mixed
15
     */
16 162
    public function handle($request, Closure $next)
17
    {
18 162
        $response = $next($request);
19 154
        $response->headers->set('X-Frame-Options', 'SAMEORIGIN', false);
20
21 154
        return $response;
22
    }
23
24
}