@@ -59,19 +59,19 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function __construct(array $connectParams, array $settings = []) |
61 | 61 | { |
62 | - if (! isset($connectParams['username'])) { |
|
62 | + if (!isset($connectParams['username'])) { |
|
63 | 63 | throw new \InvalidArgumentException('not set username'); |
64 | 64 | } |
65 | 65 | |
66 | - if (! isset($connectParams['password'])) { |
|
66 | + if (!isset($connectParams['password'])) { |
|
67 | 67 | throw new \InvalidArgumentException('not set password'); |
68 | 68 | } |
69 | 69 | |
70 | - if (! isset($connectParams['port'])) { |
|
70 | + if (!isset($connectParams['port'])) { |
|
71 | 71 | throw new \InvalidArgumentException('not set port'); |
72 | 72 | } |
73 | 73 | |
74 | - if (! isset($connectParams['host'])) { |
|
74 | + if (!isset($connectParams['host'])) { |
|
75 | 75 | throw new \InvalidArgumentException('not set host'); |
76 | 76 | } |
77 | 77 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | |
93 | 93 | // apply settings to transport class |
94 | 94 | $this->settings()->database('default'); |
95 | - if (! empty($settings)) { |
|
95 | + if (!empty($settings)) { |
|
96 | 96 | $this->settings()->apply($settings); |
97 | 97 | } |
98 | 98 | |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | */ |
199 | 199 | public function transport() |
200 | 200 | { |
201 | - if (! $this->transport) { |
|
201 | + if (!$this->transport) { |
|
202 | 202 | throw new \InvalidArgumentException('Empty transport class'); |
203 | 203 | } |
204 | 204 | |
@@ -266,8 +266,8 @@ discard block |
||
266 | 266 | */ |
267 | 267 | public function useSession(bool $useSessionId = false) |
268 | 268 | { |
269 | - if (! $this->settings()->getSessionId()) { |
|
270 | - if (! $useSessionId) { |
|
269 | + if (!$this->settings()->getSessionId()) { |
|
270 | + if (!$useSessionId) { |
|
271 | 271 | $this->settings()->makeSessionId(); |
272 | 272 | } else { |
273 | 273 | $this->settings()->session_id($useSessionId); |
@@ -381,14 +381,14 @@ discard block |
||
381 | 381 | */ |
382 | 382 | public function progressFunction(callable $callback) |
383 | 383 | { |
384 | - if (! is_callable($callback)) { |
|
384 | + if (!is_callable($callback)) { |
|
385 | 385 | throw new \InvalidArgumentException('Not is_callable progressFunction'); |
386 | 386 | } |
387 | 387 | |
388 | - if (! $this->settings()->is('send_progress_in_http_headers')) { |
|
388 | + if (!$this->settings()->is('send_progress_in_http_headers')) { |
|
389 | 389 | $this->settings()->set('send_progress_in_http_headers', 1); |
390 | 390 | } |
391 | - if (! $this->settings()->is('http_headers_progress_interval_ms')) { |
|
391 | + if (!$this->settings()->is('http_headers_progress_interval_ms')) { |
|
392 | 392 | $this->settings()->set('http_headers_progress_interval_ms', 100); |
393 | 393 | } |
394 | 394 | |
@@ -567,14 +567,14 @@ discard block |
||
567 | 567 | throw new QueryException('Queue must be empty, before insertBatch, need executeAsync'); |
568 | 568 | } |
569 | 569 | |
570 | - if (! in_array($format, self::SUPPORTED_FORMATS, true)) { |
|
570 | + if (!in_array($format, self::SUPPORTED_FORMATS, true)) { |
|
571 | 571 | throw new QueryException('Format not support in insertBatchFiles'); |
572 | 572 | } |
573 | 573 | |
574 | 574 | $result = []; |
575 | 575 | |
576 | 576 | foreach ($fileNames as $fileName) { |
577 | - if (! is_file($fileName) || ! is_readable($fileName)) { |
|
577 | + if (!is_file($fileName) || !is_readable($fileName)) { |
|
578 | 578 | throw new QueryException('Cant read file: ' . $fileName . ' ' . (is_file($fileName) ? '' : ' is not file')); |
579 | 579 | } |
580 | 580 | |
@@ -591,7 +591,7 @@ discard block |
||
591 | 591 | |
592 | 592 | // fetch resutl |
593 | 593 | foreach ($fileNames as $fileName) { |
594 | - if (! $result[$fileName]->isError()) { |
|
594 | + if (!$result[$fileName]->isError()) { |
|
595 | 595 | continue; |
596 | 596 | } |
597 | 597 | |
@@ -614,7 +614,7 @@ discard block |
||
614 | 614 | throw new QueryException('Queue must be empty, before insertBatch, need executeAsync'); |
615 | 615 | } |
616 | 616 | |
617 | - if (! in_array($format, self::SUPPORTED_FORMATS, true)) { |
|
617 | + if (!in_array($format, self::SUPPORTED_FORMATS, true)) { |
|
618 | 618 | throw new QueryException('Format not support in insertBatchFiles'); |
619 | 619 | } |
620 | 620 |