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