Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
23 | 1 | public function getKey(RpcRequestInterface $request) |
|
24 | { |
||
25 | $data = [ |
||
26 | 1 | 'method' => (string)$request->getMethod(), |
|
27 | 1 | 'params' => json_decode(json_encode($request->getParameters()), true), |
|
28 | 1 | ]; |
|
29 | |||
30 | 1 | $stringData = json_encode($data); |
|
31 | |||
32 | 1 | return $this->keyPrefix.sha1($stringData); |
|
33 | } |
||
34 | } |
||
35 |