@@ -243,31 +243,31 @@ |
||
243 | 243 | $lines = \count($response); |
244 | 244 | foreach ($response as $key => $value) { |
245 | 245 | switch ($value) { |
246 | - case '!re': |
|
247 | - $i++; |
|
248 | - break; |
|
249 | - case '!fatal': |
|
250 | - $result = $response; |
|
251 | - break 2; |
|
252 | - case '!trap': |
|
253 | - case '!done': |
|
254 | - // Check for =ret=, .tag and any other following messages |
|
255 | - for ($j = $key + 1; $j <= $lines; $j++) { |
|
256 | - // If we have lines after current one |
|
257 | - if (isset($response[$j])) { |
|
258 | - $this->pregResponse($response[$j], $matches); |
|
259 | - if (isset($matches[1][0], $matches[2][0])) { |
|
260 | - $result['after'][$matches[1][0]] = $matches[2][0]; |
|
261 | - } |
|
262 | - } |
|
263 | - } |
|
264 | - break 2; |
|
265 | - default: |
|
266 | - $this->pregResponse($value, $matches); |
|
267 | - if (isset($matches[1][0], $matches[2][0])) { |
|
268 | - $result[$i][$matches[1][0]] = $matches[2][0]; |
|
269 | - } |
|
270 | - break; |
|
246 | + case '!re': |
|
247 | + $i++; |
|
248 | + break; |
|
249 | + case '!fatal': |
|
250 | + $result = $response; |
|
251 | + break 2; |
|
252 | + case '!trap': |
|
253 | + case '!done': |
|
254 | + // Check for =ret=, .tag and any other following messages |
|
255 | + for ($j = $key + 1; $j <= $lines; $j++) { |
|
256 | + // If we have lines after current one |
|
257 | + if (isset($response[$j])) { |
|
258 | + $this->pregResponse($response[$j], $matches); |
|
259 | + if (isset($matches[1][0], $matches[2][0])) { |
|
260 | + $result['after'][$matches[1][0]] = $matches[2][0]; |
|
261 | + } |
|
262 | + } |
|
263 | + } |
|
264 | + break 2; |
|
265 | + default: |
|
266 | + $this->pregResponse($value, $matches); |
|
267 | + if (isset($matches[1][0], $matches[2][0])) { |
|
268 | + $result[$i][$matches[1][0]] = $matches[2][0]; |
|
269 | + } |
|
270 | + break; |
|
271 | 271 | } |
272 | 272 | } |
273 | 273 | return $result; |
@@ -110,31 +110,31 @@ |
||
110 | 110 | $lines = \count($response); |
111 | 111 | foreach ($response as $key => $value) { |
112 | 112 | switch ($value) { |
113 | - case '!re': |
|
114 | - $i++; |
|
115 | - break; |
|
116 | - case '!fatal': |
|
117 | - $result = $response; |
|
118 | - break 2; |
|
119 | - case '!trap': |
|
120 | - case '!done': |
|
121 | - // Check for =ret=, .tag and any other following messages |
|
122 | - for ($j = $key + 1; $j <= $lines; $j++) { |
|
123 | - // If we have lines after current one |
|
124 | - if (isset($response[$j])) { |
|
125 | - $this->pregResponse($response[$j], $matches); |
|
126 | - if (isset($matches[1][0], $matches[2][0])) { |
|
127 | - $result['after'][$matches[1][0]] = $matches[2][0]; |
|
128 | - } |
|
129 | - } |
|
130 | - } |
|
131 | - break 2; |
|
132 | - default: |
|
133 | - $this->pregResponse($value, $matches); |
|
134 | - if (isset($matches[1][0], $matches[2][0])) { |
|
135 | - $result[$i][$matches[1][0]] = $matches[2][0]; |
|
136 | - } |
|
137 | - break; |
|
113 | + case '!re': |
|
114 | + $i++; |
|
115 | + break; |
|
116 | + case '!fatal': |
|
117 | + $result = $response; |
|
118 | + break 2; |
|
119 | + case '!trap': |
|
120 | + case '!done': |
|
121 | + // Check for =ret=, .tag and any other following messages |
|
122 | + for ($j = $key + 1; $j <= $lines; $j++) { |
|
123 | + // If we have lines after current one |
|
124 | + if (isset($response[$j])) { |
|
125 | + $this->pregResponse($response[$j], $matches); |
|
126 | + if (isset($matches[1][0], $matches[2][0])) { |
|
127 | + $result['after'][$matches[1][0]] = $matches[2][0]; |
|
128 | + } |
|
129 | + } |
|
130 | + } |
|
131 | + break 2; |
|
132 | + default: |
|
133 | + $this->pregResponse($value, $matches); |
|
134 | + if (isset($matches[1][0], $matches[2][0])) { |
|
135 | + $result[$i][$matches[1][0]] = $matches[2][0]; |
|
136 | + } |
|
137 | + break; |
|
138 | 138 | } |
139 | 139 | } |
140 | 140 | return $result; |