Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public static function getCacheKey(RequestInterface $request) : string |
||
17 | { |
||
18 | $key = "{$request->getMethod()}|{$request->getUri()}|{$request->getBody()}"; |
||
19 | $map = [ |
||
20 | '{' => '_LBRACE_', |
||
21 | '}'=> '_RBRACE_', |
||
22 | '('=> '_LPAREN_', |
||
23 | ')'=> '_RPAREN_', |
||
24 | '/'=> '_FSLASH_', |
||
25 | '\\'=> '_BSLASH_', |
||
26 | '@'=> '_AT_', |
||
27 | ':'=> '_COLON_', |
||
28 | ]; |
||
29 | |||
30 | return str_replace(array_keys($map), $map, $key); |
||
31 | } |
||
32 | } |
||
33 |