Passed
Push — master ( 77a6e6...0cc661 )
by Gaetano
08:48
created
Core/StorageHandler/Database/Migration.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     public function endMigration(APIMigration $migration, $force = false)
172 172
     {
173 173
         if ($migration->status == APIMigration::STATUS_STARTED) {
174
-            throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be ended as its status is 'started'...");
174
+            throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be ended as its status is 'started'...");
175 175
         }
176 176
 
177 177
         $this->createTableIfNeeded();
@@ -198,13 +198,13 @@  discard block
 block discarded – undo
198 198
         if (!is_array($existingMigrationData)) {
199 199
             // commit to release the lock
200 200
             $conn->commit();
201
-            throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be ended as it is not found");
201
+            throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be ended as it is not found");
202 202
         }
203 203
 
204 204
         if (($existingMigrationData['status'] != APIMigration::STATUS_STARTED) && !$force) {
205 205
             // commit to release the lock
206 206
             $conn->commit();
207
-            throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be ended as it is not executing");
207
+            throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be ended as it is not executing");
208 208
         }
209 209
 
210 210
         $conn->update(
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
         if (!is_array($existingMigrationData)) {
356 356
             // commit immediately, to release the lock and avoid deadlocks
357 357
             $conn->commit();
358
-            throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be resumed as it is not found");
358
+            throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be resumed as it is not found");
359 359
         }
360 360
 
361 361
         // migration exists
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         if ($existingMigrationData['status'] != APIMigration::STATUS_SUSPENDED) {
365 365
             // commit to release the lock
366 366
             $conn->commit();
367
-            throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be resumed as it is not suspended");
367
+            throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be resumed as it is not suspended");
368 368
         }
369 369
 
370 370
         $migration = new APIMigration(
Please login to merge, or discard this patch.
Core/Executor/ProcessExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
         $builderArgs = array($this->referenceResolver->resolveReference($dsl['command']));
64 64
 
65 65
         if (isset($dsl['arguments'])) {
66
-            foreach($dsl['arguments'] as $arg) {
66
+            foreach ($dsl['arguments'] as $arg) {
67 67
                 $builderArgs[] = $this->referenceResolver->resolveReference($arg);
68 68
             }
69 69
         }
Please login to merge, or discard this patch.
Command/ResumeCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         $executed = 0;
94 94
         $failed = 0;
95 95
 
96
-        foreach($suspendedMigrations as $suspendedMigration) {
96
+        foreach ($suspendedMigrations as $suspendedMigration) {
97 97
             $output->writeln("<info>Resuming {$suspendedMigration->name}</info>");
98 98
 
99 99
             try {
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 
114 114
         $time = microtime(true) - $start;
115 115
         $output->writeln("Resumed $executed migrations, failed $failed");
116
-        $output->writeln("Time taken: ".sprintf('%.2f', $time)." secs, memory: ".sprintf('%.2f', (memory_get_peak_usage(true) / 1000000)). ' MB');
116
+        $output->writeln("Time taken: " . sprintf('%.2f', $time) . " secs, memory: " . sprintf('%.2f', (memory_get_peak_usage(true) / 1000000)) . ' MB');
117 117
 
118 118
         if ($failed) {
119 119
             return 2;
Please login to merge, or discard this patch.
Core/FieldHandler/EzDateAndTime.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -58,26 +58,26 @@
 block discarded – undo
58 58
     {
59 59
         $format = array();
60 60
         if (0 != $dateInterval->y) {
61
-            $format[] = $dateInterval->y.' years';
61
+            $format[] = $dateInterval->y . ' years';
62 62
         }
63 63
         if (0 != $dateInterval->m) {
64
-            $format[] = $dateInterval->m.' months';
64
+            $format[] = $dateInterval->m . ' months';
65 65
         }
66 66
         if (0 != $dateInterval->d) {
67
-            $format[] = $dateInterval->d.' days';
67
+            $format[] = $dateInterval->d . ' days';
68 68
         }
69 69
         //if (0 < $dateInterval->h || 0 < $dateInterval->i || 0 < $dateInterval->s) {
70 70
         //    $format .= 'T';
71 71
         //}
72 72
         if (0 != $dateInterval->h) {
73
-            $format[] = $dateInterval->h.' hours';
73
+            $format[] = $dateInterval->h . ' hours';
74 74
         }
75 75
         if (0 != $dateInterval->i) {
76
-            $format[] = $dateInterval->i.' minutes';
76
+            $format[] = $dateInterval->i . ' minutes';
77 77
         }
78 78
         if (0 != $dateInterval->s) {
79
-            $format[] = $dateInterval->s.' seconds';
79
+            $format[] = $dateInterval->s . ' seconds';
80 80
         }
81
-        return implode( ', ', $format);
81
+        return implode(', ', $format);
82 82
     }
83 83
 }
Please login to merge, or discard this patch.
Core/Loader/FilesystemRecursive.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         if (empty($paths)) {
58 58
             $paths = array();
59 59
             /** @var $bundle \Symfony\Component\HttpKernel\Bundle\BundleInterface */
60
-            foreach($this->kernel->getBundles() as $bundle)
60
+            foreach ($this->kernel->getBundles() as $bundle)
61 61
             {
62 62
                 $path = $bundle->getPath() . "/" . $this->versionDirectory;
63 63
                 if (is_dir($path)) {
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         }
68 68
 
69 69
         $definitions = array();
70
-        foreach($paths as $path) {
70
+        foreach ($paths as $path) {
71 71
             if (is_file($path)) {
72 72
                 $definitions[basename($path)] = $returnFilename ? $path : new MigrationDefinition(
73 73
                     basename($path),
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@
 block discarded – undo
60 60
                         }
61 61
                     }
62 62
                 }
63
-            }
64
-            else {
63
+            } else {
65 64
                 throw new \Exception("Path '$path' is neither a file nor directory");
66 65
             }
67 66
         }
Please login to merge, or discard this patch.
Core/Helper/ProcessManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         $currentProcesses = array_splice($processesQueue, 0, $maxParallel);
29 29
         // start the initial stack of processes
30 30
         foreach ($currentProcesses as $process) {
31
-            $process->start(function ($type, $buffer) use ($callback, $process) {
31
+            $process->start(function($type, $buffer) use ($callback, $process) {
32 32
                 if ($callback) {
33 33
                     $callback($type, $buffer, $process);
34 34
                 }
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
                     // directly add and start new process after the previous finished
45 45
                     if (count($processesQueue) > 0) {
46 46
                         $nextProcess = array_shift($processesQueue);
47
-                        $nextProcess->start(function ($type, $buffer) use ($callback, $nextProcess) {
47
+                        $nextProcess->start(function($type, $buffer) use ($callback, $nextProcess) {
48 48
                             if ($callback) {
49 49
                                 $callback($type, $buffer, $nextProcess);
50 50
                             }
Please login to merge, or discard this patch.
Core/Executor/ServiceExecutor.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
         } else {
75 75
             $args = array();
76 76
         }
77
-        foreach($args as &$val) {
77
+        foreach ($args as &$val) {
78 78
             $val = $this->resolveReferencesRecursively($val);
79 79
         }
80 80
 
Please login to merge, or discard this patch.
Core/ReferenceResolver/EmbeddedRegexpReferenceResolverTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
     public function hasEmbeddedReferences($string)
19 19
     {
20 20
         $regexp = $this->getEmbeddedRegexp();
21
-        return (bool) preg_match_all($regexp, $string, $matches);
21
+        return (bool)preg_match_all($regexp, $string, $matches);
22 22
     }
23 23
     
24 24
     /**
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     {
53 53
         // we need to alter the regexp we usr for std ref resolving, as it will be used to match parts of text, not the whole string
54 54
         $regexp = substr($this->getRegexp(), 1, -1);
55
-        return '/' . preg_quote($this->beginToken). preg_replace(array('/^\^/'), array(''), $regexp) . '[^' . $this->endToken . ']+' . preg_quote($this->endToken) . '/';
55
+        return '/' . preg_quote($this->beginToken) . preg_replace(array('/^\^/'), array(''), $regexp) . '[^' . $this->endToken . ']+' . preg_quote($this->endToken) . '/';
56 56
     }
57 57
 
58 58
     /**
Please login to merge, or discard this patch.
Core/FieldHandler/EzRichText.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 {
12 12
     public function setReferenceResolver(ReferenceResolverInterface $referenceResolver)
13 13
     {
14
-        if (! $referenceResolver instanceof EmbeddedReferenceResolverInterface) {
14
+        if (!$referenceResolver instanceof EmbeddedReferenceResolverInterface) {
15 15
             throw new \Exception("Reference resolver injected into EzRichText field handler should implement EmbeddedReferenceResolverInterface");
16 16
         }
17 17
         parent::setReferenceResolver($referenceResolver);
Please login to merge, or discard this patch.