Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public function validateRequiredFields(array $parameters) |
||
24 | { |
||
25 | $keys = array_intersect_key($parameters, array_flip($this->requiredFields)); |
||
26 | |||
27 | if (count($this->requiredFields) != count($keys)) { |
||
28 | throw new JsonRpcInvalidParamsException(); |
||
29 | } |
||
30 | |||
31 | if ($parameters['jsonrpc'] !== RpcRequest::VERSION) { |
||
32 | throw new JsonRpcUnsupportedProtocolException(); |
||
33 | } |
||
34 | } |
||
35 | } |