| Conditions | 4 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function processResponse($response, SoapClient $soapClient) |
||
| 31 | { |
||
| 32 | if ($response === false) { |
||
| 33 | $errors = $soapClient->getLastError(); |
||
| 34 | throw end($errors); |
||
| 35 | } |
||
| 36 | |||
| 37 | if ($response->getError()) { |
||
| 38 | $exceptionName = ExceptionMap::getException($response->getError()->getCode()); |
||
| 39 | throw new $exceptionName(); |
||
| 40 | } |
||
| 41 | |||
| 42 | if (!($response instanceof AbstractStructBase)) { |
||
| 43 | throw new PaazlException('Response is not a AbstructStructBase class'); |
||
| 44 | } |
||
| 45 | |||
| 46 | return $response; |
||
| 47 | } |
||
| 49 |