Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
24 | 2 | public function fingerprint(ServerRequestInterface $request): string |
|
25 | { |
||
26 | 2 | $id = ($this->receiver)($request); |
|
27 | |||
28 | /** @psalm-suppress DocblockTypeContradiction */ |
||
29 | 2 | if (!is_string($id) || '' === $id) { |
|
30 | 1 | throw new \InvalidArgumentException('The id must be a non-empty-string.'); |
|
31 | } |
||
32 | |||
33 | 1 | return $id; |
|
34 | } |
||
36 |