Passed
Push — master ( a14551...d756ab )
by P.R.
15:39 queued 12:56
created
src/MySqlDataLayer.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -303,8 +303,8 @@  discard block
 block discarded – undo
303 303
           $line = '';
304 304
           foreach ($row as $i => $field)
305 305
           {
306
-            if ($i>0) $line .= ' ';
307
-            $line .= str_pad((string)$field, $fields[$i]->max_length);
306
+            if ($i > 0) $line .= ' ';
307
+            $line .= str_pad((string) $field, $fields[$i]->max_length);
308 308
           }
309 309
           echo date('Y-m-d H:i:s'), ' ', $line, "\n";
310 310
           $n++;
@@ -644,16 +644,16 @@  discard block
 block discarded – undo
644 644
       $query            = "show variables like 'max_allowed_packet'";
645 645
       $maxAllowedPacket = $this->executeRow1($query);
646 646
 
647
-      $this->maxAllowedPacket = (int)$maxAllowedPacket['Value'];
647
+      $this->maxAllowedPacket = (int) $maxAllowedPacket['Value'];
648 648
 
649 649
       // Note: When setting $chunkSize equal to $maxAllowedPacket it is not possible to transmit a LOB
650 650
       // with size $maxAllowedPacket bytes (but only $maxAllowedPacket - 8 bytes). But when setting the size of
651 651
       // $chunkSize less than $maxAllowedPacket than it is possible to transmit a LOB with size
652 652
       // $maxAllowedPacket bytes.
653
-      $this->chunkSize = (int)min($this->maxAllowedPacket - 8, 1024 * 1024);
653
+      $this->chunkSize = (int) min($this->maxAllowedPacket - 8, 1024 * 1024);
654 654
     }
655 655
 
656
-    return (int)$this->maxAllowedPacket;
656
+    return (int) $this->maxAllowedPacket;
657 657
   }
658 658
 
659 659
   //--------------------------------------------------------------------------------------------------------------------
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
   {
734 734
     if ($value===null || $value==='') return 'null';
735 735
 
736
-    if (is_int($value) || is_float($value)) return (string)$value;
736
+    if (is_int($value) || is_float($value)) return (string) $value;
737 737
 
738 738
     return "'".$this->mysqli->real_escape_string($value)."'";
739 739
   }
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
   {
751 751
     if ($value===null) return 'null';
752 752
 
753
-    return (string)$value;
753
+    return (string) $value;
754 754
   }
755 755
 
756 756
   //--------------------------------------------------------------------------------------------------------------------
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
   {
766 766
     if ($value===null) return 'null';
767 767
 
768
-    return (string)$value;
768
+    return (string) $value;
769 769
   }
770 770
 
771 771
   //--------------------------------------------------------------------------------------------------------------------
@@ -1057,7 +1057,7 @@  discard block
 block discarded – undo
1057 1057
     {
1058 1058
       $n = strlen($data);
1059 1059
       $p = 0;
1060
-      while ($p<$n)
1060
+      while ($p < $n)
1061 1061
       {
1062 1062
         $success = @$statement->send_long_data($paramNr, substr($data, $p, $this->chunkSize));
1063 1063
         if (!$success) throw $this->dataLayerError('mysqli_stmt::send_long_data');
@@ -1097,13 +1097,13 @@  discard block
 block discarded – undo
1097 1097
     foreach ($columns as $column)
1098 1098
     {
1099 1099
       $separator .= str_repeat('-', $column['length'] + 2).'+';
1100
-      $spaces    = ($column['length'] + 2) - mb_strlen((string)$column['header']);
1100
+      $spaces = ($column['length'] + 2) - mb_strlen((string) $column['header']);
1101 1101
 
1102
-      $spacesLeft  = (int)floor($spaces / 2);
1103
-      $spacesRight = (int)ceil($spaces / 2);
1102
+      $spacesLeft  = (int) floor($spaces / 2);
1103
+      $spacesRight = (int) ceil($spaces / 2);
1104 1104
 
1105
-      $fillerLeft  = ($spacesLeft>0) ? str_repeat(' ', $spacesLeft) : '';
1106
-      $fillerRight = ($spacesRight>0) ? str_repeat(' ', $spacesRight) : '';
1105
+      $fillerLeft  = ($spacesLeft > 0) ? str_repeat(' ', $spacesLeft) : '';
1106
+      $fillerRight = ($spacesRight > 0) ? str_repeat(' ', $spacesRight) : '';
1107 1107
 
1108 1108
       $header .= $fillerLeft.$column['header'].$fillerRight.'|';
1109 1109
     }
@@ -1122,7 +1122,7 @@  discard block
 block discarded – undo
1122 1122
    */
1123 1123
   private function executeTableShowTableColumn(array $column, mixed $value): void
1124 1124
   {
1125
-    $spaces = str_repeat(' ', max($column['length'] - mb_strlen((string)$value), 0));
1125
+    $spaces = str_repeat(' ', max($column['length'] - mb_strlen((string) $value), 0));
1126 1126
 
1127 1127
     switch ($column['type'])
1128 1128
     {
Please login to merge, or discard this patch.