Passed
Pull Request — master (#568)
by Andreas
05:06
created
lib/Doctrine/DBAL/Migrations/Event/Listeners/AutoCommitListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     public function onMigrationsMigrated(MigrationsEventArgs $args)
35 35
     {
36 36
         $conn = $args->getConnection();
37
-        if ( ! $args->isDryRun() && ! $conn->isAutoCommit()) {
37
+        if (!$args->isDryRun() && !$conn->isAutoCommit()) {
38 38
             $conn->commit();
39 39
         }
40 40
     }
Please login to merge, or discard this patch.
lib/Doctrine/DBAL/Migrations/OutputWriter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     public function __construct(\Closure $closure = null)
35 35
     {
36 36
         if ($closure === null) {
37
-            $closure = function ($message) {
37
+            $closure = function($message) {
38 38
             };
39 39
         }
40 40
         $this->closure = $closure;
Please login to merge, or discard this patch.
lib/Doctrine/DBAL/Migrations/Tools/Console/Command/GenerateCommand.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
         $replacements = [
118 118
             $configuration->getMigrationsNamespace(),
119 119
             $version,
120
-            $up ? "        " . implode("\n        ", explode("\n", $up)) : null,
121
-            $down ? "        " . implode("\n        ", explode("\n", $down)) : null,
120
+            $up ? "        ".implode("\n        ", explode("\n", $up)) : null,
121
+            $down ? "        ".implode("\n        ", explode("\n", $down)) : null,
122 122
         ];
123 123
 
124 124
         $code = str_replace($placeHolders, $replacements, $this->getTemplate());
@@ -126,12 +126,12 @@  discard block
 block discarded – undo
126 126
 
127 127
         $directoryHelper = new MigrationDirectoryHelper($configuration);
128 128
         $dir             = $directoryHelper->getMigrationDirectory();
129
-        $path            = $dir . '/Version' . $version . '.php';
129
+        $path            = $dir.'/Version'.$version.'.php';
130 130
 
131 131
         file_put_contents($path, $code);
132 132
 
133 133
         if ($editorCmd = $input->getOption('editor-cmd')) {
134
-            proc_open($editorCmd . ' ' . escapeshellarg($path), [], $pipes);
134
+            proc_open($editorCmd.' '.escapeshellarg($path), [], $pipes);
135 135
         }
136 136
 
137 137
         return $path;
@@ -145,18 +145,18 @@  discard block
 block discarded – undo
145 145
             return;
146 146
         }
147 147
 
148
-        $filePath = getcwd() . '/' . $customTemplate;
148
+        $filePath = getcwd().'/'.$customTemplate;
149 149
 
150
-        if ( ! is_file($filePath) || ! is_readable($filePath)) {
150
+        if (!is_file($filePath) || !is_readable($filePath)) {
151 151
             throw new \InvalidArgumentException(
152
-                'The specified template "' . $customTemplate . '" cannot be found or is not readable.'
152
+                'The specified template "'.$customTemplate.'" cannot be found or is not readable.'
153 153
             );
154 154
         }
155 155
 
156 156
         $content = file_get_contents($filePath);
157 157
 
158 158
         if ($content === false) {
159
-            throw new \InvalidArgumentException('The specified template "' . $customTemplate . '" could not be read.');
159
+            throw new \InvalidArgumentException('The specified template "'.$customTemplate.'" could not be read.');
160 160
         }
161 161
 
162 162
         $output->writeln(sprintf('Using custom migration template "<info>%s</info>"', $customTemplate));
Please login to merge, or discard this patch.
DBAL/Migrations/Tools/Console/Helper/MigrationStatusInfosHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
         }
75 75
 
76 76
         //Show normal version number
77
-        return $this->configuration->getDateTime($version) . ' (<comment>' . $version . '</comment>)';
77
+        return $this->configuration->getDateTime($version).' (<comment>'.$version.'</comment>)';
78 78
     }
79 79
 
80 80
     /**
Please login to merge, or discard this patch.
lib/Doctrine/DBAL/Migrations/QueryWriter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Doctrine\DBAL\Migrations;
6 6
 
Please login to merge, or discard this patch.
lib/Doctrine/DBAL/Migrations/Tools/Console/Command/AbstractCommand.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $name = $configuration->getName();
63 63
         $name = $name ? $name : 'Doctrine Database Migrations';
64
-        $name = str_repeat(' ', 20) . $name . str_repeat(' ', 20);
65
-        $output->writeln('<question>' . str_repeat(' ', strlen($name)) . '</question>');
66
-        $output->writeln('<question>' . $name . '</question>');
67
-        $output->writeln('<question>' . str_repeat(' ', strlen($name)) . '</question>');
64
+        $name = str_repeat(' ', 20).$name.str_repeat(' ', 20);
65
+        $output->writeln('<question>'.str_repeat(' ', strlen($name)).'</question>');
66
+        $output->writeln('<question>'.$name.'</question>');
67
+        $output->writeln('<question>'.str_repeat(' ', strlen($name)).'</question>');
68 68
         $output->writeln('');
69 69
     }
70 70
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     protected function getMigrationConfiguration(InputInterface $input, OutputInterface $output)
89 89
     {
90
-        if ( ! $this->migrationConfiguration) {
90
+        if (!$this->migrationConfiguration) {
91 91
             if ($this->getHelperSet()->has('configuration')
92 92
                 && $this->getHelperSet()->get('configuration') instanceof ConfigurationHelperInterface) {
93 93
                 $configHelper = $this->getHelperSet()->get('configuration');
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
      */
119 119
     private function getOutputWriter(OutputInterface $output)
120 120
     {
121
-        if ( ! $this->outputWriter) {
122
-            $this->outputWriter = new OutputWriter(function ($message) use ($output) {
121
+        if (!$this->outputWriter) {
122
+            $this->outputWriter = new OutputWriter(function($message) use ($output) {
123 123
                 return $output->writeln($message);
124 124
             });
125 125
         }
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
                 new ConnectionConfigurationLoader($this->configuration),
148 148
             ]
149 149
         );
150
-        $connection  = $chainLoader->chosen();
150
+        $connection = $chainLoader->chosen();
151 151
 
152 152
         if ($connection) {
153 153
             return $this->connection = $connection;
Please login to merge, or discard this patch.