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