Completed
Pull Request — master (#28)
by Lars
01:43
created
src/voku/db/ActiveRecord.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace voku\db;
6 6
 
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
     $value = $this->_filterParam($this->dirty);
584 584
     $this->insert = new ActiveRecordExpressions(
585 585
         array(
586
-            'operator' => 'INSERT INTO ' . $this->table,
586
+            'operator' => 'INSERT INTO '.$this->table,
587 587
             'target'   => new ActiveRecordExpressionsWrap(array('target' => \array_keys($this->dirty))),
588 588
         )
589 589
     );
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
    * @param int          $i <p>The index of $n in $sql array.</p>
787 787
    * @param ActiveRecord $o <p>The reference to $this.</p>
788 788
    */
789
-  private function _buildSqlCallback(string &$n, $i, self $o)
789
+  private function _buildSqlCallback(string & $n, $i, self $o)
790 790
   {
791 791
     if (
792 792
         'select' === $n
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
         null === $o->{$n}
795 795
     ) {
796 796
 
797
-      $n = \strtoupper($n) . ' ' . $o->table . '.*';
797
+      $n = \strtoupper($n).' '.$o->table.'.*';
798 798
 
799 799
     } elseif (
800 800
         (
@@ -806,15 +806,15 @@  discard block
 block discarded – undo
806 806
         null === $o->{$n}
807 807
     ) {
808 808
 
809
-      $n = \strtoupper($n) . ' ' . $o->table;
809
+      $n = \strtoupper($n).' '.$o->table;
810 810
 
811 811
     } elseif ('delete' === $n) {
812 812
 
813
-      $n = \strtoupper($n) . ' ';
813
+      $n = \strtoupper($n).' ';
814 814
 
815 815
     } else {
816 816
 
817
-      $n = (null !== $o->{$n}) ? $o->{$n} . ' ' : '';
817
+      $n = (null !== $o->{$n}) ? $o->{$n}.' ' : '';
818 818
 
819 819
     }
820 820
   }
@@ -927,10 +927,10 @@  discard block
 block discarded – undo
927 927
   {
928 928
     if (\is_array($value)) {
929 929
       foreach ($value as $key => $val) {
930
-        $this->params[$value[$key] = self::PREFIX . ++self::$count] = $val;
930
+        $this->params[$value[$key] = self::PREFIX.++self::$count] = $val;
931 931
       }
932 932
     } elseif (\is_string($value)) {
933
-      $this->params[$ph = self::PREFIX . ++self::$count] = $value;
933
+      $this->params[$ph = self::PREFIX.++self::$count] = $value;
934 934
       $value = $ph;
935 935
     }
936 936
 
@@ -951,7 +951,7 @@  discard block
 block discarded – undo
951 951
     $value = $this->_filterParam($value);
952 952
     $exp = new ActiveRecordExpressions(
953 953
         array(
954
-            'source'   => ('where' == $name ? $this->table . '.' : '') . $field,
954
+            'source'   => ('where' == $name ? $this->table.'.' : '').$field,
955 955
             'operator' => $operator,
956 956
             'target'   => \is_array($value)
957 957
                 ? new ActiveRecordExpressionsWrap(
@@ -984,7 +984,7 @@  discard block
 block discarded – undo
984 984
     $this->join = new ActiveRecordExpressions(
985 985
         array(
986 986
             'source'   => $this->join ?: '',
987
-            'operator' => $type . ' JOIN',
987
+            'operator' => $type.' JOIN',
988 988
             'target'   => new ActiveRecordExpressions(
989 989
                 array('source' => $table, 'operator' => 'ON', 'target' => $on)
990 990
             ),
Please login to merge, or discard this patch.