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