Passed
Push — master ( 638b9b...570f33 )
by P.R.
01:53
created
src/Exception/MySqlDataLayerException.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,8 +88,8 @@
 block discarded – undo
88 88
   protected function composerMessage(): array
89 89
   {
90 90
     return array_merge($this->splitIntoTwoColumns('MySQL Errno', (string)$this->errno),
91
-                       $this->splitIntoTwoColumns('Error', $this->error),
92
-                       $this->splitIntoTwoColumns('Method', $this->method));
91
+                        $this->splitIntoTwoColumns('Error', $this->error),
92
+                        $this->splitIntoTwoColumns('Method', $this->method));
93 93
   }
94 94
 
95 95
   //--------------------------------------------------------------------------------------------------------------------
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
    */
88 88
   protected function composerMessage(): array
89 89
   {
90
-    return array_merge($this->splitIntoTwoColumns('MySQL Errno', (string)$this->errno),
90
+    return array_merge($this->splitIntoTwoColumns('MySQL Errno', (string) $this->errno),
91 91
                        $this->splitIntoTwoColumns('Error', $this->error),
92 92
                        $this->splitIntoTwoColumns('Method', $this->method));
93 93
   }
Please login to merge, or discard this patch.
src/MySqlDataLayer.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1035,7 +1035,7 @@
 block discarded – undo
1035 1035
     if ($this->logQueries)
1036 1036
     {
1037 1037
       $this->queryLog[] = ['query' => $query,
1038
-                           'time'  => microtime(true) - $time0];
1038
+                            'time'  => microtime(true) - $time0];
1039 1039
     }
1040 1040
   }
1041 1041
 
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -326,11 +326,11 @@  discard block
 block discarded – undo
326 326
           $line = '';
327 327
           foreach ($row as $i => $field)
328 328
           {
329
-            if ($i>0)
329
+            if ($i > 0)
330 330
             {
331 331
               $line .= ' ';
332 332
             }
333
-            $line .= str_pad((string)$field, $fields[$i]->max_length);
333
+            $line .= str_pad((string) $field, $fields[$i]->max_length);
334 334
           }
335 335
           echo date('Y-m-d H:i:s'), ' ', $line, "\n";
336 336
           $n++;
@@ -703,16 +703,16 @@  discard block
 block discarded – undo
703 703
       $query            = "show variables like 'max_allowed_packet'";
704 704
       $maxAllowedPacket = $this->executeRow1($query);
705 705
 
706
-      $this->maxAllowedPacket = (int)$maxAllowedPacket['Value'];
706
+      $this->maxAllowedPacket = (int) $maxAllowedPacket['Value'];
707 707
 
708 708
       // Note: When setting $chunkSize equal to $maxAllowedPacket it is not possible to transmit a LOB
709 709
       // with size $maxAllowedPacket bytes (but only $maxAllowedPacket - 8 bytes). But when setting the size of
710 710
       // $chunkSize less than $maxAllowedPacket than it is possible to transmit a LOB with size
711 711
       // $maxAllowedPacket bytes.
712
-      $this->chunkSize = (int)min($this->maxAllowedPacket - 8, 1024 * 1024);
712
+      $this->chunkSize = (int) min($this->maxAllowedPacket - 8, 1024 * 1024);
713 713
     }
714 714
 
715
-    return (int)$this->maxAllowedPacket;
715
+    return (int) $this->maxAllowedPacket;
716 716
   }
717 717
 
718 718
   //--------------------------------------------------------------------------------------------------------------------
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
 
801 801
     if (is_int($value) || is_float($value))
802 802
     {
803
-      return (string)$value;
803
+      return (string) $value;
804 804
     }
805 805
 
806 806
     return "'".$this->mysqli->real_escape_string($value)."'";
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
       return 'null';
822 822
     }
823 823
 
824
-    return (string)$value;
824
+    return (string) $value;
825 825
   }
826 826
 
827 827
   //--------------------------------------------------------------------------------------------------------------------
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
       return 'null';
840 840
     }
841 841
 
842
-    return (string)$value;
842
+    return (string) $value;
843 843
   }
844 844
 
845 845
   //--------------------------------------------------------------------------------------------------------------------
@@ -1140,7 +1140,7 @@  discard block
 block discarded – undo
1140 1140
     {
1141 1141
       $n = strlen($data);
1142 1142
       $p = 0;
1143
-      while ($p<$n)
1143
+      while ($p < $n)
1144 1144
       {
1145 1145
         $success = @$statement->send_long_data($paramNr, substr($data, $p, $this->chunkSize));
1146 1146
         if (!$success)
@@ -1183,13 +1183,13 @@  discard block
 block discarded – undo
1183 1183
     foreach ($columns as $column)
1184 1184
     {
1185 1185
       $separator .= str_repeat('-', $column['length'] + 2).'+';
1186
-      $spaces    = ($column['length'] + 2) - mb_strlen((string)$column['header']);
1186
+      $spaces = ($column['length'] + 2) - mb_strlen((string) $column['header']);
1187 1187
 
1188
-      $spacesLeft  = (int)floor($spaces / 2);
1189
-      $spacesRight = (int)ceil($spaces / 2);
1188
+      $spacesLeft  = (int) floor($spaces / 2);
1189
+      $spacesRight = (int) ceil($spaces / 2);
1190 1190
 
1191
-      $fillerLeft  = ($spacesLeft>0) ? str_repeat(' ', $spacesLeft) : '';
1192
-      $fillerRight = ($spacesRight>0) ? str_repeat(' ', $spacesRight) : '';
1191
+      $fillerLeft  = ($spacesLeft > 0) ? str_repeat(' ', $spacesLeft) : '';
1192
+      $fillerRight = ($spacesRight > 0) ? str_repeat(' ', $spacesRight) : '';
1193 1193
 
1194 1194
       $header .= $fillerLeft.$column['header'].$fillerRight.'|';
1195 1195
     }
@@ -1208,7 +1208,7 @@  discard block
 block discarded – undo
1208 1208
    */
1209 1209
   private function executeTableShowTableColumn(array $column, mixed $value): void
1210 1210
   {
1211
-    $spaces = str_repeat(' ', max($column['length'] - mb_strlen((string)$value), 0));
1211
+    $spaces = str_repeat(' ', max($column['length'] - mb_strlen((string) $value), 0));
1212 1212
 
1213 1213
     switch ($column['type'])
1214 1214
     {
Please login to merge, or discard this patch.
src/Helper/DataTypeHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 
99 99
       case 'decimal':
100 100
         $ret = $dataTypeInfo['numeric_precision'];
101
-        if ($dataTypeInfo['numeric_scale']>0)
101
+        if ($dataTypeInfo['numeric_scale'] > 0)
102 102
         {
103 103
           $ret += 1;
104 104
         }
Please login to merge, or discard this patch.
src/Helper/RoutineLoaderHelper.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -531,9 +531,9 @@
 block discarded – undo
531 531
   private function extractParameters(): void
532 532
   {
533 533
     $this->routineParameters = new RoutineParametersHelper($this->dl,
534
-                                                           $this->io,
535
-                                                           $this->docBlockReflection,
536
-                                                           $this->routineName);
534
+                                                            $this->io,
535
+                                                            $this->docBlockReflection,
536
+                                                            $this->routineName);
537 537
 
538 538
     $this->routineParameters->extractRoutineParameters();
539 539
   }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -491,7 +491,7 @@  discard block
 block discarded – undo
491 491
     {
492 492
       throw new RoutineLoaderException('Tag @type not found in DocBlock.');
493 493
     }
494
-    elseif (count($tags)>1)
494
+    elseif (count($tags) > 1)
495 495
     {
496 496
       throw new RoutineLoaderException('Multiple @type tags found in DocBlock.');
497 497
     }
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
       $key1 = $this->findFirstMatchingLine('/^\s*(as|is)\s*$/i');
655 655
       $key2 = $this->findFirstMatchingLine('/^\s*begin\s*$/i');
656 656
 
657
-      if ($key1!==null && $key2!==null && $key1<$key2)
657
+      if ($key1!==null && $key2!==null && $key1 < $key2)
658 658
       {
659 659
         $this->syntax = self::PL_SQL_SYNTAX;
660 660
       }
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
 
827 827
     $start = $this->findFirstMatchingLine('/^\s*\/\*\*\s*$/');
828 828
     $end   = $this->findFirstMatchingLine('/^\s*\*\/\s*$/');
829
-    if ($start!==null && $end!==null && $start<$end)
829
+    if ($start!==null && $end!==null && $start < $end)
830 830
     {
831 831
       $lines    = array_slice($this->routineSourceCodeLines, $start, $end - $start + 1);
832 832
       $docBlock = implode(PHP_EOL, $lines);
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
    */
912 912
   private function updateSourceTypeHints(): void
913 913
   {
914
-    $types   = ['int',
914
+    $types = ['int',
915 915
                 'smallint',
916 916
                 'tinyint',
917 917
                 'mediumint',
@@ -941,7 +941,7 @@  discard block
 block discarded – undo
941 941
                 'text',
942 942
                 'mediumtext',
943 943
                 'longtext'];
944
-    $parts   = ['whitespace' => '(?<whitespace>\s+)',
944
+    $parts = ['whitespace' => '(?<whitespace>\s+)',
945 945
                 'type_list'  => str_replace('type-list',
946 946
                                             implode('|', $types),
947 947
                                             '(?<datatype>(type-list).*)'),
@@ -987,7 +987,7 @@  discard block
 block discarded – undo
987 987
                                                         $matches['nullable'],
988 988
                                                         $punctuation,
989 989
                                                         $matches['hint']);
990
-        $this->typeHints[$hint]               = $actualType;
990
+        $this->typeHints[$hint] = $actualType;
991 991
       }
992 992
     }
993 993
 
Please login to merge, or discard this patch.