GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 42a25e...777e0d )
by Freek
05:28
created

DoNotCacheResponse   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 17
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 6 1
1
<?php
2
3
namespace Spatie\ResponseCache\Middlewares;
4
5
use Closure;
6
use Illuminate\Http\Request;
7
8
class DoNotCacheResponse
9
{
10
    /**
11
     * Handle an incoming request.
12
     *
13
     * @param \Illuminate\Http\Request $request
14
     * @param \Closure $next
15
     *
16
     * @return mixed
17
     */
18
    public function handle(Request $request, Closure $next)
19
    {
20
        $request->attributes->add(['responsecache.doNotCache' => true]);
21
22
        return $next($request);
23
    }
24
}
25