@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | $tables[$row['database']][$row['table']][$node] = $row; |
| 278 | 278 | } |
| 279 | 279 | $result['replicas'][$node] = $r; |
| 280 | - }catch (\Exception $E) { |
|
| 280 | + } catch (\Exception $E) { |
|
| 281 | 281 | $result['replicas'][$node] = false; |
| 282 | 282 | $badNodes[$node] = $E->getMessage(); |
| 283 | 283 | $this->error[] = 'statementsReplicas:' . $E->getMessage(); |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | ]; |
| 300 | 300 | } |
| 301 | 301 | |
| 302 | - }catch (\Exception $E) { |
|
| 302 | + } catch (\Exception $E) { |
|
| 303 | 303 | $result['clusters'][$node] = false; |
| 304 | 304 | |
| 305 | 305 | $this->error[] = 'clusters:' . $E->getMessage(); |
@@ -293,8 +293,9 @@ |
||
| 293 | 293 | |
| 294 | 294 | if (stripos($format, 'json') !== false) |
| 295 | 295 | { |
| 296 | - if (stripos($format,'JSONEachRow')===false) |
|
| 297 | - return $this->json(); |
|
| 296 | + if (stripos($format,'JSONEachRow')===false) { |
|
| 297 | + return $this->json(); |
|
| 298 | + } |
|
| 298 | 299 | } |
| 299 | 300 | return $this->body(); |
| 300 | 301 | |
@@ -228,8 +228,7 @@ discard block |
||
| 228 | 228 | if ($key=='data') |
| 229 | 229 | { |
| 230 | 230 | $data=$this->_rawData[$key]; |
| 231 | - } |
|
| 232 | - else{ |
|
| 231 | + } else{ |
|
| 233 | 232 | $this->{$key} = $this->_rawData[$key]; |
| 234 | 233 | } |
| 235 | 234 | |
@@ -249,8 +248,7 @@ discard block |
||
| 249 | 248 | if ($isJSONCompact) |
| 250 | 249 | { |
| 251 | 250 | $r[]=$rows; |
| 252 | - } |
|
| 253 | - else { |
|
| 251 | + } else { |
|
| 254 | 252 | foreach ($this->meta as $meta) { |
| 255 | 253 | $r[$meta['name']] = $rows[$meta['name']]; |
| 256 | 254 | } |
@@ -364,7 +362,9 @@ discard block |
||
| 364 | 362 | return null; |
| 365 | 363 | } |
| 366 | 364 | |
| 367 | - if (!$key) return $this->statistics; |
|
| 365 | + if (!$key) { |
|
| 366 | + return $this->statistics; |
|
| 367 | + } |
|
| 368 | 368 | |
| 369 | 369 | if (!isset($this->statistics[$key])) { |
| 370 | 370 | return null; |
@@ -685,8 +685,9 @@ |
||
| 685 | 685 | } |
| 686 | 686 | return $response; |
| 687 | 687 | } finally { |
| 688 | - if ($streamRW->isWrite()) |
|
| 689 | - fclose($stream); |
|
| 688 | + if ($streamRW->isWrite()) { |
|
| 689 | + fclose($stream); |
|
| 690 | + } |
|
| 690 | 691 | } |
| 691 | 692 | |
| 692 | 693 | |
@@ -118,8 +118,9 @@ |
||
| 118 | 118 | return str_replace(["\t", "\n"], ['\\t', '\\n'], $value); |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - if (!$skipEncode) |
|
| 122 | - $value = $this->encodeString($value, $enclosure_esc, $encode_esc); |
|
| 121 | + if (!$skipEncode) { |
|
| 122 | + $value = $this->encodeString($value, $enclosure_esc, $encode_esc); |
|
| 123 | + } |
|
| 123 | 124 | |
| 124 | 125 | return $enclosure . $value . $enclosure; |
| 125 | 126 | } |