@@ -400,7 +400,7 @@ |
||
| 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 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | $this->io->error(sprintf("The following source files would result wrapper methods with equal name '%s'", |
| 198 | - $method)); |
|
| 198 | + $method)); |
|
| 199 | 199 | $this->io->listing($tmp); |
| 200 | 200 | } |
| 201 | 201 | |
@@ -231,8 +231,8 @@ discard block |
||
| 231 | 231 | if (!isset($lookup[$oldRoutine['routine_name']])) |
| 232 | 232 | { |
| 233 | 233 | $this->io->logInfo('Dropping %s <dbo>%s</dbo>', |
| 234 | - strtolower($oldRoutine['routine_type']), |
|
| 235 | - $oldRoutine['routine_name']); |
|
| 234 | + strtolower($oldRoutine['routine_type']), |
|
| 235 | + $oldRoutine['routine_name']); |
|
| 236 | 236 | |
| 237 | 237 | $this->dl->dropRoutine($oldRoutine['routine_type'], $oldRoutine['routine_name']); |
| 238 | 238 | } |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | catch (RoutineLoaderException $e) |
| 429 | 429 | { |
| 430 | 430 | $messages = [$e->getMessage(), |
| 431 | - sprintf("Failed to load file '%s'", $filename['path_name'])]; |
|
| 431 | + sprintf("Failed to load file '%s'", $filename['path_name'])]; |
|
| 432 | 432 | $this->io->error($messages); |
| 433 | 433 | |
| 434 | 434 | $this->errorFilenames[] = $filename['path_name']; |
@@ -615,9 +615,9 @@ discard block |
||
| 615 | 615 | if ($max!==null) |
| 616 | 616 | { |
| 617 | 617 | $value = sprintf('%s(%d) character set %s', |
| 618 | - $column['data_type'], |
|
| 619 | - $max, |
|
| 620 | - $column['character_set_name']); |
|
| 618 | + $column['data_type'], |
|
| 619 | + $max, |
|
| 620 | + $column['character_set_name']); |
|
| 621 | 621 | } |
| 622 | 622 | else |
| 623 | 623 | { |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | $duplicates_methods = []; |
| 311 | 311 | foreach ($this->sources as $source) |
| 312 | 312 | { |
| 313 | - if (sizeof($lookup[$source['method_name']])>1) |
|
| 313 | + if (sizeof($lookup[$source['method_name']]) > 1) |
|
| 314 | 314 | { |
| 315 | 315 | $duplicates_sources[$source['path_name']] = $source; |
| 316 | 316 | $duplicates_methods[$source['method_name']] = $lookup[$source['method_name']]; |
@@ -401,7 +401,7 @@ discard block |
||
| 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 | return strcmp($a['routine_name'], $b['routine_name']); |
| 406 | 406 | }); |
| 407 | 407 | |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | |
| 482 | 482 | $size = $this->characterSets[$key]['maxlen']; |
| 483 | 483 | |
| 484 | - return (int)floor(self::MAX_COLUMN_SIZE / $size); |
|
| 484 | + return (int) floor(self::MAX_COLUMN_SIZE / $size); |
|
| 485 | 485 | } |
| 486 | 486 | |
| 487 | 487 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -515,7 +515,7 @@ discard block |
||
| 515 | 515 | { |
| 516 | 516 | if (file_exists($this->phpStratumMetadataFilename)) |
| 517 | 517 | { |
| 518 | - $this->phpStratumMetadata = (array)json_decode(file_get_contents($this->phpStratumMetadataFilename), true); |
|
| 518 | + $this->phpStratumMetadata = (array) json_decode(file_get_contents($this->phpStratumMetadataFilename), true); |
|
| 519 | 519 | if (json_last_error()!=JSON_ERROR_NONE) |
| 520 | 520 | { |
| 521 | 521 | throw new RuntimeException("Error decoding JSON: '%s'.", json_last_error_msg()); |
@@ -401,7 +401,8 @@ |
||
| 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 | |
@@ -563,9 +563,9 @@ discard block |
||
| 563 | 563 | foreach ($this->parameters as $parameter) |
| 564 | 564 | { |
| 565 | 565 | $parameters[] = ['parameter_name' => $parameter['parameter_name'], |
| 566 | - 'php_type' => DataTypeHelper::columnTypeToPhpTypeHinting($parameter).'|null', |
|
| 567 | - 'data_type_descriptor' => $parameter['data_type_descriptor'], |
|
| 568 | - 'description' => $lookup[($parameter['parameter_name'])] ?? []]; |
|
| 566 | + 'php_type' => DataTypeHelper::columnTypeToPhpTypeHinting($parameter).'|null', |
|
| 567 | + 'data_type_descriptor' => $parameter['data_type_descriptor'], |
|
| 568 | + 'description' => $lookup[($parameter['parameter_name'])] ?? []]; |
|
| 569 | 569 | } |
| 570 | 570 | |
| 571 | 571 | return ['sort_description' => $this->docBlockReflection->getShortDescription(), |
@@ -601,10 +601,10 @@ discard block |
||
| 601 | 601 | } |
| 602 | 602 | |
| 603 | 603 | $this->extendedParameters[$parameterName] = ['name' => $parameterName, |
| 604 | - 'data_type' => $dataType, |
|
| 605 | - 'delimiter' => $delimiter, |
|
| 606 | - 'enclosure' => $enclosure, |
|
| 607 | - 'escape' => $escape]; |
|
| 604 | + 'data_type' => $dataType, |
|
| 605 | + 'delimiter' => $delimiter, |
|
| 606 | + 'enclosure' => $enclosure, |
|
| 607 | + 'escape' => $escape]; |
|
| 608 | 608 | } |
| 609 | 609 | } |
| 610 | 610 | |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | { |
| 474 | 474 | throw new RoutineLoaderException('Tag @type not found in DocBlock.'); |
| 475 | 475 | } |
| 476 | - elseif (count($tags)>1) |
|
| 476 | + elseif (count($tags) > 1) |
|
| 477 | 477 | { |
| 478 | 478 | throw new RoutineLoaderException('Multiple @type tags found in DocBlock.'); |
| 479 | 479 | } |
@@ -856,11 +856,11 @@ discard block |
||
| 856 | 856 | } |
| 857 | 857 | |
| 858 | 858 | $start = $this->findFirstMatchingLine('/^\s*\/\*\*\s*$/'); |
| 859 | - $end = $this->findFirstMatchingLine('/^\s*\*\/\s*$/');; |
|
| 860 | - if ($start!==null && $end!==null && $start<$end) |
|
| 859 | + $end = $this->findFirstMatchingLine('/^\s*\*\/\s*$/'); ; |
|
| 860 | + if ($start!==null && $end!==null && $start < $end) |
|
| 861 | 861 | { |
| 862 | 862 | $lines = array_slice($this->routineSourceCodeLines, $start, $end - $start + 1); |
| 863 | - $docBlock = implode(PHP_EOL, (array)$lines); |
|
| 863 | + $docBlock = implode(PHP_EOL, (array) $lines); |
|
| 864 | 864 | } |
| 865 | 865 | else |
| 866 | 866 | { |