Completed
Push — master ( 956196...175692 )
by Gaetano
09:59
created
Core/Executor/ContentTypeManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
         // Authenticate the user
30 30
         $this->loginUser();
31 31
 
32
-        foreach(array('identifier', 'content_type_group', 'name_pattern', 'name', 'attributes') as $key) {
32
+        foreach (array('identifier', 'content_type_group', 'name_pattern', 'name', 'attributes') as $key) {
33 33
             if (!array_key_exists($key, $this->dsl)) {
34 34
                 throw new \Exception("The '$key' key is missing in a content type creation definition");
35 35
             }
Please login to merge, or discard this patch.
Core/Executor/ContentManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
             }
178 178
 
179 179
             $draft = $contentService->createContentDraft($contentInfo);
180
-            $contentService->updateContent($draft->versionInfo,$contentUpdateStruct);
180
+            $contentService->updateContent($draft->versionInfo, $contentUpdateStruct);
181 181
             $content = $contentService->publishVersion($draft->versionInfo);
182 182
 
183 183
             if (array_key_exists('new_remote_id', $this->dsl)) {
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
      * @param ContentCreateStruct $createStruct
222 222
      * @param array $fields
223 223
      */
224
-    protected function setFields(ContentCreateStruct &$createStruct, array $fields)
224
+    protected function setFields(ContentCreateStruct & $createStruct, array $fields)
225 225
     {
226 226
         foreach ($fields as $field) {
227 227
             // each $field is one key value pair
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
      * @param ContentUpdateStruct $updateStruct
249 249
      * @param array $fields
250 250
      */
251
-    protected function setFieldsToUpdate(ContentUpdateStruct &$updateStruct, array $fields, ContentType $contentType)
251
+    protected function setFieldsToUpdate(ContentUpdateStruct & $updateStruct, array $fields, ContentType $contentType)
252 252
     {
253 253
         foreach ($fields as $field) {
254 254
             // each $field is one key value pair
Please login to merge, or discard this patch.
Command/MigrateCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $migrationsService = $this->getMigrationService();
64 64
 
65
-        $migrationDefinitions = $migrationsService->getMigrationsDefinitions($input->getOption('path')) ;
65
+        $migrationDefinitions = $migrationsService->getMigrationsDefinitions($input->getOption('path'));
66 66
         $migrations = $migrationsService->getMigrations();
67 67
 
68 68
         if (!count($migrationDefinitions)) {
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
         // filter away all migrations except 'to do' ones
74 74
         $toExecute = array();
75
-        foreach($migrationDefinitions as $name => $migrationDefinition) {
75
+        foreach ($migrationDefinitions as $name => $migrationDefinition) {
76 76
             if (!isset($migrations[$name]) || (($migration = $migrations[$name]) && $migration->status == Migration::STATUS_TODO)) {
77 77
                 $toExecute[$name] = $migrationsService->parseMigrationDefinition($migrationDefinition);
78 78
             }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
         $data = array();
91 91
         $i = 1;
92
-        foreach($toExecute as $name => $migrationDefinition) {
92
+        foreach ($toExecute as $name => $migrationDefinition) {
93 93
             $notes = '';
94 94
             if ($migrationDefinition->status != MigrationDefinition::STATUS_PARSED) {
95 95
                 $notes = '<error>' . $migrationDefinition->parsingError . '</error>';
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
             $output->writeln("=============================================\n");
125 125
         }
126 126
 
127
-        foreach($toExecute as $name => $migrationDefinition) {
127
+        foreach ($toExecute as $name => $migrationDefinition) {
128 128
 
129 129
             // let's skip migrations that we know are invalid - user was warned and he decide to proceed anyway
130 130
             if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
136 136
 
137 137
             try {
138 138
                 $migrationsService->executeMigration($migrationDefinition);
139
-            } catch(\Exception $e) {
139
+            } catch (\Exception $e) {
140 140
                 if ($input->getOption('ignore-failures')) {
141
-                    $output->writeln("\n<error>Migration failed! Reason: ".$this->getFullExceptionMessage($e)."</error>\n");
141
+                    $output->writeln("\n<error>Migration failed! Reason: " . $this->getFullExceptionMessage($e) . "</error>\n");
142 142
                     continue;
143 143
                 }
144
-                $output->writeln("\n<error>Migration aborted! Reason: ".$this->getFullExceptionMessage($e)."</error>");
144
+                $output->writeln("\n<error>Migration aborted! Reason: " . $this->getFullExceptionMessage($e) . "</error>");
145 145
                 return 1;
146 146
             }
147 147
 
Please login to merge, or discard this patch.