Passed
Push — master ( 47f1d1...f27cfc )
by P.R.
01:53
created
src/Wrapper/FunctionWrapper.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,14 +46,14 @@
 block discarded – undo
46 46
     if ($this->routine['return']=='bool')
47 47
     {
48 48
       $this->codeStore->append(sprintf("return !empty(\$this->executeSingleton0('select %s(%s)'));",
49
-                                       $this->routine['routine_name'],
50
-                                       $this->getRoutineArgs()));
49
+                                        $this->routine['routine_name'],
50
+                                        $this->getRoutineArgs()));
51 51
     }
52 52
     else
53 53
     {
54 54
       $this->codeStore->append(sprintf("return \$this->executeSingleton0('select %s(%s)');",
55
-                                       $this->routine['routine_name'],
56
-                                       $this->getRoutineArgs()));
55
+                                        $this->routine['routine_name'],
56
+                                        $this->getRoutineArgs()));
57 57
     }
58 58
   }
59 59
 
Please login to merge, or discard this patch.
src/Wrapper/Wrapper.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@
 block discarded – undo
264 264
       }
265 265
     }
266 266
 
267
-    if ($blobArgumentIndex>0)
267
+    if ($blobArgumentIndex > 0)
268 268
     {
269 269
       $this->codeStore->append('');
270 270
     }
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -502,9 +502,9 @@  discard block
 block discarded – undo
502 502
       $mangledName = $this->nameMangler->getParameterName($parameter['parameter_name']);
503 503
 
504 504
       $parameters[] = ['php_name'       => '$'.$mangledName,
505
-                       'description'    => $parameter['description'],
506
-                       'php_type'       => $parameter['php_type'],
507
-                       'dtd_identifier' => $parameter['dtd_identifier']];
505
+                        'description'    => $parameter['description'],
506
+                        'php_type'       => $parameter['php_type'],
507
+                        'dtd_identifier' => $parameter['dtd_identifier']];
508 508
     }
509 509
 
510 510
     $this->enhancePhpDocBlockParameters($parameters);
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
         {
534 534
           $line = array_shift($lines);
535 535
           $this->codeStore->append(sprintf($format, '@param', $parameter['php_type'], $parameter['php_name'], $line),
536
-                                   false);
536
+                                    false);
537 537
           foreach ($lines as $line)
538 538
           {
539 539
             $this->codeStore->append(sprintf($format, ' ', ' ', ' ', $line), false);
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
         else
543 543
         {
544 544
           $this->codeStore->append(sprintf($format, '@param', $parameter['php_type'], $parameter['php_name'], ''),
545
-                                   false);
545
+                                    false);
546 546
         }
547 547
 
548 548
         if ($parameter['dtd_identifier']!==null)
Please login to merge, or discard this patch.
src/Helper/Crud/BaseRoutine.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
                                                     $this->tableName,
265 265
                                                     $column['column_name'],
266 266
                                                     '%type')),
267
-                                 false);
267
+                                  false);
268 268
       }
269 269
 
270 270
       if ($column!=end($this->tableColumns))
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
                                                     $this->tableName,
315 315
                                                     $column['column_name'],
316 316
                                                     '%type')),
317
-                                 false);
317
+                                  false);
318 318
       }
319 319
 
320 320
       if ($column!=end($columns))
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -207,7 +207,7 @@
 block discarded – undo
207 207
     $keys = $this->keyList();
208 208
     if (!empty($keys))
209 209
     {
210
-      if (sizeof($keys)>1 || !isset($keys['PRIMARY']))
210
+      if (sizeof($keys) > 1 || !isset($keys['PRIMARY']))
211 211
       {
212 212
         $this->codeStore->append(' * ', false);
213 213
         $this->codeStore->append(' * Possible keys:', false);
Please login to merge, or discard this patch.
src/MySqlMetaDataLayer.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -400,7 +400,7 @@
 block discarded – undo
400 400
   {
401 401
     $sql = 'select @@sql_mode';
402 402
 
403
-    return (string)$this->executeSingleton1($sql);
403
+    return (string) $this->executeSingleton1($sql);
404 404
   }
405 405
 
406 406
   //--------------------------------------------------------------------------------------------------------------------
Please login to merge, or discard this patch.
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
 where  TABLE_SCHEMA = %s
179 179
 and    TABLE_TYPE   = 'BASE TABLE'
180 180
 order by TABLE_NAME",
181
-                   $this->dl->quoteString($schemaName));
181
+                    $this->dl->quoteString($schemaName));
182 182
 
183 183
     return $this->executeRows($sql);
184 184
   }
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 from   information_schema.TABLES
217 217
 where table_schema = database()
218 218
 and   table_name   = %s',
219
-                   $this->dl->quoteString($tableName));
219
+                    $this->dl->quoteString($tableName));
220 220
 
221 221
     return !empty($this->executeSingleton0($sql));
222 222
   }
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
                                            t2.PARAMETER_MODE  is not null
485 485
 where t1.ROUTINE_SCHEMA = database()
486 486
 and   t1.ROUTINE_NAME   = '%s'",
487
-                   $routineName);
487
+                    $routineName);
488 488
 
489 489
     return $this->executeRows($sql);
490 490
   }
@@ -546,9 +546,9 @@  discard block
 block discarded – undo
546 546
 where  TABLE_SCHEMA = ifnull(%s, database())
547 547
 and    TABLE_NAME   = %s
548 548
 and    COLUMN_NAME  = %s',
549
-                   $this->dl->quoteString($schemaName),
550
-                   $this->dl->quoteString($tableName),
551
-                   $this->dl->quoteString($columnName));
549
+                    $this->dl->quoteString($schemaName),
550
+                    $this->dl->quoteString($tableName),
551
+                    $this->dl->quoteString($columnName));
552 552
 
553 553
     return $this->executeRow1($sql);
554 554
   }
@@ -577,8 +577,8 @@  discard block
 block discarded – undo
577 577
 where  TABLE_SCHEMA = %s
578 578
 and    TABLE_NAME   = %s
579 579
 order by ORDINAL_POSITION',
580
-                   $this->dl->quoteString($schemaName),
581
-                   $this->dl->quoteString($tableName));
580
+                    $this->dl->quoteString($schemaName),
581
+                    $this->dl->quoteString($tableName));
582 582
 
583 583
     return $this->executeRows($sql);
584 584
   }
@@ -599,8 +599,8 @@  discard block
 block discarded – undo
599 599
     $sql = sprintf('
600 600
 show index from `%s`.`%s`
601 601
 where Key_name = \'PRIMARY\'',
602
-                   $schemaName,
603
-                   $tableName);
602
+                    $schemaName,
603
+                    $tableName);
604 604
 
605 605
     return $this->executeRows($sql);
606 606
   }
@@ -621,8 +621,8 @@  discard block
 block discarded – undo
621 621
     $sql = sprintf('
622 622
 show index from `%s`.`%s`
623 623
 where Non_unique = 0',
624
-                   $schemaName,
625
-                   $tableName);
624
+                    $schemaName,
625
+                    $tableName);
626 626
 
627 627
     return $this->executeRows($sql);
628 628
   }
Please login to merge, or discard this patch.
src/Backend/MySqlRoutineLoaderWorker.php 3 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -401,7 +401,8 @@
 block discarded – undo
401 401
   {
402 402
     $this->io->writeln('');
403 403
 
404
-    usort($this->sources, function ($a, $b) {
404
+    usort($this->sources, function ($a, $b)
405
+    {
405 406
       return strcmp($a['routine_name'], $b['routine_name']);
406 407
     });
407 408
 
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
       }
190 190
 
191 191
       $this->io->error(sprintf("The following source files would result wrapper methods with equal name '%s'",
192
-                               $method));
192
+                                $method));
193 193
       $this->io->listing($tmp);
194 194
     }
195 195
 
@@ -225,8 +225,8 @@  discard block
 block discarded – undo
225 225
       if (!isset($lookup[$oldRoutine['routine_name']]))
226 226
       {
227 227
         $this->io->logInfo('Dropping %s <dbo>%s</dbo>',
228
-                           strtolower($oldRoutine['routine_type']),
229
-                           $oldRoutine['routine_name']);
228
+                            strtolower($oldRoutine['routine_type']),
229
+                            $oldRoutine['routine_name']);
230 230
 
231 231
         $this->dl->dropRoutine($oldRoutine['routine_type'], $oldRoutine['routine_name']);
232 232
       }
@@ -585,9 +585,9 @@  discard block
 block discarded – undo
585 585
           if ($max!==null)
586 586
           {
587 587
             $value = sprintf('%s(%d) character set %s',
588
-                             $column['data_type'],
589
-                             $max,
590
-                             $column['character_set_name']);
588
+                              $column['data_type'],
589
+                              $max,
590
+                              $column['character_set_name']);
591 591
           }
592 592
           else
593 593
           {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
     $duplicatesMethods = [];
305 305
     foreach ($this->sources as $source)
306 306
     {
307
-      if (sizeof($lookup[$source['method_name']])>1)
307
+      if (sizeof($lookup[$source['method_name']]) > 1)
308 308
       {
309 309
         $duplicatesSources[$source['path_name']]   = $source;
310 310
         $duplicatesMethods[$source['method_name']] = $lookup[$source['method_name']];
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
   {
394 394
     $this->io->writeln('');
395 395
 
396
-    usort($this->sources, function ($a, $b) {
396
+    usort($this->sources, function($a, $b) {
397 397
       return strcmp($a['routine_name'], $b['routine_name']);
398 398
     });
399 399
 
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
 
474 474
     $size = $this->characterSets[$key]['maxlen'];
475 475
 
476
-    return (int)floor(self::MAX_COLUMN_SIZE / $size);
476
+    return (int) floor(self::MAX_COLUMN_SIZE / $size);
477 477
   }
478 478
 
479 479
   //--------------------------------------------------------------------------------------------------------------------
Please login to merge, or discard this patch.
src/Helper/RoutineParametersHelper.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
     foreach ($this->parameters as $parameter)
96 96
     {
97 97
       $parameters[] = ['parameter_name' => $parameter['parameter_name'],
98
-                       'php_type'       => DataTypeHelper::columnTypeToPhpTypeHinting($parameter).'|null',
99
-                       'dtd_identifier' => $parameter['dtd_identifier'],
100
-                       'description'    => $lookup[($parameter['parameter_name'])] ?? []];
98
+                        'php_type'       => DataTypeHelper::columnTypeToPhpTypeHinting($parameter).'|null',
99
+                        'dtd_identifier' => $parameter['dtd_identifier'],
100
+                        'description'    => $lookup[($parameter['parameter_name'])] ?? []];
101 101
     }
102 102
 
103 103
     return $parameters;
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
         if ($n!==1)
202 202
         {
203 203
           throw new RoutineLoaderException('Unable to parse data type description %s of parameter %s.',
204
-                                           $parameter['dtd_identifier'],
205
-                                           $parameter['parameter_name']);
204
+                                            $parameter['dtd_identifier'],
205
+                                            $parameter['parameter_name']);
206 206
         }
207 207
 
208 208
         $schemaName = $matches['schema'] ?? null;
@@ -249,10 +249,10 @@  discard block
 block discarded – undo
249 249
       }
250 250
 
251 251
       $this->parametersAddendum[$parameterName] = ['name'      => $parameterName,
252
-                                                   'data_type' => $dataType,
253
-                                                   'delimiter' => $delimiter,
254
-                                                   'enclosure' => $enclosure,
255
-                                                   'escape'    => $escape];
252
+                                                    'data_type' => $dataType,
253
+                                                    'delimiter' => $delimiter,
254
+                                                    'enclosure' => $enclosure,
255
+                                                    'escape'    => $escape];
256 256
     }
257 257
   }
258 258
 
Please login to merge, or discard this patch.
src/Helper/StratumMetadataHelper.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
   public function writeMetadata(StratumStyle $io): void
121 121
   {
122 122
     $data = ['revision' => $this->revision,
123
-             'routines' => $this->routines];
123
+              'routines' => $this->routines];
124 124
 
125 125
     $json = json_encode($data, JSON_PRETTY_PRINT);
126 126
     if (json_last_error()!==JSON_ERROR_NONE)
Please login to merge, or discard this patch.
src/Backend/MySqlConstantWorker.php 2 patches
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.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -365,8 +365,8 @@
 block discarded – undo
365 365
           if ($n===0)
366 366
           {
367 367
             throw new RuntimeException("Illegal format at line %d in file '%s'.",
368
-                                       $lineNumber,
369
-                                       $this->constantsFilename);
368
+                                        $lineNumber,
369
+                                        $this->constantsFilename);
370 370
           }
371 371
 
372 372
           if (isset($matches[6]))
Please login to merge, or discard this patch.
src/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.