@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | */ |
19 | 19 | public function get(string $key) |
20 | 20 | { |
21 | - if (! $this->isSet($key)) { |
|
21 | + if (!$this->isSet($key)) { |
|
22 | 22 | return null; |
23 | 23 | } |
24 | 24 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | public function getQueryableSettings(array $forcedSettings) : array |
101 | 101 | { |
102 | 102 | $settings = $this->settings; |
103 | - if (! empty($forcedSettings)) { |
|
103 | + if (!empty($forcedSettings)) { |
|
104 | 104 | $settings = $forcedSettings + $this->settings; |
105 | 105 | } |
106 | 106 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | */ |
127 | 127 | public function getSetting($name) |
128 | 128 | { |
129 | - if (! isset($this->settings[$name])) { |
|
129 | + if (!isset($this->settings[$name])) { |
|
130 | 130 | return null; |
131 | 131 | } |
132 | 132 |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | $new = $this->newRequest($extendinfo); |
221 | 221 | $new->url($url); |
222 | 222 | |
223 | - if (! $query_as_string) { |
|
223 | + if (!$query_as_string) { |
|
224 | 224 | $new->parameters_json($sql); |
225 | 225 | } |
226 | 226 | if ($this->getSettings()->isHttpCompressionEnabled()) { |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | $request = $this->newRequest($extendinfo); |
282 | 282 | $request->url($url); |
283 | 283 | |
284 | - $request->setCallbackFunction(function (CurlerRequest $request) { |
|
284 | + $request->setCallbackFunction(function(CurlerRequest $request) { |
|
285 | 285 | $handle = $request->getInfileHandle(); |
286 | 286 | if (is_resource($handle)) { |
287 | 287 | fclose($handle); |
@@ -338,17 +338,17 @@ discard block |
||
338 | 338 | if ($code == 200) { |
339 | 339 | $response = curl_multi_getcontent($handle); |
340 | 340 | $header_size = curl_getinfo($handle, CURLINFO_HEADER_SIZE); |
341 | - if (! $header_size) { |
|
341 | + if (!$header_size) { |
|
342 | 342 | return false; |
343 | 343 | } |
344 | 344 | |
345 | 345 | $header = substr($response, 0, $header_size); |
346 | - if (! $header_size) { |
|
346 | + if (!$header_size) { |
|
347 | 347 | return false; |
348 | 348 | } |
349 | 349 | $pos = strrpos($header, 'X-ClickHouse-Progress'); |
350 | 350 | |
351 | - if (! $pos) { |
|
351 | + if (!$pos) { |
|
352 | 352 | return false; |
353 | 353 | } |
354 | 354 | |
@@ -413,13 +413,13 @@ discard block |
||
413 | 413 | fwrite($fout, "\x1f\x8b\x08\x00\x00\x00\x00\x00"); |
414 | 414 | } |
415 | 415 | |
416 | - $request->setResultFileHandle($fout, $isGz)->setCallbackFunction(function (CurlerRequest $request) { |
|
416 | + $request->setResultFileHandle($fout, $isGz)->setCallbackFunction(function(CurlerRequest $request) { |
|
417 | 417 | fclose($request->getResultFileHandle()); |
418 | 418 | }); |
419 | 419 | } |
420 | 420 | } |
421 | 421 | if ($this->xClickHouseProgress !== null) { |
422 | - $request->setFunctionProgress(function ($x) { |
|
422 | + $request->setFunctionProgress(function($x) { |
|
423 | 423 | return $this->findXClickHouseProgress($x); |
424 | 424 | }); |
425 | 425 | } |
@@ -594,14 +594,14 @@ discard block |
||
594 | 594 | |
595 | 595 | try { |
596 | 596 | |
597 | - if (! is_callable($callable)) { |
|
597 | + if (!is_callable($callable)) { |
|
598 | 598 | if ($streamRW->isWrite()) { |
599 | 599 | |
600 | - $callable = function ($ch, $fd, $length) use ($stream) { |
|
600 | + $callable = function($ch, $fd, $length) use ($stream) { |
|
601 | 601 | return ($line = fread($stream, $length)) ? $line : ''; |
602 | 602 | }; |
603 | 603 | } else { |
604 | - $callable = function ($ch, $fd) use ($stream) { |
|
604 | + $callable = function($ch, $fd) use ($stream) { |
|
605 | 605 | return fwrite($stream, $fd); |
606 | 606 | }; |
607 | 607 | } |
@@ -551,7 +551,7 @@ |
||
551 | 551 | * @deprecated |
552 | 552 | * @return mixed[] |
553 | 553 | */ |
554 | - public function truncateTable( string $database_table, float $timeout = 2000) : array |
|
554 | + public function truncateTable(string $database_table, float $timeout = 2000) : array |
|
555 | 555 | { |
556 | 556 | $out = []; |
557 | 557 | list($db, $table) = explode('.', $database_table); |