Passed
Push — master ( 5c649b...ed27fb )
by Gaetano
04:01
created
Core/Matcher/TrashMatcher.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,9 @@
 block discarded – undo
56 56
 
57 57
             $query = new Query();
58 58
             $query->limit = $this->queryLimit;
59
-            if (isset($query->performCount)) $query->performCount = false;
59
+            if (isset($query->performCount)) {
60
+                $query->performCount = false;
61
+            }
60 62
             $query->filter = $this->getQueryCriterion($key, $values);
61 63
             $results = $this->repository->getTrashService()->findTrashItems($query);
62 64
 
Please login to merge, or discard this patch.
Core/Executor/AbstractExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         if (is_string($key) && is_string($value)) {
47 47
             return array('identifier' => $key, 'attribute' => $value);
48 48
         }
49
-        if (!is_array($value) || !isset($value['identifier']) || ! isset($value['attribute'])) {
49
+        if (!is_array($value) || !isset($value['identifier']) || !isset($value['attribute'])) {
50 50
             throw new InvalidStepDefinitionException("Invalid reference definition for reference number $key");
51 51
         }
52 52
         return $value;
Please login to merge, or discard this patch.
Core/Executor/RepositoryExecutor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
         $multivalued = ($this->expectedResultsType($step) == self::$RESULT_TYPE_MULTIPLE);
218 218
 
219
-        if ($item instanceof AbstractCollection  || is_array($item)) {
219
+        if ($item instanceof AbstractCollection || is_array($item)) {
220 220
             $items = $item;
221 221
         } else {
222 222
             $items = array($item);
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         // allow setting *some* refs even when we have 0 or N matches
262 262
         foreach ($referencesDefinition as $key => $reference) {
263 263
             $reference = $this->parseReferenceDefinition($key, $reference);
264
-            switch($reference['attribute']) {
264
+            switch ($reference['attribute']) {
265 265
 
266 266
                 case 'count':
267 267
                     $value = count($entity);
Please login to merge, or discard this patch.
Core/EventListener/TracingStepExecutedListener.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
         }
158 158
 
159 159
         if ($this->output && $this->output->isVeryVerbose()) {
160
-           $out .= sprintf(". <info>Time taken: %.3f secs, memory delta: %d bytes</info>", $stepTime, $stepMemory);
160
+            $out .= sprintf(". <info>Time taken: %.3f secs, memory delta: %d bytes</info>", $stepTime, $stepMemory);
161 161
         }
162 162
 
163 163
         $this->echoMessage($out);
Please login to merge, or discard this patch.
Core/MigrationService.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -599,8 +599,9 @@
 block discarded – undo
599 599
      */
600 600
     public function getCurrentContext($migrationName)
601 601
     {
602
-        if (!isset($this->migrationContext[$migrationName]))
603
-            return null;
602
+        if (!isset($this->migrationContext[$migrationName])) {
603
+                    return null;
604
+        }
604 605
         $context = $this->migrationContext[$migrationName];
605 606
         // avoid attempting to store the current outputInterface when saving the context
606 607
         if (isset($context['output'])) {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
         }
311 311
 
312 312
         if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
313
-            throw new MigrationBundleException("Can not execute " . $this->getEntityName($migrationDefinition). " '{$migrationDefinition->name}': {$migrationDefinition->parsingError}");
313
+            throw new MigrationBundleException("Can not execute " . $this->getEntityName($migrationDefinition) . " '{$migrationDefinition->name}': {$migrationDefinition->parsingError}");
314 314
         }
315 315
 
316 316
         /// @todo add support for setting in $migrationContext a userContentType, userGroupContentType ?
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 
345 345
         try {
346 346
 
347
-            $i = $stepOffset+1;
347
+            $i = $stepOffset + 1;
348 348
             $finalStatus = Migration::STATUS_DONE;
349 349
             $finalMessage = null;
350 350
 
@@ -481,12 +481,12 @@  discard block
 block discarded – undo
481 481
     public function resumeMigration(Migration $migration, $useTransaction = true, array $forcedReferences = array())
482 482
     {
483 483
         if ($migration->status != Migration::STATUS_SUSPENDED) {
484
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': it is not in suspended status");
484
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': it is not in suspended status");
485 485
         }
486 486
 
487 487
         $migrationDefinitions = $this->getMigrationsDefinitions(array($migration->path));
488 488
         if (!count($migrationDefinitions)) {
489
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': its definition is missing");
489
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': its definition is missing");
490 490
         }
491 491
 
492 492
         $defs = $migrationDefinitions->getArrayCopy();
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
 
495 495
         $migrationDefinition = $this->parseMigrationDefinition($migrationDefinition);
496 496
         if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
497
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': {$migrationDefinition->parsingError}");
497
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': {$migrationDefinition->parsingError}");
498 498
         }
499 499
 
500 500
         // restore context
@@ -507,11 +507,11 @@  discard block
 block discarded – undo
507 507
         }
508 508
 
509 509
         if (!isset($this->migrationContext[$migration->name])) {
510
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': the stored context is missing");
510
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': the stored context is missing");
511 511
         }
512 512
         $restoredContext = $this->migrationContext[$migration->name];
513
-        if (!is_array($restoredContext) || !isset($restoredContext['context']) || !isset($restoredContext['step'] )) {
514
-            throw new MigrationBundleException("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': the stored context is invalid");
513
+        if (!is_array($restoredContext) || !isset($restoredContext['context']) || !isset($restoredContext['step'])) {
514
+            throw new MigrationBundleException("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': the stored context is invalid");
515 515
         }
516 516
 
517 517
         // update migration status
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
      * @param bool|null $forceSigchildEnabled
533 533
      * @return array
534 534
      */
535
-    protected function migrationContextFromParameters($defaultLanguageCode = null, $adminLogin = null, $forceSigchildEnabled = null )
535
+    protected function migrationContextFromParameters($defaultLanguageCode = null, $adminLogin = null, $forceSigchildEnabled = null)
536 536
     {
537 537
         $properties = array();
538 538
 
Please login to merge, or discard this patch.
Command/StatusCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 
198 198
         if ($input->getOption('todo')) {
199 199
             foreach ($data as $migrationData) {
200
-                $output->writeln("$migrationData", OutputInterface::OUTPUT_RAW|OutputInterface::VERBOSITY_QUIET);
200
+                $output->writeln("$migrationData", OutputInterface::OUTPUT_RAW | OutputInterface::VERBOSITY_QUIET);
201 201
             }
202 202
             return 0;
203 203
         }
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
      */
227 227
     protected function sortMigrationIndex(array &$index, $sortBy)
228 228
     {
229
-        switch($sortBy) {
229
+        switch ($sortBy) {
230 230
             case 'execution':
231 231
                 uasort($index, function($m1, $m2) {
232 232
                     if (isset($m1['migration']) && $m1['migration']->executionDate !== null) {
Please login to merge, or discard this patch.
Core/Matcher/ContentMatcher.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -145,7 +145,9 @@  discard block
 block discarded – undo
145 145
                     // q: when getting a query via QueryType, should we always inject offset/limit?
146 146
                     $query->limit = $limit != 0 ? $limit : $this->queryLimit;
147 147
                     $query->offset = $offset;
148
-                    if (isset($query->performCount)) $query->performCount = false;
148
+                    if (isset($query->performCount)) {
149
+                        $query->performCount = false;
150
+                    }
149 151
                     if (!empty($sort)) {
150 152
                         $query->sortClauses = $this->getSortClauses($sort);
151 153
                     } else {
@@ -271,7 +273,9 @@  discard block
 block discarded – undo
271 273
     {
272 274
         $query = new Query();
273 275
         $query->limit = $this->queryLimit;
274
-        if (isset($query->performCount)) $query->performCount = false;
276
+        if (isset($query->performCount)) {
277
+            $query->performCount = false;
278
+        }
275 279
         $query->filter = new Query\Criterion\ParentLocationId($parentLocationIds);
276 280
         $results = $this->getSearchService()->findContent($query);
277 281
 
@@ -311,7 +315,9 @@  discard block
 block discarded – undo
311 315
     {
312 316
         $query = new Query();
313 317
         $query->limit = $this->queryLimit;
314
-        if (isset($query->performCount)) $query->performCount = false;
318
+        if (isset($query->performCount)) {
319
+            $query->performCount = false;
320
+        }
315 321
         $query->filter = new Query\Criterion\ContentTypeIdentifier($contentTypeIdentifiers);
316 322
         // sort objects by depth, lower to higher, so that deleting them has less chances of failure
317 323
         // NB: we only do this in eZP versions that allow depth sorting on content queries
@@ -339,7 +345,9 @@  discard block
 block discarded – undo
339 345
     {
340 346
         $query = new Query();
341 347
         $query->limit = $this->queryLimit;
342
-        if (isset($query->performCount)) $query->performCount = false;
348
+        if (isset($query->performCount)) {
349
+            $query->performCount = false;
350
+        }
343 351
         $query->filter = new Query\Criterion\ContentTypeId($contentTypeIds);
344 352
         // sort objects by depth, lower to higher, so that deleting them has less chances of failure
345 353
         // NB: we only do this in eZP versions that allow depth sorting on content queries
Please login to merge, or discard this patch.
Core/Matcher/LocationMatcher.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,7 +107,9 @@  discard block
 block discarded – undo
107 107
             if (!empty($sort)) {
108 108
                 $query->sortClauses = $this->getSortClauses($sort);
109 109
             }
110
-            if (isset($query->performCount)) $query->performCount = false;
110
+            if (isset($query->performCount)) {
111
+                $query->performCount = false;
112
+            }
111 113
 
112 114
             $results = $this->getSearchService()->findLocations($query);
113 115
 
@@ -254,7 +256,9 @@  discard block
 block discarded – undo
254 256
     {
255 257
         $query = new LocationQuery();
256 258
         $query->limit = self::INT_MAX_16BIT;
257
-        if (isset($query->performCount)) $query->performCount = false;
259
+        if (isset($query->performCount)) {
260
+            $query->performCount = false;
261
+        }
258 262
         $query->filter = new Query\Criterion\ParentLocationId($parentLocationIds);
259 263
 
260 264
         $results = $this->getSearchService()->findLocations($query);
Please login to merge, or discard this patch.
Core/FieldHandler/FileFieldHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
     protected $ioDecorator;
11 11
     protected $ioService;
12 12
 
13
-    public function __construct($ioRootDir, UrlDecorator $ioDecorator=null, $ioService=null)
13
+    public function __construct($ioRootDir, UrlDecorator $ioDecorator = null, $ioService = null)
14 14
     {
15 15
         $this->ioRootDir = $ioRootDir;
16 16
         $this->ioDecorator = $ioDecorator;
Please login to merge, or discard this patch.