@@ -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 | |
@@ -650,8 +650,9 @@ |
||
| 650 | 650 | } |
| 651 | 651 | return $response; |
| 652 | 652 | } finally { |
| 653 | - if ($streamRW->isWrite()) |
|
| 654 | - fclose($stream); |
|
| 653 | + if ($streamRW->isWrite()) { |
|
| 654 | + fclose($stream); |
|
| 655 | + } |
|
| 655 | 656 | } |
| 656 | 657 | |
| 657 | 658 | |
@@ -226,8 +226,7 @@ discard block |
||
| 226 | 226 | if ($key=='data') |
| 227 | 227 | { |
| 228 | 228 | $data=$this->_rawData[$key]; |
| 229 | - } |
|
| 230 | - else{ |
|
| 229 | + } else{ |
|
| 231 | 230 | $this->{$key} = $this->_rawData[$key]; |
| 232 | 231 | } |
| 233 | 232 | |
@@ -247,8 +246,7 @@ discard block |
||
| 247 | 246 | if ($isJSONCompact) |
| 248 | 247 | { |
| 249 | 248 | $r[]=$rows; |
| 250 | - } |
|
| 251 | - else { |
|
| 249 | + } else { |
|
| 252 | 250 | foreach ($this->meta as $meta) { |
| 253 | 251 | $r[$meta['name']] = $rows[$meta['name']]; |
| 254 | 252 | } |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | return preg_replace_callback($pattern, function($m) use ($binds){ |
| 93 | 93 | if(isset($binds[$m[1]])){ // If it exists in our array |
| 94 | 94 | return $binds[$m[1]]; // Then replace it from our array |
| 95 | - }else{ |
|
| 95 | + } else{ |
|
| 96 | 96 | return $m[0]; // Otherwise return the whole match (basically we won't change it) |
| 97 | 97 | } |
| 98 | 98 | }, $sql); |