Completed
Push — master ( 19caf3...ac6c82 )
by Lars
01:52
created
src/voku/db/exceptions/QueryException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\exceptions;
6 6
 
Please login to merge, or discard this patch.
src/voku/db/ActiveRecordExpressions.php 1 patch
Spacing   +2 added lines, -2 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
 
@@ -23,6 +23,6 @@  discard block
 block discarded – undo
23 23
    */
24 24
   public function __toString()
25 25
   {
26
-    return $this->source . ' ' . $this->operator . ' ' . $this->target;
26
+    return $this->source.' '.$this->operator.' '.$this->target;
27 27
   }
28 28
 }
Please login to merge, or discard this patch.
src/voku/db/ActiveRecordExpressionsWrap.php 1 patch
Spacing   +3 added lines, -3 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
 
@@ -21,9 +21,9 @@  discard block
 block discarded – undo
21 21
     $delimiter = (string)($this->delimiter ?: ',');
22 22
 
23 23
     if ($this->start) {
24
-      return $this->start . implode($delimiter, $this->target->getArray()) . ($this->end ?: ')');
24
+      return $this->start.implode($delimiter, $this->target->getArray()).($this->end ?: ')');
25 25
     }
26 26
 
27
-    return '(' . implode($delimiter, $this->target->getArray()) . ($this->end ?: ')');
27
+    return '('.implode($delimiter, $this->target->getArray()).($this->end ?: ')');
28 28
   }
29 29
 }
Please login to merge, or discard this patch.
src/voku/db/exceptions/FetchingException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\exceptions;
6 6
 
Please login to merge, or discard this patch.
src/voku/db/exceptions/DBConnectException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\exceptions;
6 6
 
Please login to merge, or discard this patch.
src/voku/db/exceptions/DBGoneAwayException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\exceptions;
6 6
 
Please login to merge, or discard this patch.
src/voku/db/exceptions/ActiveRecordException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 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\exceptions;
6 6
 
Please login to merge, or discard this patch.
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, ActiveRecord $o)
789
+  private function _buildSqlCallback(string & $n, $i, ActiveRecord $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.
src/voku/db/Prepare.php 1 patch
Spacing   +10 added lines, -10 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
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 
83 83
     foreach ($this->_boundParams as $param) {
84 84
       $arguments[0] .= $param['type'];
85
-      $arguments[] =& $param['value'];
85
+      $arguments[] = & $param['value'];
86 86
     }
87 87
 
88 88
     return $arguments;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     $value = $this->_db->escape($value);
106 106
 
107 107
     if ($type === 's') {
108
-      $valueForSqlWithBoundParameters = "'" . $value . "'";
108
+      $valueForSqlWithBoundParameters = "'".$value."'";
109 109
     } elseif ($type === 'i') {
110 110
       $valueForSqlWithBoundParameters = (int)$value;
111 111
     } elseif ($type === 'd') {
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     // debug_backtrace returns arguments by reference, see comments at http://php.net/manual/de/function.func-get-args.php
183 183
     $trace = \debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 1);
184 184
 
185
-    $args =& $trace[0]['args'];
185
+    $args = & $trace[0]['args'];
186 186
     $types = \str_split($types);
187 187
 
188 188
     $args_count = \count($args) - 1;
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 
197 197
     $arg = 1;
198 198
     foreach ($types as $typeInner) {
199
-      $val =& $args[$arg];
199
+      $val = & $args[$arg];
200 200
       $this->_boundParams[] = array(
201 201
           'type'  => $typeInner,
202 202
           'value' => &$val,
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
     $bool = parent::prepare($query);
333 333
 
334 334
     if ($bool === false) {
335
-      $this->_debug->displayError('Can not prepare query: ' . $query . ' | ' . $this->error, false);
335
+      $this->_debug->displayError('Can not prepare query: '.$query.' | '.$this->error, false);
336 336
     }
337 337
 
338 338
     return $bool;
@@ -420,11 +420,11 @@  discard block
 block discarded – undo
420 420
 
421 421
       // exit if we have more then 3 "DB server has gone away"-errors
422 422
       if ($RECONNECT_COUNTER > 3) {
423
-        $this->_debug->mailToAdmin('DB-Fatal-Error', $errorMsg . ":\n<br />" . $sql, 5);
423
+        $this->_debug->mailToAdmin('DB-Fatal-Error', $errorMsg.":\n<br />".$sql, 5);
424 424
         throw new DBGoneAwayException($errorMsg);
425 425
       }
426 426
 
427
-      $this->_debug->mailToAdmin('DB-Error', $errorMsg . ":\n<br />" . $sql);
427
+      $this->_debug->mailToAdmin('DB-Error', $errorMsg.":\n<br />".$sql);
428 428
 
429 429
       // reconnect
430 430
       $RECONNECT_COUNTER++;
@@ -434,10 +434,10 @@  discard block
 block discarded – undo
434 434
       return $this->execute();
435 435
     }
436 436
 
437
-    $this->_debug->mailToAdmin('SQL-Error', $errorMsg . ":\n<br />" . $sql);
437
+    $this->_debug->mailToAdmin('SQL-Error', $errorMsg.":\n<br />".$sql);
438 438
 
439 439
     // this query returned an error, we must display it (only for dev) !!!
440
-    $this->_debug->displayError($errorMsg . ' | ' . $sql);
440
+    $this->_debug->displayError($errorMsg.' | '.$sql);
441 441
 
442 442
     return false;
443 443
   }
Please login to merge, or discard this patch.