Passed
Push — master ( f71b04...7dcb0c )
by P.R.
12:30
created
src/Backend/MySqlConstantWorker.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             if ($token[0]==T_WHITESPACE)
222 222
             {
223 223
               $line2 = $token[2];
224
-              if (substr_count($token[1], "\n")>1)
224
+              if (substr_count($token[1], "\n") > 1)
225 225
               {
226 226
                 // Whitespace contains new line: end doc block without constants.
227 227
                 $step = 4;
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
           {
249 249
             if ($token[0]==T_WHITESPACE)
250 250
             {
251
-              if (substr_count($token[1], "\n")<=1)
251
+              if (substr_count($token[1], "\n") <= 1)
252 252
               {
253 253
                 // Ignore whitespace.
254 254
                 $line3 = $token[2];
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
     foreach ($this->constants as $constant => $value)
431 431
     {
432 432
       $width1 = max(mb_strlen($constant), $width1);
433
-      $width2 = max(mb_strlen((string)$value), $width2);
433
+      $width2 = max(mb_strlen((string) $value), $width2);
434 434
     }
435 435
 
436 436
     $format = sprintf('  const %%-%ds = %%%dd;', $width1, $width2);
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
       foreach ($table as $column)
478 478
       {
479 479
         $width1 = max(mb_strlen($column['column_name']), $width1);
480
-        $width2 = max(mb_strlen((string)$column['length']), $width2);
480
+        $width2 = max(mb_strlen((string) $column['length']), $width2);
481 481
       }
482 482
 
483 483
       foreach ($table as $column)
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
         {
487 487
           if (isset($column['constant_name']))
488 488
           {
489
-            $format  = sprintf("%%s.%%-%ds %%%dd %%s\n", $width1, $width2);
489
+            $format = sprintf("%%s.%%-%ds %%%dd %%s\n", $width1, $width2);
490 490
             $content .= sprintf($format,
491 491
                                 $column['table_name'],
492 492
                                 $column['column_name'],
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
           }
496 496
           else
497 497
           {
498
-            $format  = sprintf("%%s.%%-%ds %%%dd\n", $width1, $width2);
498
+            $format = sprintf("%%s.%%-%ds %%%dd\n", $width1, $width2);
499 499
             $content .= sprintf($format,
500 500
                                 $column['table_name'],
501 501
                                 $column['column_name'],
Please login to merge, or discard this patch.
src/Exception/MySqlQueryErrorException.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,9 +98,9 @@
 block discarded – undo
98 98
   protected function composerMessage(): array
99 99
   {
100 100
     return array_merge($this->splitIntoTwoColumns('MySQL Errno', (string)$this->errno),
101
-                       $this->splitIntoTwoColumns('Error', $this->error),
102
-                       $this->splitIntoTwoColumns('Query', $this->query),
103
-                       $this->splitIntoTwoColumns('Method', $this->method));
101
+                        $this->splitIntoTwoColumns('Error', $this->error),
102
+                        $this->splitIntoTwoColumns('Query', $this->query),
103
+                        $this->splitIntoTwoColumns('Method', $this->method));
104 104
   }
105 105
 
106 106
   //--------------------------------------------------------------------------------------------------------------------
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
    */
98 98
   protected function composerMessage(): array
99 99
   {
100
-    return array_merge($this->splitIntoTwoColumns('MySQL Errno', (string)$this->errno),
100
+    return array_merge($this->splitIntoTwoColumns('MySQL Errno', (string) $this->errno),
101 101
                        $this->splitIntoTwoColumns('Error', $this->error),
102 102
                        $this->splitIntoTwoColumns('Query', $this->query),
103 103
                        $this->splitIntoTwoColumns('Method', $this->method));
Please login to merge, or discard this patch.
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   +16 added lines, -16 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,13 +703,13 @@  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 715
     return $this->maxAllowedPacket;
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
    *
792 792
    * @return string
793 793
    */
794
-  public function quoteDecimal(int|float|string|null $value): string
794
+  public function quoteDecimal(int | float | string | null $value): string
795 795
   {
796 796
     if ($value===null || $value==='')
797 797
     {
@@ -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
   //--------------------------------------------------------------------------------------------------------------------
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
    *
857 857
    * @throws LogicException
858 858
    */
859
-  public function quoteListOfInt(array|string|null $list, string $delimiter, string $enclosure, string $escape): string
859
+  public function quoteListOfInt(array | string | null $list, string $delimiter, string $enclosure, string $escape): string
860 860
   {
861 861
     if ($list===null || $list==='' || $list===[])
862 862
     {
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
     {
1131 1131
       $n = strlen($data);
1132 1132
       $p = 0;
1133
-      while ($p<$n)
1133
+      while ($p < $n)
1134 1134
       {
1135 1135
         $success = @$statement->send_long_data($paramNr, substr($data, $p, $this->chunkSize));
1136 1136
         if (!$success)
@@ -1173,13 +1173,13 @@  discard block
 block discarded – undo
1173 1173
     foreach ($columns as $column)
1174 1174
     {
1175 1175
       $separator .= str_repeat('-', $column['length'] + 2).'+';
1176
-      $spaces    = ($column['length'] + 2) - mb_strlen((string)$column['header']);
1176
+      $spaces = ($column['length'] + 2) - mb_strlen((string) $column['header']);
1177 1177
 
1178
-      $spacesLeft  = (int)floor($spaces / 2);
1179
-      $spacesRight = (int)ceil($spaces / 2);
1178
+      $spacesLeft  = (int) floor($spaces / 2);
1179
+      $spacesRight = (int) ceil($spaces / 2);
1180 1180
 
1181
-      $fillerLeft  = ($spacesLeft>0) ? str_repeat(' ', $spacesLeft) : '';
1182
-      $fillerRight = ($spacesRight>0) ? str_repeat(' ', $spacesRight) : '';
1181
+      $fillerLeft  = ($spacesLeft > 0) ? str_repeat(' ', $spacesLeft) : '';
1182
+      $fillerRight = ($spacesRight > 0) ? str_repeat(' ', $spacesRight) : '';
1183 1183
 
1184 1184
       $header .= $fillerLeft.$column['header'].$fillerRight.'|';
1185 1185
     }
@@ -1198,7 +1198,7 @@  discard block
 block discarded – undo
1198 1198
    */
1199 1199
   private function executeTableShowTableColumn(array $column, mixed $value): void
1200 1200
   {
1201
-    $spaces = str_repeat(' ', max($column['length'] - mb_strlen((string)$value), 0));
1201
+    $spaces = str_repeat(' ', max($column['length'] - mb_strlen((string) $value), 0));
1202 1202
 
1203 1203
     switch ($column['type'])
1204 1204
     {
Please login to merge, or discard this patch.
src/Wrapper/MysqlWrapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -234,7 +234,7 @@
 block discarded – undo
234 234
       }
235 235
     }
236 236
 
237
-    if ($blobArgumentIndex>0)
237
+    if ($blobArgumentIndex > 0)
238 238
     {
239 239
       $context->codeStore->append('');
240 240
     }
Please login to merge, or discard this patch.
src/Loader/MySqlRoutineLoader.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@
 block discarded – undo
216 216
     if (!empty($context->oldRdbmsMetadata))
217 217
     {
218 218
       $this->dl->dropRoutine($context->oldRdbmsMetadata['routine_type'],
219
-                             $context->oldRdbmsMetadata['routine_name']);
219
+                              $context->oldRdbmsMetadata['routine_name']);
220 220
     }
221 221
   }
222 222
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -364,7 +364,7 @@
 block discarded – undo
364 364
       $key1 = $this->findFirstMatchingLine($context, '/^\s*(as|is)\s*$/i');
365 365
       $key2 = $this->findFirstMatchingLine($context, '/^\s*begin\s*$/i');
366 366
 
367
-      if ($key1!==null && $key2!==null && $key1<$key2)
367
+      if ($key1!==null && $key2!==null && $key1 < $key2)
368 368
       {
369 369
         $this->syntax = self::PL_SQL_SYNTAX;
370 370
       }
Please login to merge, or discard this patch.
src/Loader/Helper/SqlModeHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
     if ($this->currentSqlMode!==$this->canonicalSqlModeWithOracle)
92 92
     {
93 93
       $this->dl->setSqlMode($this->canonicalSqlModeWithOracle);
94
-      $this->currentSqlMode = (string)$this->canonicalSqlModeWithOracle;
94
+      $this->currentSqlMode = (string) $this->canonicalSqlModeWithOracle;
95 95
     }
96 96
   }
97 97
 
Please login to merge, or discard this patch.
src/Loader/Helper/MySqlDataTypeHelper.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/Loader/Helper/RoutineParametersHelper.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
         if ($n!==1)
134 134
         {
135 135
           throw new RoutineLoaderException('Unable to parse data type description %s of parameter %s.',
136
-                                           $parameter['dtd_identifier'],
137
-                                           $parameter['parameter_name']);
136
+                                            $parameter['dtd_identifier'],
137
+                                            $parameter['parameter_name']);
138 138
         }
139 139
 
140 140
         $schemaName = $matches['schema'] ?? null;
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
       if ($n!==1)
171 171
       {
172 172
         throw new RoutineLoaderException('Expected: @paramAddendum <name> <type_of_list> <delimiter> <enclosure> <escape>. Found %s',
173
-                                         $tag);
173
+                                          $tag);
174 174
       }
175 175
 
176 176
       $parameterName = $matches['name'];
@@ -180,10 +180,10 @@  discard block
 block discarded – undo
180 180
       }
181 181
 
182 182
       $this->parametersAddendum[$parameterName] = ['name'      => $parameterName,
183
-                                                   'data_type' => $matches['type'],
184
-                                                   'delimiter' => $matches['delimiter'],
185
-                                                   'enclosure' => $matches['enclosure'],
186
-                                                   'escape'    => $matches['escape']];
183
+                                                    'data_type' => $matches['type'],
184
+                                                    'delimiter' => $matches['delimiter'],
185
+                                                    'enclosure' => $matches['enclosure'],
186
+                                                    'escape'    => $matches['escape']];
187 187
     }
188 188
   }
189 189
 
Please login to merge, or discard this patch.