| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.0185 |
| Changes | 0 | ||
| 1 | <?php namespace Comodojo\RpcClient\Traits; |
||
| 46 | 24 | public function setProtocol($protocol) { |
|
| 47 | |||
| 48 | 24 | $proto = strtoupper($protocol); |
|
| 49 | |||
| 50 | 24 | if ( !in_array($proto, static::$supported_protocols) ){ |
|
| 51 | throw new Exception("Invalid RPC protocol"); |
||
| 52 | } |
||
| 53 | |||
| 54 | 24 | $this->protocol = $proto; |
|
| 55 | |||
| 56 | 24 | return $this; |
|
| 57 | |||
| 58 | } |
||
| 59 | |||
| 72 |