Completed
Push — master ( 195702...f3dab2 )
by Lars
02:13 queued 15s
created
src/voku/db/DB.php 1 patch
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -320,10 +320,10 @@  discard block
 block discarded – undo
320 320
         }
321 321
 
322 322
         if ($port) {
323
-            $this->port = (int) $port;
323
+            $this->port = (int)$port;
324 324
         } else {
325 325
             /** @noinspection PhpUsageOfSilenceOperatorInspection */
326
-            $this->port = (int) @\ini_get('mysqli.default_port');
326
+            $this->port = (int)@\ini_get('mysqli.default_port');
327 327
         }
328 328
 
329 329
         // fallback
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
         foreach ($arrayPair as $_key => $_value) {
377 377
             $_connector = '=';
378 378
             $_glueHelper = '';
379
-            $_key_upper = \strtoupper((string) $_key);
379
+            $_key_upper = \strtoupper((string)$_key);
380 380
 
381 381
             if (\strpos($_key_upper, ' NOT') !== false) {
382 382
                 $_connector = 'NOT';
@@ -458,30 +458,30 @@  discard block
 block discarded – undo
458 458
                 }
459 459
 
460 460
                 if ($_connector === 'NOT IN' || $_connector === 'IN') {
461
-                    $_value = '(' . \implode(',', $_value) . ')';
461
+                    $_value = '('.\implode(',', $_value).')';
462 462
                 } elseif ($_connector === 'NOT BETWEEN' || $_connector === 'BETWEEN') {
463
-                    $_value = '(' . \implode(' AND ', $_value) . ')';
463
+                    $_value = '('.\implode(' AND ', $_value).')';
464 464
                 } elseif ($firstKey && $firstValue) {
465
-                    if (\strpos((string) $firstKey, ' +') !== false) {
466
-                        $firstKey = \str_replace(' +', '', (string) $firstKey);
467
-                        $_value = $firstKey . ' + ' . $firstValue;
465
+                    if (\strpos((string)$firstKey, ' +') !== false) {
466
+                        $firstKey = \str_replace(' +', '', (string)$firstKey);
467
+                        $_value = $firstKey.' + '.$firstValue;
468 468
                     }
469 469
 
470
-                    if (\strpos((string) $firstKey, ' -') !== false) {
471
-                        $firstKey = \str_replace(' -', '', (string) $firstKey);
472
-                        $_value = $firstKey . ' - ' . $firstValue;
470
+                    if (\strpos((string)$firstKey, ' -') !== false) {
471
+                        $firstKey = \str_replace(' -', '', (string)$firstKey);
472
+                        $_value = $firstKey.' - '.$firstValue;
473 473
                     }
474 474
                 }
475 475
             } else {
476 476
                 $_value = $this->secure($_value);
477 477
             }
478 478
 
479
-            $_key = UTF8::str_replace_last($_glueHelper, '', (string) $_key);
479
+            $_key = UTF8::str_replace_last($_glueHelper, '', (string)$_key);
480 480
             $_key = UTF8::str_replace_last($_connector, '', $_key);
481 481
 
482 482
             $quoteString = $this->quote_string(\trim($_key));
483 483
 
484
-            $_value = (array) $_value;
484
+            $_value = (array)$_value;
485 485
 
486 486
             if (!$_glueHelper) {
487 487
                 $_glueHelper = $glue;
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
                     $valueInner = "''";
506 506
                 }
507 507
 
508
-                $sql .= ' ' . $_glueHelperInner . ' ' . $quoteString . ' ' . $_connector . ' ' . $valueInner . " \n";
508
+                $sql .= ' '.$_glueHelperInner.' '.$quoteString.' '.$_connector.' '.$valueInner." \n";
509 509
                 $tmpCounter++;
510 510
             }
511 511
 
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
             unset($params[$key]);
558 558
 
559 559
             $sql = \substr_replace($sql, $replacement, $offset, 1);
560
-            $offset = \strpos($sql, '?', $offset + \strlen((string) $replacement));
560
+            $offset = \strpos($sql, '?', $offset + \strlen((string)$replacement));
561 561
         }
562 562
 
563 563
         return ['sql' => $sql, 'params' => $params];
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
 
595 595
             // add ":" if needed
596 596
             if (\strpos($name, ':') !== 0) {
597
-                $nameTmp = ':' . $name;
597
+                $nameTmp = ':'.$name;
598 598
             } else {
599 599
                 $nameTmp = $name;
600 600
             }
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
             if ($offset === null) {
603 603
                 $offset = \strpos($sql, $nameTmp);
604 604
             } else {
605
-                $offset = \strpos($sql, $nameTmp, $offset + \strlen((string) $replacement));
605
+                $offset = \strpos($sql, $nameTmp, $offset + \strlen((string)$replacement));
606 606
             }
607 607
 
608 608
             if ($offset === false) {
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
             return \mysqli_affected_rows($this->mysqli_link);
635 635
         }
636 636
 
637
-        return (int) $this->affected_rows;
637
+        return (int)$this->affected_rows;
638 638
     }
639 639
 
640 640
     /**
@@ -848,10 +848,10 @@  discard block
 block discarded – undo
848 848
                 $this->database,
849 849
                 $this->port,
850 850
                 $this->socket,
851
-                (int) $flags
851
+                (int)$flags
852 852
             );
853 853
         } catch (\Exception $e) {
854
-            $error = 'Error connecting to mysql server: ' . $e->getMessage();
854
+            $error = 'Error connecting to mysql server: '.$e->getMessage();
855 855
             $this->debug->displayError($error, false);
856 856
 
857 857
             throw new DBConnectException($error, 100, $e);
@@ -860,7 +860,7 @@  discard block
 block discarded – undo
860 860
 
861 861
         $errno = \mysqli_connect_errno();
862 862
         if (!$this->connected || $errno) {
863
-            $error = 'Error connecting to mysql server: ' . \mysqli_connect_error() . ' (' . $errno . ')';
863
+            $error = 'Error connecting to mysql server: '.\mysqli_connect_error().' ('.$errno.')';
864 864
             $this->debug->displayError($error, false);
865 865
 
866 866
             throw new DBConnectException($error, 101);
@@ -883,7 +883,7 @@  discard block
 block discarded – undo
883 883
         }
884 884
 
885 885
         if (!$this->connected) {
886
-            $error = 'Error connecting to mysql server: ' . \print_r($this->doctrine_connection ? $this->doctrine_connection->errorInfo() : [], false);
886
+            $error = 'Error connecting to mysql server: '.\print_r($this->doctrine_connection ? $this->doctrine_connection->errorInfo() : [], false);
887 887
             $this->debug->displayError($error, false);
888 888
 
889 889
             throw new DBConnectException($error, 101);
@@ -929,10 +929,10 @@  discard block
 block discarded – undo
929 929
         }
930 930
 
931 931
         if ($databaseName) {
932
-            $databaseName = $this->quote_string(\trim($databaseName)) . '.';
932
+            $databaseName = $this->quote_string(\trim($databaseName)).'.';
933 933
         }
934 934
 
935
-        $sql = 'DELETE FROM ' . $databaseName . $this->quote_string($table) . " WHERE (${WHERE})";
935
+        $sql = 'DELETE FROM '.$databaseName.$this->quote_string($table)." WHERE (${WHERE})";
936 936
 
937 937
         $return = $this->query($sql);
938 938
 
@@ -1033,14 +1033,14 @@  discard block
 block discarded – undo
1033 1033
                 $var = $var->format('Y-m-d H:i:s');
1034 1034
                 $type = 'string';
1035 1035
             } elseif (\method_exists($var, '__toString')) {
1036
-                $var = (string) $var;
1036
+                $var = (string)$var;
1037 1037
                 $type = 'string';
1038 1038
             }
1039 1039
         }
1040 1040
 
1041 1041
         switch ($type) {
1042 1042
             case 'boolean':
1043
-                $var = (int) $var;
1043
+                $var = (int)$var;
1044 1044
 
1045 1045
                 break;
1046 1046
 
@@ -1084,7 +1084,7 @@  discard block
 block discarded – undo
1084 1084
                     }
1085 1085
                 } else {
1086 1086
                     $varCleaned = [];
1087
-                    foreach ((array) $var as $key => $value) {
1087
+                    foreach ((array)$var as $key => $value) {
1088 1088
                         $key = $this->escape($key, $stripe_non_utf8, $html_entity_decode);
1089 1089
                         $value = $this->escape($value, $stripe_non_utf8, $html_entity_decode);
1090 1090
 
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
 
1149 1149
         if ($useCache) {
1150 1150
             $cache = new Cache(null, null, false, $useCache);
1151
-            $cacheKey = 'sql-' . \md5($query);
1151
+            $cacheKey = 'sql-'.\md5($query);
1152 1152
 
1153 1153
             if (
1154 1154
                 $cache->getCacheIsReady()
@@ -1324,7 +1324,7 @@  discard block
 block discarded – undo
1324 1324
         }
1325 1325
 
1326 1326
         if (
1327
-            '' . $hostname . $username . $password . $database . $port . $charset === '' . $port . $charset
1327
+            ''.$hostname.$username.$password.$database.$port.$charset === ''.$port.$charset
1328 1328
             &&
1329 1329
             $firstInstance instanceof self
1330 1330
         ) {
@@ -1340,13 +1340,13 @@  discard block
 block discarded – undo
1340 1340
             if (\is_object($extra_config_value)) {
1341 1341
                 $extra_config_value_tmp = \spl_object_hash($extra_config_value);
1342 1342
             } else {
1343
-                $extra_config_value_tmp = (string) $extra_config_value;
1343
+                $extra_config_value_tmp = (string)$extra_config_value;
1344 1344
             }
1345
-            $extra_config_string .= $extra_config_key . $extra_config_value_tmp;
1345
+            $extra_config_string .= $extra_config_key.$extra_config_value_tmp;
1346 1346
         }
1347 1347
 
1348 1348
         $connection = \md5(
1349
-            $hostname . $username . $password . $database . $port . $charset . (int) $exit_on_error . (int) $echo_on_error . $logger_class_name . $logger_level . $extra_config_string
1349
+            $hostname.$username.$password.$database.$port.$charset.(int)$exit_on_error.(int)$echo_on_error.$logger_class_name.$logger_level.$extra_config_string
1350 1350
         );
1351 1351
 
1352 1352
         if (!isset($instance[$connection])) {
@@ -1489,10 +1489,10 @@  discard block
 block discarded – undo
1489 1489
         $SET = $this->_parseArrayPair($data);
1490 1490
 
1491 1491
         if ($databaseName) {
1492
-            $databaseName = $this->quote_string(\trim($databaseName)) . '.';
1492
+            $databaseName = $this->quote_string(\trim($databaseName)).'.';
1493 1493
         }
1494 1494
 
1495
-        $sql = 'INSERT INTO ' . $databaseName . $this->quote_string($table) . " SET ${SET}";
1495
+        $sql = 'INSERT INTO '.$databaseName.$this->quote_string($table)." SET ${SET}";
1496 1496
 
1497 1497
         $return = $this->query($sql);
1498 1498
         if ($return === false) {
@@ -2023,12 +2023,12 @@  discard block
 block discarded – undo
2023 2023
 
2024 2024
             // exit if we have more then 3 "DB server has gone away"-errors
2025 2025
             if ($RECONNECT_COUNTER > 3) {
2026
-                $this->debug->mailToAdmin('DB-Fatal-Error', $errorMessage . '(' . $errorNumber . ') ' . ":\n<br />" . $sql, 5);
2026
+                $this->debug->mailToAdmin('DB-Fatal-Error', $errorMessage.'('.$errorNumber.') '.":\n<br />".$sql, 5);
2027 2027
 
2028 2028
                 throw new DBGoneAwayException($errorMessage);
2029 2029
             }
2030 2030
 
2031
-            $this->debug->mailToAdmin('DB-Error', $errorMessage . '(' . $errorNumber . ') ' . ":\n<br />" . $sql);
2031
+            $this->debug->mailToAdmin('DB-Error', $errorMessage.'('.$errorNumber.') '.":\n<br />".$sql);
2032 2032
 
2033 2033
             // reconnect
2034 2034
             $RECONNECT_COUNTER++;
@@ -2042,7 +2042,7 @@  discard block
 block discarded – undo
2042 2042
             return false;
2043 2043
         }
2044 2044
 
2045
-        $this->debug->mailToAdmin('SQL-Error', $errorMessage . '(' . $errorNumber . ') ' . ":\n<br />" . $sql);
2045
+        $this->debug->mailToAdmin('SQL-Error', $errorMessage.'('.$errorNumber.') '.":\n<br />".$sql);
2046 2046
 
2047 2047
         $force_exception_after_error = null; // auto
2048 2048
         if ($this->in_transaction) {
@@ -2050,7 +2050,7 @@  discard block
 block discarded – undo
2050 2050
         }
2051 2051
         // this query returned an error, we must display it (only for dev) !!!
2052 2052
 
2053
-        $this->debug->displayError($errorMessage . '(' . $errorNumber . ') ' . ' | ' . $sql, $force_exception_after_error);
2053
+        $this->debug->displayError($errorMessage.'('.$errorNumber.') '.' | '.$sql, $force_exception_after_error);
2054 2054
 
2055 2055
         return false;
2056 2056
     }
@@ -2068,12 +2068,12 @@  discard block
 block discarded – undo
2068 2068
             '`',
2069 2069
             '``',
2070 2070
             \trim(
2071
-                (string) $this->escape($str, false),
2071
+                (string)$this->escape($str, false),
2072 2072
                 '`'
2073 2073
             )
2074 2074
         );
2075 2075
 
2076
-        return '`' . $str . '`';
2076
+        return '`'.$str.'`';
2077 2077
     }
2078 2078
 
2079 2079
     /**
@@ -2142,10 +2142,10 @@  discard block
 block discarded – undo
2142 2142
         $values = \implode(',', $data);
2143 2143
 
2144 2144
         if ($databaseName) {
2145
-            $databaseName = $this->quote_string(\trim($databaseName)) . '.';
2145
+            $databaseName = $this->quote_string(\trim($databaseName)).'.';
2146 2146
         }
2147 2147
 
2148
-        $sql = 'REPLACE INTO ' . $databaseName . $this->quote_string($table) . " (${columns}) VALUES (${values})";
2148
+        $sql = 'REPLACE INTO '.$databaseName.$this->quote_string($table)." (${columns}) VALUES (${values})";
2149 2149
 
2150 2150
         $return = $this->query($sql);
2151 2151
         \assert(\is_int($return) || $return === false);
@@ -2244,7 +2244,7 @@  discard block
 block discarded – undo
2244 2244
                 }
2245 2245
             } else {
2246 2246
                 $varCleaned = [];
2247
-                foreach ((array) $var as $key => $value) {
2247
+                foreach ((array)$var as $key => $value) {
2248 2248
                     $key = $this->escape($key, false, false, $convert_array);
2249 2249
                     $value = $this->secure($value);
2250 2250
 
@@ -2291,7 +2291,7 @@  discard block
 block discarded – undo
2291 2291
         $var = $this->escape($var, false, false, null);
2292 2292
 
2293 2293
         if (\is_string($var)) {
2294
-            $var = "'" . \trim($var, "'") . "'";
2294
+            $var = "'".\trim($var, "'")."'";
2295 2295
         }
2296 2296
 
2297 2297
         return $var;
@@ -2332,10 +2332,10 @@  discard block
 block discarded – undo
2332 2332
         }
2333 2333
 
2334 2334
         if ($databaseName) {
2335
-            $databaseName = $this->quote_string(\trim($databaseName)) . '.';
2335
+            $databaseName = $this->quote_string(\trim($databaseName)).'.';
2336 2336
         }
2337 2337
 
2338
-        $sql = 'SELECT * FROM ' . $databaseName . $this->quote_string($table) . " WHERE (${WHERE})";
2338
+        $sql = 'SELECT * FROM '.$databaseName.$this->quote_string($table)." WHERE (${WHERE})";
2339 2339
 
2340 2340
         $return = $this->query($sql);
2341 2341
         \assert($return instanceof Result || $return === false);
@@ -2388,7 +2388,7 @@  discard block
 block discarded – undo
2388 2388
     public function setConfigExtra(array $extra_config)
2389 2389
     {
2390 2390
         if (isset($extra_config['session_to_db'])) {
2391
-            $this->session_to_db = (bool) $extra_config['session_to_db'];
2391
+            $this->session_to_db = (bool)$extra_config['session_to_db'];
2392 2392
         }
2393 2393
 
2394 2394
         if (isset($extra_config['doctrine'])) {
@@ -2451,9 +2451,9 @@  discard block
 block discarded – undo
2451 2451
             $return = \mysqli_set_charset($this->mysqli_link, $charset);
2452 2452
 
2453 2453
             /** @noinspection PhpUsageOfSilenceOperatorInspection */
2454
-            @\mysqli_query($this->mysqli_link, 'SET CHARACTER SET ' . $charset);
2454
+            @\mysqli_query($this->mysqli_link, 'SET CHARACTER SET '.$charset);
2455 2455
             /** @noinspection PhpUsageOfSilenceOperatorInspection */
2456
-            @\mysqli_query($this->mysqli_link, "SET NAMES '" . $charset . "'");
2456
+            @\mysqli_query($this->mysqli_link, "SET NAMES '".$charset."'");
2457 2457
         } elseif ($this->doctrine_connection && $this->isDoctrinePDOConnection()) {
2458 2458
             $doctrineWrappedConnection = $this->getDoctrinePDOConnection();
2459 2459
             if (!$doctrineWrappedConnection instanceof Connection) {
@@ -2461,9 +2461,9 @@  discard block
 block discarded – undo
2461 2461
             }
2462 2462
 
2463 2463
             /** @noinspection PhpUsageOfSilenceOperatorInspection */
2464
-            @$doctrineWrappedConnection->exec('SET CHARACTER SET ' . $charset);
2464
+            @$doctrineWrappedConnection->exec('SET CHARACTER SET '.$charset);
2465 2465
             /** @noinspection PhpUsageOfSilenceOperatorInspection */
2466
-            @$doctrineWrappedConnection->exec("SET NAMES '" . $charset . "'");
2466
+            @$doctrineWrappedConnection->exec("SET NAMES '".$charset."'");
2467 2467
 
2468 2468
             $return = true;
2469 2469
         } else {
@@ -2604,7 +2604,7 @@  discard block
 block discarded – undo
2604 2604
      */
2605 2605
     public function table_exists(string $table): bool
2606 2606
     {
2607
-        $check = $this->query('SELECT 1 FROM ' . $this->quote_string($table));
2607
+        $check = $this->query('SELECT 1 FROM '.$this->quote_string($table));
2608 2608
 
2609 2609
         return $check !== false
2610 2610
                &&
@@ -2635,7 +2635,7 @@  discard block
 block discarded – undo
2635 2635
             $result = $callback($this);
2636 2636
             if ($result === false) {
2637 2637
                 /** @noinspection ThrowRawExceptionInspection */
2638
-                throw new \Exception('call_user_func [' . \print_r($callback, true) . '] === false');
2638
+                throw new \Exception('call_user_func ['.\print_r($callback, true).'] === false');
2639 2639
             }
2640 2640
 
2641 2641
             return $this->commit();
@@ -2697,10 +2697,10 @@  discard block
 block discarded – undo
2697 2697
         }
2698 2698
 
2699 2699
         if ($databaseName) {
2700
-            $databaseName = $this->quote_string(\trim($databaseName)) . '.';
2700
+            $databaseName = $this->quote_string(\trim($databaseName)).'.';
2701 2701
         }
2702 2702
 
2703
-        $sql = 'UPDATE ' . $databaseName . $this->quote_string($table) . " SET ${SET} WHERE (${WHERE})";
2703
+        $sql = 'UPDATE '.$databaseName.$this->quote_string($table)." SET ${SET} WHERE (${WHERE})";
2704 2704
 
2705 2705
         $return = $this->query($sql);
2706 2706
         \assert(\is_int($return) || $return === false);
Please login to merge, or discard this patch.
src/voku/db/Debug.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         } else {
114 114
 
115 115
             // for testing with dev-address
116
-            $noDev = isset($_GET['noDev']) ? (int) $_GET['noDev'] : 0;
116
+            $noDev = isset($_GET['noDev']) ? (int)$_GET['noDev'] : 0;
117 117
             $remoteIpAddress = $_SERVER['REMOTE_ADDR'] ?? false;
118 118
 
119 119
             if (
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     {
164 164
         $fileInfo = $this->getFileAndLineFromSql();
165 165
 
166
-        $log = '[' . \date('Y-m-d H:i:s') . ']: SQL-Error: ' . $error . ' | Trace: ' . $fileInfo['path'] . '<br>';
166
+        $log = '['.\date('Y-m-d H:i:s').']: SQL-Error: '.$error.' | Trace: '.$fileInfo['path'].'<br>';
167 167
 
168 168
         $this->logger(['error', $log]);
169 169
 
@@ -179,17 +179,17 @@  discard block
 block discarded – undo
179 179
 
180 180
             if (\PHP_SAPI === 'cli') {
181 181
                 echo "\n";
182
-                echo 'Error: ' . $error . "\n";
183
-                echo 'Trace: ' . $fileInfo['path'] . "\n";
182
+                echo 'Error: '.$error."\n";
183
+                echo 'Trace: '.$fileInfo['path']."\n";
184 184
                 echo "\n";
185 185
             } else {
186 186
                 echo '
187
-                <div class="OBJ-mysql-box" style="border: ' . $box_border . '; background: ' . $box_bg . '; padding: 10px; margin: 10px;">
187
+                <div class="OBJ-mysql-box" style="border: ' . $box_border.'; background: '.$box_bg.'; padding: 10px; margin: 10px;">
188 188
                   <b style="font-size: 14px;">MYSQL Error:</b>
189 189
                   <code style="display: block;">
190
-                    Error:' . $error . '
190
+                    Error:' . $error.'
191 191
                     <br><br>
192
-                    Trace: ' . $fileInfo['path'] . '
192
+                    Trace: ' . $fileInfo['path'].'
193 193
                   </code>
194 194
                 </div>
195 195
                 ';
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
                 continue;
245 245
             }
246 246
 
247
-            $path .= ($referrer[$key]['class'] ?? $referrer[$key]['file'] ?? '') . '::' . ($referrer[$key]['function'] ?? '') . ':' . ($referrer[$key - 1]['line'] ?? '') . ' <- ';
247
+            $path .= ($referrer[$key]['class'] ?? $referrer[$key]['file'] ?? '').'::'.($referrer[$key]['function'] ?? '').':'.($referrer[$key - 1]['line'] ?? '').' <- ';
248 248
         }
249 249
 
250 250
         $return['path'] = $path;
@@ -324,11 +324,11 @@  discard block
 block discarded – undo
324 324
                 /** @noinspection PhpUsageOfSilenceOperatorInspection */
325 325
                 $traceStringExtra = @\mysqli_info($tmpLink);
326 326
                 if ($traceStringExtra) {
327
-                    $traceStringExtra = ' | info => ' . $traceStringExtra;
327
+                    $traceStringExtra = ' | info => '.$traceStringExtra;
328 328
                 }
329 329
             }
330 330
 
331
-            $traceStringExtra = ' | results => ' . \print_r($results, true) . $traceStringExtra;
331
+            $traceStringExtra = ' | results => '.\print_r($results, true).$traceStringExtra;
332 332
         }
333 333
 
334 334
         static $SLOW_QUERY_WARNING = null;
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
             $queryStatus = ' ERROR (REPEAT) ';
357 357
         }
358 358
 
359
-        $queryLog = '[' . \date('Y-m-d H:i:s') . ']: ' . $queryStatus . ' Duration: SQL::::DURATION-START' . \round($duration, 5) . 'SQL::::DURATION-END | Repeat: ' . $QUERY_LOG_FILE_INFO[$cacheKey] . ' | Host: ' . $this->_db->getConfig()['hostname'] . ' | Trace: ' . $fileInfo['path'] . ' | SQL: SQL::::QUERY-START ' . \str_replace("\n", '', $sql) . ' SQL::::QUERY-END' . $traceStringExtra . "\n";
359
+        $queryLog = '['.\date('Y-m-d H:i:s').']: '.$queryStatus.' Duration: SQL::::DURATION-START'.\round($duration, 5).'SQL::::DURATION-END | Repeat: '.$QUERY_LOG_FILE_INFO[$cacheKey].' | Host: '.$this->_db->getConfig()['hostname'].' | Trace: '.$fileInfo['path'].' | SQL: SQL::::QUERY-START '.\str_replace("\n", '', $sql).' SQL::::QUERY-END'.$traceStringExtra."\n";
360 360
 
361 361
         return $this->logger([$logLevel, $queryLog, 'sql']);
362 362
     }
@@ -429,11 +429,11 @@  discard block
 block discarded – undo
429 429
             mailToAdmin($subject, $htmlBody, $priority);
430 430
         } else {
431 431
             if ($priority === 3) {
432
-                $this->logger(['debug', $subject . ' | ' . $htmlBody]);
432
+                $this->logger(['debug', $subject.' | '.$htmlBody]);
433 433
             } elseif ($priority > 3) {
434
-                $this->logger(['error', $subject . ' | ' . $htmlBody]);
434
+                $this->logger(['error', $subject.' | '.$htmlBody]);
435 435
             } else {
436
-                $this->logger(['info', $subject . ' | ' . $htmlBody]);
436
+                $this->logger(['info', $subject.' | '.$htmlBody]);
437 437
             }
438 438
         }
439 439
     }
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
      */
446 446
     public function setEchoOnError($echo_on_error)
447 447
     {
448
-        $this->echo_on_error = (bool) $echo_on_error;
448
+        $this->echo_on_error = (bool)$echo_on_error;
449 449
     }
450 450
 
451 451
     /**
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
      */
456 456
     public function setExitOnError($exit_on_error)
457 457
     {
458
-        $this->exit_on_error = (bool) $exit_on_error;
458
+        $this->exit_on_error = (bool)$exit_on_error;
459 459
     }
460 460
 
461 461
     /**
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
      */
466 466
     public function setLoggerClassName($logger_class_name)
467 467
     {
468
-        $this->logger_class_name = (string) $logger_class_name;
468
+        $this->logger_class_name = (string)$logger_class_name;
469 469
     }
470 470
 
471 471
     /**
@@ -475,6 +475,6 @@  discard block
 block discarded – undo
475 475
      */
476 476
     public function setLoggerLevel($logger_level)
477 477
     {
478
-        $this->logger_level = (string) $logger_level;
478
+        $this->logger_level = (string)$logger_level;
479 479
     }
480 480
 }
Please login to merge, or discard this patch.