Passed
Pull Request — master (#90)
by Šimon
04:05
created
src/Client.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
      * @return mixed
590 590
      * @throws Exception\TransportException
591 591
      */
592
-    public function insertBatchTSVFiles($table_name, $file_names, $columns_array=[])
592
+    public function insertBatchTSVFiles($table_name, $file_names, $columns_array = [])
593 593
     {
594 594
         return $this->insertBatchFiles($table_name, $file_names, $columns_array, 'TabSeparated');
595 595
     }
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
      * @return array
605 605
      * @throws Exception\TransportException
606 606
      */
607
-    public function insertBatchFiles($table_name, $file_names, $columns_array=[], $format = "CSV")
607
+    public function insertBatchFiles($table_name, $file_names, $columns_array = [], $format = "CSV")
608 608
     {
609 609
         if (is_string($file_names))
610 610
         {
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
      * @param string $format ['TabSeparated','TabSeparatedWithNames','CSV','CSVWithNames']
660 660
      * @return Transport\CurlerRequest
661 661
      */
662
-    public function insertBatchStream($table_name, $columns_array=[], $format = "CSV")
662
+    public function insertBatchStream($table_name, $columns_array = [], $format = "CSV")
663 663
     {
664 664
         if ($this->getCountPendingQueue() > 0) {
665 665
             throw new QueryException('Queue must be empty, before insertBatch, need executeAsync');
@@ -693,12 +693,12 @@  discard block
 block discarded – undo
693 693
      * @return Statement
694 694
      * @throws Exception\TransportException
695 695
      */
696
-    public function streamWrite(Stream $stream,$sql,$bind=[])
696
+    public function streamWrite(Stream $stream, $sql, $bind = [])
697 697
     {
698 698
         if ($this->getCountPendingQueue() > 0) {
699 699
             throw new QueryException('Queue must be empty, before streamWrite');
700 700
         }
701
-        return $this->transport()->streamWrite($stream,$sql,$bind);
701
+        return $this->transport()->streamWrite($stream, $sql, $bind);
702 702
     }
703 703
 
704 704
 
@@ -711,12 +711,12 @@  discard block
 block discarded – undo
711 711
      * @return Statement
712 712
      * @throws Exception\TransportException
713 713
      */
714
-    public function streamRead(Stream $streamRead,$sql,$bind=[])
714
+    public function streamRead(Stream $streamRead, $sql, $bind = [])
715 715
     {
716 716
         if ($this->getCountPendingQueue() > 0) {
717 717
             throw new QueryException('Queue must be empty, before streamWrite');
718 718
         }
719
-        return $this->transport()->streamRead($streamRead,$sql,$bind);
719
+        return $this->transport()->streamRead($streamRead, $sql, $bind);
720 720
     }
721 721
 
722 722
     /**
@@ -838,8 +838,8 @@  discard block
 block discarded – undo
838 838
     public function partitions(string $table, int $limit = null, bool $active = null)
839 839
     {
840 840
         $database = $this->settings()->getDatabase();
841
-        $whereActiveClause = $active===null ? '' : sprintf(' AND active = %s', (int) $active);
842
-        $limitClause=$limit !== null ? ' LIMIT ' . $limit : '';
841
+        $whereActiveClause = $active === null ? '' : sprintf(' AND active = %s', (int) $active);
842
+        $limitClause = $limit !== null ? ' LIMIT ' . $limit : '';
843 843
 
844 844
         return $this->select(<<<CLICKHOUSE
845 845
 SELECT *
@@ -919,12 +919,12 @@  discard block
 block discarded – undo
919 919
      * @return array
920 920
      * @throws Exception\TransportException
921 921
      */
922
-    public function getServerSystemSettings($like='')
922
+    public function getServerSystemSettings($like = '')
923 923
     {
924
-        $l=[];
925
-        $list=$this->select('SELECT * FROM system.settings'.($like ? ' WHERE name LIKE :like':'' ),['like'=>'%'.$like.'%'])->rows();
924
+        $l = [];
925
+        $list = $this->select('SELECT * FROM system.settings' . ($like ? ' WHERE name LIKE :like' : ''), ['like'=>'%' . $like . '%'])->rows();
926 926
         foreach ($list as $row) {
927
-            if (isset($row['name'])) {$n=$row['name']; unset($row['name']) ; $l[$n]=$row;}
927
+            if (isset($row['name'])) {$n = $row['name']; unset($row['name']); $l[$n] = $row; }
928 928
         }
929 929
         return $l;
930 930
     }
Please login to merge, or discard this patch.