Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2.0023 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
60 | 1 | private function extractResult($output) |
|
61 | { |
||
62 | 1 | $match = preg_match( |
|
63 | 1 | sprintf( |
|
64 | 1 | '/%s(?<result>.*)%s/s', |
|
65 | 1 | preg_quote(ExecuteCommand::START_RESULT), |
|
66 | 1 | preg_quote(ExecuteCommand::END_RESULT) |
|
67 | 1 | ), |
|
68 | 1 | $output, |
|
69 | $matches |
||
70 | 1 | ); |
|
71 | |||
72 | 1 | if (!$match) { |
|
73 | return; |
||
74 | } |
||
75 | |||
76 | 1 | return $matches['result']; |
|
77 | } |
||
78 | } |
||
79 |