Passed
Push — master ( 7b3273...a2a733 )
by Joao
02:06
created
src/builder/Scripts.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -123,14 +123,14 @@  discard block
 block discarded – undo
123 123
 
124 124
         $migration = new Migration(new Uri($dbConnection), $this->workdir . "/db");
125 125
         $migration->registerDatabase("mysql", MySqlDatabase::class);
126
-        $migration->addCallbackProgress(function ($cmd, $version) {
126
+        $migration->addCallbackProgress(function($cmd, $version) {
127 127
             echo "Doing $cmd, $version\n";
128 128
         });
129 129
 
130 130
         $argumentList = $this->extractArguments($arguments);
131 131
 
132
-        $exec['reset'] = function () use ($migration, $argumentList) {
133
-            if (!$argumentList["--yes"]) {
132
+        $exec[ 'reset' ] = function() use ($migration, $argumentList) {
133
+            if (!$argumentList[ "--yes" ]) {
134 134
                 throw new \Exception("Reset require the argument --yes");
135 135
             }
136 136
             $migration->prepareEnvironment();
@@ -138,12 +138,12 @@  discard block
 block discarded – undo
138 138
         };
139 139
 
140 140
 
141
-        $exec["update"] = function () use ($migration, $argumentList) {
142
-            $migration->update($argumentList["--up-to"], $argumentList["--force"]);
141
+        $exec[ "update" ] = function() use ($migration, $argumentList) {
142
+            $migration->update($argumentList[ "--up-to" ], $argumentList[ "--force" ]);
143 143
         };
144 144
 
145
-        if (isset($exec[$argumentList['command']])) {
146
-            $exec[$argumentList['command']]();
145
+        if (isset($exec[ $argumentList[ 'command' ] ])) {
146
+            $exec[ $argumentList[ 'command' ] ]();
147 147
         }
148 148
     }
149 149
 
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
             '--force' => false,
159 159
         ];
160 160
 
161
-        $ret['command'] = isset($arguments[0]) ? $arguments[0] : null;
161
+        $ret[ 'command' ] = isset($arguments[ 0 ]) ? $arguments[ 0 ] : null;
162 162
 
163
-        for ($i=1; $i < count($arguments); $i++) {
164
-            $args = explode("=", $arguments[$i]);
165
-            $ret[$args[0]] = isset($args[1]) ? $args[1] : true;
163
+        for ($i = 1; $i < count($arguments); $i++) {
164
+            $args = explode("=", $arguments[ $i ]);
165
+            $ret[ $args[ 0 ] ] = isset($args[ 1 ]) ? $args[ 1 ] : true;
166 166
         }
167 167
 
168 168
         return $ret;
Please login to merge, or discard this patch.