Total Complexity | 2 |
Total Lines | 13 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | final class LimitPerIp implements LimitPolicyInterface |
||
10 | { |
||
11 | 5 | public function fingerprint(ServerRequestInterface $request): string |
|
12 | { |
||
13 | 5 | return sha1(strtolower($request->getMethod() . $request->getUri()->getPath() . $this->getIp($request))); |
|
14 | } |
||
15 | |||
16 | 5 | private function getIp(ServerRequestInterface $request): string |
|
22 | } |
||
23 | } |
||
24 |