@@ -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 | |
@@ -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 | } |
@@ -379,7 +379,9 @@ |
||
| 379 | 379 | return null; |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | - if (!$key) return $this->statistics; |
|
| 382 | + if (!$key) { |
|
| 383 | + return $this->statistics; |
|
| 384 | + } |
|
| 383 | 385 | |
| 384 | 386 | if (!isset($this->statistics[$key])) { |
| 385 | 387 | return null; |
@@ -743,7 +743,9 @@ |
||
| 743 | 743 | public function ping(bool $throwException=false): bool |
| 744 | 744 | { |
| 745 | 745 | $result=$this->transport()->ping(); |
| 746 | - if ($throwException && !$result) throw new TransportException('Can`t ping server'); |
|
| 746 | + if ($throwException && !$result) { |
|
| 747 | + throw new TransportException('Can`t ping server'); |
|
| 748 | + } |
|
| 747 | 749 | return $result; |
| 748 | 750 | } |
| 749 | 751 | |