| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php namespace Comodojo\RpcServer\Introspection; |
||
| 34 | 15 | final public static function execute(Parameters $params) { |
|
| 35 | |||
| 36 | 15 | $asked_method = $params->get('method'); |
|
| 37 | |||
| 38 | 15 | $method = $params->methods()->get($asked_method); |
|
|
|
|||
| 39 | |||
| 40 | 15 | if ( is_null($method) ) throw new RpcException("Method not found", -32601); |
|
| 41 | |||
| 42 | 15 | $signatures = $method->getSignatures(); |
|
| 43 | |||
| 44 | 15 | return sizeof($signatures) == 1 ? $signatures[0] : $signatures; |
|
| 45 | |||
| 49 |