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