Total Complexity | 3 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
7 | class ShapeNormalizer |
||
8 | { |
||
9 | /** |
||
10 | * @return array |
||
11 | */ |
||
12 | 1 | public function getRequestShapeDefinition() |
|
13 | { |
||
14 | return [ |
||
15 | 1 | 'type' => 'object', |
|
16 | 'required' => ['jsonrpc', 'method'], |
||
17 | 'properties' => [ |
||
18 | 'id' => [ |
||
19 | 'example' => 'req_id', |
||
20 | 'type' => 'string', |
||
21 | ], |
||
22 | 'jsonrpc' => [ |
||
23 | 'type' => 'string', |
||
24 | 'example' => '2.0', |
||
25 | ], |
||
26 | 'method' => ['type' => 'string'], |
||
27 | 'params' => ['title' => 'Method parameters'], |
||
28 | ], |
||
29 | ]; |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @return array |
||
34 | */ |
||
35 | 1 | public function getResponseShapeDefinition() |
|
51 | ], |
||
52 | ]; |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * @return array |
||
57 | */ |
||
58 | 1 | public function getErrorShapeDefinition() |
|
66 | ] |
||
67 | ]; |
||
70 |