| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 3.1852 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 44 | 3 | public function parseResponse(TelnetResponseInterface $response) |
|
| 45 | { |
||
| 46 | 3 | $errorCode = null; |
|
| 47 | 3 | $prompt = reset($response->getPromptMatches()); |
|
|
|
|||
| 48 | if ($response->isError()) { |
||
| 49 | // error prompt - ERROR nnn |
||
| 50 | $errorCode = substr($prompt, 6); |
||
| 51 | } |
||
| 52 | |||
| 53 | return new Dynamark3Response( |
||
| 54 | $prompt, |
||
| 55 | $errorCode |
||
| 56 | ); |
||
| 57 | } |
||
| 58 | } |
||
| 59 |