| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 4 |
| CRAP Score | 3.3332 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 3 | protected function validateContractProtocol(array $contract) |
|
| 28 | { |
||
| 29 | 3 | if (!isset($contract['protocol'])) { |
|
| 30 | throw new \InvalidArgumentException('Unable to build Imposter; Invalid contract given; missing \'protocol\''); |
||
| 31 | } |
||
| 32 | 3 | if ($contract['protocol'] !== $this->protocol) { |
|
| 33 | throw new \InvalidArgumentException("Unable to build Imposter; expected contract protocol to be '{$this->protocol}'; got '{$contract['protocol']}'"); |
||
| 34 | } |
||
| 35 | } |
||
| 36 | } |