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 ( 6122da...bfe9a2 )
by Freek
10:18 queued 11s
created

DefaultHasher::getHashFor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Spatie\ResponseCache\Hasher;
4
5
use Illuminate\Http\Request;
6
use Spatie\ResponseCache\CacheProfiles\CacheProfile;
7
8
class DefaultHasher implements RequestHasher
9
{
10
    protected CacheProfile $cacheProfile;
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
11
12
    public function __construct(CacheProfile $cacheProfile)
13
    {
14
        $this->cacheProfile = $cacheProfile;
15
    }
16
17
    public function getHashFor(Request $request): string
18
    {
19
        return 'responsecache-'.md5(
20
            "{$request->getHost()}-{$request->getRequestUri()}-{$request->getMethod()}/".$this->cacheProfile->useCacheNameSuffix($request)
21
        );
22
    }
23
}
24