Completed
Push — master ( 53937e...5698ad )
by Lars
06:10
created
src/voku/db/DB.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@
 block discarded – undo
249 249
    * @param string      $username
250 250
    * @param string      $password
251 251
    * @param string      $database
252
-   * @param int|string  $port             <p>default is (int)3306</p>
252
+   * @param integer  $port             <p>default is (int)3306</p>
253 253
    * @param string      $charset          <p>default is 'utf8' or 'utf8mb4' (if supported)</p>
254 254
    * @param bool|string $exit_on_error    <p>Throw a 'Exception' when a query failed, otherwise it will return 'false'.
255 255
    *                                      Use a empty string "" or false to disable it.</p>
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 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
 
@@ -436,9 +436,9 @@  discard block
 block discarded – undo
436 436
         }
437 437
 
438 438
         if ($_connector === 'NOT IN' || $_connector === 'IN') {
439
-          $_value = '(' . implode(',', $_value) . ')';
439
+          $_value = '('.implode(',', $_value).')';
440 440
         } elseif ($_connector === 'NOT BETWEEN' || $_connector === 'BETWEEN') {
441
-          $_value = '(' . implode(' AND ', $_value) . ')';
441
+          $_value = '('.implode(' AND ', $_value).')';
442 442
         }
443 443
 
444 444
       } else {
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
           $valueInner = "''";
488 488
         }
489 489
 
490
-        $sql .= ' ' . $_glueHelperInner . ' ' . $quoteString . ' ' . $_connector . ' ' . $valueInner . " \n";
490
+        $sql .= ' '.$_glueHelperInner.' '.$quoteString.' '.$_connector.' '.$valueInner." \n";
491 491
         $tmpCounter++;
492 492
       }
493 493
 
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
       );
691 691
 
692 692
     } catch (\Exception $e) {
693
-      $error = 'Error connecting to mysql server: ' . $e->getMessage();
693
+      $error = 'Error connecting to mysql server: '.$e->getMessage();
694 694
       $this->_debug->displayError($error, true);
695 695
       throw new DBConnectException($error, 100, $e);
696 696
     }
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
 
699 699
     $errno = mysqli_connect_errno();
700 700
     if (!$this->connected || $errno) {
701
-      $error = 'Error connecting to mysql server: ' . \mysqli_connect_error() . ' (' . $errno . ')';
701
+      $error = 'Error connecting to mysql server: '.\mysqli_connect_error().' ('.$errno.')';
702 702
       $this->_debug->displayError($error, true);
703 703
       throw new DBConnectException($error, 101);
704 704
     }
@@ -739,10 +739,10 @@  discard block
 block discarded – undo
739 739
     }
740 740
 
741 741
     if ($databaseName) {
742
-      $databaseName = $this->quote_string(trim($databaseName)) . '.';
742
+      $databaseName = $this->quote_string(trim($databaseName)).'.';
743 743
     }
744 744
 
745
-    $sql = 'DELETE FROM ' . $databaseName . $this->quote_string($table) . " WHERE ($WHERE);";
745
+    $sql = 'DELETE FROM '.$databaseName.$this->quote_string($table)." WHERE ($WHERE);";
746 746
 
747 747
     return $this->query($sql);
748 748
   }
@@ -812,8 +812,8 @@  discard block
 block discarded – undo
812 812
         $nameTmp = substr($name, 1);
813 813
       }
814 814
 
815
-      $parseKeyInner = $nameTmp . '-' . $parseKey;
816
-      $sql = str_replace(':' . $nameTmp, $parseKeyInner, $sql);
815
+      $parseKeyInner = $nameTmp.'-'.$parseKey;
816
+      $sql = str_replace(':'.$nameTmp, $parseKeyInner, $sql);
817 817
     }
818 818
 
819 819
     foreach ($params as $name => $value) {
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
         $nameTmp = substr($name, 1);
823 823
       }
824 824
 
825
-      $parseKeyInner = $nameTmp . '-' . $parseKey;
825
+      $parseKeyInner = $nameTmp.'-'.$parseKey;
826 826
       $sqlBefore = $sql;
827 827
       $secureParamValue = $this->secure($params[$name]);
828 828
 
@@ -1010,7 +1010,7 @@  discard block
 block discarded – undo
1010 1010
 
1011 1011
     if ($useCache === true) {
1012 1012
       $cache = new Cache(null, null, false, $useCache);
1013
-      $cacheKey = 'sql-' . md5($query);
1013
+      $cacheKey = 'sql-'.md5($query);
1014 1014
 
1015 1015
       if (
1016 1016
           $cache->getCacheIsReady() === true
@@ -1120,7 +1120,7 @@  discard block
 block discarded – undo
1120 1120
     static $firstInstance = null;
1121 1121
 
1122 1122
     if (
1123
-        $hostname . $username . $password . $database . $port . $charset == ''
1123
+        $hostname.$username.$password.$database.$port.$charset == ''
1124 1124
         &&
1125 1125
         null !== $firstInstance
1126 1126
     ) {
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
     $extra_config_string = '';
1131 1131
     if (\is_array($extra_config) === true) {
1132 1132
       foreach ($extra_config as $extra_config_key => $extra_config_value) {
1133
-        $extra_config_string .= $extra_config_key . (string)$extra_config_value;
1133
+        $extra_config_string .= $extra_config_key.(string)$extra_config_value;
1134 1134
       }
1135 1135
     } else {
1136 1136
       // only for backward compatibility
@@ -1138,7 +1138,7 @@  discard block
 block discarded – undo
1138 1138
     }
1139 1139
 
1140 1140
     $connection = md5(
1141
-        $hostname . $username . $password . $database . $port . $charset . (int)$exit_on_error . (int)$echo_on_error . $logger_class_name . $logger_level . $extra_config_string
1141
+        $hostname.$username.$password.$database.$port.$charset.(int)$exit_on_error.(int)$echo_on_error.$logger_class_name.$logger_level.$extra_config_string
1142 1142
     );
1143 1143
 
1144 1144
     if (!isset($instance[$connection])) {
@@ -1225,10 +1225,10 @@  discard block
 block discarded – undo
1225 1225
     $SET = $this->_parseArrayPair($data);
1226 1226
 
1227 1227
     if ($databaseName) {
1228
-      $databaseName = $this->quote_string(trim($databaseName)) . '.';
1228
+      $databaseName = $this->quote_string(trim($databaseName)).'.';
1229 1229
     }
1230 1230
 
1231
-    $sql = 'INSERT INTO ' . $databaseName . $this->quote_string($table) . " SET $SET;";
1231
+    $sql = 'INSERT INTO '.$databaseName.$this->quote_string($table)." SET $SET;";
1232 1232
 
1233 1233
     return $this->query($sql);
1234 1234
   }
@@ -1541,11 +1541,11 @@  discard block
 block discarded – undo
1541 1541
 
1542 1542
       // exit if we have more then 3 "DB server has gone away"-errors
1543 1543
       if ($RECONNECT_COUNTER > 3) {
1544
-        $this->_debug->mailToAdmin('DB-Fatal-Error', $errorMessage . '(' . $errorNumber . ') ' . ":\n<br />" . $sql, 5);
1544
+        $this->_debug->mailToAdmin('DB-Fatal-Error', $errorMessage.'('.$errorNumber.') '.":\n<br />".$sql, 5);
1545 1545
         throw new DBGoneAwayException($errorMessage);
1546 1546
       }
1547 1547
 
1548
-      $this->_debug->mailToAdmin('DB-Error', $errorMessage . '(' . $errorNumber . ') ' . ":\n<br />" . $sql);
1548
+      $this->_debug->mailToAdmin('DB-Error', $errorMessage.'('.$errorNumber.') '.":\n<br />".$sql);
1549 1549
 
1550 1550
       // reconnect
1551 1551
       $RECONNECT_COUNTER++;
@@ -1559,7 +1559,7 @@  discard block
 block discarded – undo
1559 1559
       return false;
1560 1560
     }
1561 1561
 
1562
-    $this->_debug->mailToAdmin('SQL-Error', $errorMessage . '(' . $errorNumber . ') ' . ":\n<br />" . $sql);
1562
+    $this->_debug->mailToAdmin('SQL-Error', $errorMessage.'('.$errorNumber.') '.":\n<br />".$sql);
1563 1563
 
1564 1564
     $force_exception_after_error = null; // auto
1565 1565
     if ($this->_in_transaction === true) {
@@ -1567,7 +1567,7 @@  discard block
 block discarded – undo
1567 1567
     }
1568 1568
     // this query returned an error, we must display it (only for dev) !!!
1569 1569
 
1570
-    $this->_debug->displayError($errorMessage . '(' . $errorNumber . ') ' . ' | ' . $sql, $force_exception_after_error);
1570
+    $this->_debug->displayError($errorMessage.'('.$errorNumber.') '.' | '.$sql, $force_exception_after_error);
1571 1571
 
1572 1572
     return false;
1573 1573
   }
@@ -1590,7 +1590,7 @@  discard block
 block discarded – undo
1590 1590
         )
1591 1591
     );
1592 1592
 
1593
-    return '`' . $str . '`';
1593
+    return '`'.$str.'`';
1594 1594
   }
1595 1595
 
1596 1596
   /**
@@ -1661,10 +1661,10 @@  discard block
 block discarded – undo
1661 1661
     $values = implode(',', $data);
1662 1662
 
1663 1663
     if ($databaseName) {
1664
-      $databaseName = $this->quote_string(trim($databaseName)) . '.';
1664
+      $databaseName = $this->quote_string(trim($databaseName)).'.';
1665 1665
     }
1666 1666
 
1667
-    $sql = 'REPLACE INTO ' . $databaseName . $this->quote_string($table) . " ($columns) VALUES ($values);";
1667
+    $sql = 'REPLACE INTO '.$databaseName.$this->quote_string($table)." ($columns) VALUES ($values);";
1668 1668
 
1669 1669
     return $this->query($sql);
1670 1670
   }
@@ -1762,7 +1762,7 @@  discard block
 block discarded – undo
1762 1762
     $var = $this->escape($var, false, false, null);
1763 1763
 
1764 1764
     if (\is_string($var)) {
1765
-      $var = "'" . trim($var, "'") . "'";
1765
+      $var = "'".trim($var, "'")."'";
1766 1766
     }
1767 1767
 
1768 1768
     return $var;
@@ -1799,10 +1799,10 @@  discard block
 block discarded – undo
1799 1799
     }
1800 1800
 
1801 1801
     if ($databaseName) {
1802
-      $databaseName = $this->quote_string(trim($databaseName)) . '.';
1802
+      $databaseName = $this->quote_string(trim($databaseName)).'.';
1803 1803
     }
1804 1804
 
1805
-    $sql = 'SELECT * FROM ' . $databaseName . $this->quote_string($table) . " WHERE ($WHERE);";
1805
+    $sql = 'SELECT * FROM '.$databaseName.$this->quote_string($table)." WHERE ($WHERE);";
1806 1806
 
1807 1807
     return $this->query($sql);
1808 1808
   }
@@ -1844,9 +1844,9 @@  discard block
 block discarded – undo
1844 1844
 
1845 1845
     $return = mysqli_set_charset($this->link, $charset);
1846 1846
     /** @noinspection PhpUsageOfSilenceOperatorInspection */
1847
-    @\mysqli_query($this->link, 'SET CHARACTER SET ' . $charset);
1847
+    @\mysqli_query($this->link, 'SET CHARACTER SET '.$charset);
1848 1848
     /** @noinspection PhpUsageOfSilenceOperatorInspection */
1849
-    @\mysqli_query($this->link, "SET NAMES '" . $charset . "'");
1849
+    @\mysqli_query($this->link, "SET NAMES '".$charset."'");
1850 1850
 
1851 1851
     return $return;
1852 1852
   }
@@ -1980,7 +1980,7 @@  discard block
 block discarded – undo
1980 1980
       $result = call_user_func($callback, $this);
1981 1981
       if ($result === false) {
1982 1982
         /** @noinspection ThrowRawExceptionInspection */
1983
-        throw new \Exception('call_user_func [' . $callback . '] === false');
1983
+        throw new \Exception('call_user_func ['.$callback.'] === false');
1984 1984
       }
1985 1985
 
1986 1986
       return $this->commit();
@@ -2033,10 +2033,10 @@  discard block
 block discarded – undo
2033 2033
     }
2034 2034
 
2035 2035
     if ($databaseName) {
2036
-      $databaseName = $this->quote_string(trim($databaseName)) . '.';
2036
+      $databaseName = $this->quote_string(trim($databaseName)).'.';
2037 2037
     }
2038 2038
 
2039
-    $sql = 'UPDATE ' . $databaseName . $this->quote_string($table) . " SET $SET WHERE ($WHERE);";
2039
+    $sql = 'UPDATE '.$databaseName.$this->quote_string($table)." SET $SET WHERE ($WHERE);";
2040 2040
 
2041 2041
     return $this->query($sql);
2042 2042
   }
@@ -2050,7 +2050,7 @@  discard block
 block discarded – undo
2050 2050
    */
2051 2051
   public function table_exists($table): bool
2052 2052
   {
2053
-    $check = $this->query('SELECT 1 FROM ' . $this->quote_string($table));
2053
+    $check = $this->query('SELECT 1 FROM '.$this->quote_string($table));
2054 2054
 
2055 2055
     return $check !== false
2056 2056
            &&
Please login to merge, or discard this patch.
src/voku/db/ActiveRecord.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -822,7 +822,7 @@
 block discarded – undo
822 822
   /**
823 823
    * Helper function to build SQL with sql parts.
824 824
    *
825
-   * @param array $sqls <p>The SQL part will be build.</p>
825
+   * @param string[] $sqls <p>The SQL part will be build.</p>
826 826
    *
827 827
    * @return string
828 828
    */
Please login to merge, or discard this 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 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@
 block discarded – undo
173 173
    * @param mixed  $v34
174 174
    * @param mixed  $v35
175 175
    *
176
-   * @return mixed
176
+   * @return boolean
177 177
    */
178 178
   public function bind_param_debug(string $types, &$v1 = null, &$v2 = null, &$v3 = null, &$v4 = null, &$v5 = null, &$v6 = null, &$v7 = null, &$v8 = null, &$v9 = null, &$v10 = null, &$v11 = null, &$v12 = null, &$v13 = null, &$v14 = null, &$v15 = null, &$v16 = null, &$v17 = null, &$v18 = null, &$v19 = null, &$v20 = null, &$v21 = null, &$v22 = null, &$v23 = null, &$v24 = null, &$v25 = null, &$v26 = null, &$v27 = null, &$v28 = null, &$v29 = null, &$v30 = null, &$v31 = null, &$v32 = null, &$v33 = null, &$v34 = null, &$v35 = null)
179 179
   {
Please login to merge, or discard this 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.
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/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/Debug.php 1 patch
Spacing   +12 added lines, -12 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
 
@@ -139,9 +139,9 @@  discard block
 block discarded – undo
139 139
     $this->logger(
140 140
         array(
141 141
             'error',
142
-            '<strong>' . date(
142
+            '<strong>'.date(
143 143
                 'd. m. Y G:i:s'
144
-            ) . ' (' . $fileInfo['file'] . ' line: ' . $fileInfo['line'] . ') (sql-error):</strong> ' . $error . '<br>',
144
+            ).' ('.$fileInfo['file'].' line: '.$fileInfo['line'].') (sql-error):</strong> '.$error.'<br>',
145 145
         )
146 146
     );
147 147
 
@@ -153,11 +153,11 @@  discard block
 block discarded – undo
153 153
         $box_bg = $this->css_mysql_box_bg;
154 154
 
155 155
         echo '
156
-        <div class="OBJ-mysql-box" style="border:' . $box_border . '; background:' . $box_bg . '; padding:10px; margin:10px;">
156
+        <div class="OBJ-mysql-box" style="border:' . $box_border.'; background:'.$box_bg.'; padding:10px; margin:10px;">
157 157
           <b style="font-size:14px;">MYSQL Error:</b>
158 158
           <code style="display:block;">
159
-            file / line: ' . $fileInfo['file'] . ' / ' . $fileInfo['line'] . '
160
-            ' . $error . '
159
+            file / line: ' . $fileInfo['file'].' / '.$fileInfo['line'].'
160
+            ' . $error.'
161 161
           </code>
162 162
         </div>
163 163
         ';
@@ -295,21 +295,21 @@  discard block
 block discarded – undo
295 295
     // get extra info
296 296
     $infoExtra = \mysqli_info($this->_db->getLink());
297 297
     if ($infoExtra) {
298
-      $infoExtra = ' | info => ' . $infoExtra;
298
+      $infoExtra = ' | info => '.$infoExtra;
299 299
     }
300 300
 
301 301
     //
302 302
     // logging
303 303
     //
304 304
 
305
-    $info = 'time => ' . round($duration, 5) . ' | results => ' . (int)$results . $infoExtra . ' | SQL => ' . UTF8::htmlentities($sql);
305
+    $info = 'time => '.round($duration, 5).' | results => '.(int)$results.$infoExtra.' | SQL => '.UTF8::htmlentities($sql);
306 306
 
307 307
     $fileInfo = $this->getFileAndLineFromSql();
308 308
 
309 309
     return $this->logger(
310 310
         array(
311 311
             $logLevel,
312
-            '<strong>' . date('d. m. Y G:i:s') . ' (' . $fileInfo['file'] . ' line: ' . $fileInfo['line'] . '):</strong> ' . $info . '<br>',
312
+            '<strong>'.date('d. m. Y G:i:s').' ('.$fileInfo['file'].' line: '.$fileInfo['line'].'):</strong> '.$info.'<br>',
313 313
             'sql',
314 314
         )
315 315
     );
@@ -375,21 +375,21 @@  discard block
 block discarded – undo
375 375
         $this->logger(
376 376
             array(
377 377
                 'debug',
378
-                $subject . ' | ' . $htmlBody,
378
+                $subject.' | '.$htmlBody,
379 379
             )
380 380
         );
381 381
       } elseif ($priority > 3) {
382 382
         $this->logger(
383 383
             array(
384 384
                 'error',
385
-                $subject . ' | ' . $htmlBody,
385
+                $subject.' | '.$htmlBody,
386 386
             )
387 387
         );
388 388
       } elseif ($priority < 3) {
389 389
         $this->logger(
390 390
             array(
391 391
                 'info',
392
-                $subject . ' | ' . $htmlBody,
392
+                $subject.' | '.$htmlBody,
393 393
             )
394 394
         );
395 395
       }
Please login to merge, or discard this patch.