Completed
Pull Request — master (#92)
by
unknown
07:03
created
Core/Executor/LocationManager.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 
228 228
     /**
229 229
      * @param int|string|array $locationKey
230
-     * @return mixed
230
+     * @return Location
231 231
      */
232 232
     public function matchLocationByKey($locationKey)
233 233
     {
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
      * The Location Manager currently supports setting references to location id.
326 326
      *
327 327
      * @throws \InvalidArgumentException When trying to set a reference to an unsupported attribute.
328
-     * @param \eZ\Publish\API\Repository\Values\Content\Location|LocationCollection $location
328
+     * @param LocationCollection|null $location
329 329
      * @return boolean
330 330
      */
331 331
     protected function setReferences($location)
Please login to merge, or discard this patch.
Core/Matcher/TagMatcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             return array(self::MATCH_TAG_ID => $key);
87 87
         }
88 88
 
89
-        throw new \Exception("Tag matcher can not uniquely identify the type of key used to match: ".key);
89
+        throw new \Exception("Tag matcher can not uniquely identify the type of key used to match: " . key);
90 90
     }
91 91
 
92 92
     /**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
         foreach ($tagKeywords as $tagKeyword) {
137 137
             // return unique contents
138
-            foreach($this->tagService->loadTagsByKeyword($tagKeyword, $availableLanguages[0]) as $tag) {
138
+            foreach ($this->tagService->loadTagsByKeyword($tagKeyword, $availableLanguages[0]) as $tag) {
139 139
                 $tags[$tag->id] = $tag;
140 140
             }
141 141
         }
Please login to merge, or discard this patch.
Core/ComplexField/ComplexFieldManager.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,8 +52,7 @@
 block discarded – undo
52 52
         if (isset($this->fieldTypeMap[$contentTypeIdentifier][$fieldTypeIdentifier]) || isset($this->fieldTypeMap['*'][$fieldTypeIdentifier]))
53 53
         {
54 54
             $fieldService = isset($this->fieldTypeMap[$contentTypeIdentifier][$fieldTypeIdentifier]) ?
55
-                $this->fieldTypeMap[$contentTypeIdentifier][$fieldTypeIdentifier] :
56
-                $this->fieldTypeMap['*'][$fieldTypeIdentifier];
55
+                $this->fieldTypeMap[$contentTypeIdentifier][$fieldTypeIdentifier] : $this->fieldTypeMap['*'][$fieldTypeIdentifier];
57 56
             return $fieldService->createValue($fieldValue, $context);
58 57
         }
59 58
         else
Please login to merge, or discard this patch.
Core/StorageHandler/Database.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         );
117 117
         try {
118 118
             $conn->insert($this->migrationsTableName, $this->migrationToArray($migration));
119
-        } catch(UniqueConstraintViolationException $e) {
119
+        } catch (UniqueConstraintViolationException $e) {
120 120
             throw new \Exception("Migration '{$migrationDefinition->name}' already exists");
121 121
         }
122 122
 
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
                 $migrationDefinition->name,
274 274
                 md5($migrationDefinition->rawDefinition),
275 275
                 $migrationDefinition->path,
276
-                ($status == Migration::STATUS_SKIPPED ? null: time()),
276
+                ($status == Migration::STATUS_SKIPPED ? null : time()),
277 277
                 $status
278 278
             );
279 279
             $conn->update(
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
                 $migrationDefinition->name,
298 298
                 md5($migrationDefinition->rawDefinition),
299 299
                 $migrationDefinition->path,
300
-                ($status == Migration::STATUS_SKIPPED ? null: time()),
300
+                ($status == Migration::STATUS_SKIPPED ? null : time()),
301 301
                 $status
302 302
             );
303 303
             $conn->insert($this->migrationsTableName, $this->migrationToArray($migration));
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
         // and 767 bytes can be either 255 chars or 191 chars depending on charset utf8 or utf8mb4...
363 363
         //$t->addIndex(array('path'));
364 364
 
365
-        foreach($schema->toSql($dbPlatform) as $sql) {
365
+        foreach ($schema->toSql($dbPlatform) as $sql) {
366 366
             $this->dbHandler->exec($sql);
367 367
         }
368 368
     }
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
     {
378 378
         /** @var \Doctrine\DBAL\Schema\AbstractSchemaManager $sm */
379 379
         $sm = $this->dbHandler->getConnection()->getSchemaManager();
380
-        foreach($sm->listTables() as $table) {
380
+        foreach ($sm->listTables() as $table) {
381 381
             if ($table->getName() == $tableName) {
382 382
                 return true;
383 383
             }
Please login to merge, or discard this patch.
Command/MigrateCommand.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -113,15 +113,15 @@  discard block
 block discarded – undo
113 113
             // 'optional' options
114 114
             // note: options 'clear-cache', 'ignore-failures' and 'no-transactions' we never propagate
115 115
             if ($input->getOption('default-language')) {
116
-                $builderArgs[]='--default-language='.$input->getOption('default-language');
116
+                $builderArgs[] = '--default-language=' . $input->getOption('default-language');
117 117
             }
118 118
             if ($input->getOption('no-transactions')) {
119
-                $builderArgs[]='--no-transactions';
119
+                $builderArgs[] = '--no-transactions';
120 120
             }
121 121
         }
122 122
 
123 123
         /** @var MigrationDefinition $migrationDefinition */
124
-        foreach($toExecute as $name => $migrationDefinition) {
124
+        foreach ($toExecute as $name => $migrationDefinition) {
125 125
 
126 126
             // let's skip migrations that we know are invalid - user was warned and he decided to proceed anyway
127 127
             if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 $process->setTimeout(86400);
144 144
                 // and give immediate feedback to the user
145 145
                 $process->run(
146
-                    function ($type, $buffer) {
146
+                    function($type, $buffer) {
147 147
                         echo $buffer;
148 148
                     }
149 149
                 );
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
                         throw new \Exception($errorMsg);
176 176
                     }
177 177
 
178
-                } catch(\Exception $e) {
178
+                } catch (\Exception $e) {
179 179
                     if ($input->getOption('ignore-failures')) {
180 180
                         $output->writeln("\n<error>Migration failed! Reason: " . $e->getMessage() . "</error>\n");
181 181
                         continue;
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
                         !$input->getOption('no-transactions'),
193 193
                         $input->getOption('default-language')
194 194
                     );
195
-                } catch(\Exception $e) {
195
+                } catch (\Exception $e) {
196 196
                     if ($input->getOption('ignore-failures')) {
197 197
                         $output->writeln("\n<error>Migration failed! Reason: " . $e->getMessage() . "</error>\n");
198 198
                         continue;
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 
228 228
         // filter away all migrations except 'to do' ones
229 229
         $toExecute = array();
230
-        foreach($migrationDefinitions as $name => $migrationDefinition) {
230
+        foreach ($migrationDefinitions as $name => $migrationDefinition) {
231 231
             if (!isset($migrations[$name]) || (($migration = $migrations[$name]) && $migration->status == Migration::STATUS_TODO)) {
232 232
                 $toExecute[$name] = $migrationService->parseMigrationDefinition($migrationDefinition);
233 233
             }
@@ -261,11 +261,11 @@  discard block
 block discarded – undo
261 261
      *
262 262
      * @todo use a more compact output when there are *many* migrations
263 263
      */
264
-    protected function printMigrationsList($toExecute , InputInterface $input, OutputInterface $output)
264
+    protected function printMigrationsList($toExecute, InputInterface $input, OutputInterface $output)
265 265
     {
266 266
         $data = array();
267 267
         $i = 1;
268
-        foreach($toExecute as $name => $migrationDefinition) {
268
+        foreach ($toExecute as $name => $migrationDefinition) {
269 269
             $notes = '';
270 270
             if ($migrationDefinition->status != MigrationDefinition::STATUS_PARSED) {
271 271
                 $notes = '<error>' . $migrationDefinition->parsingError . '</error>';
Please login to merge, or discard this patch.