Passed
Push — main ( 2c998d...d5afb4 )
by Gaetano
08:40
created
Core/FieldHandler/EzDateAndTime.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,25 +58,25 @@
 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 81
         return implode(', ', $format);
82 82
     }
Please login to merge, or discard this patch.
Core/Matcher/ContentVersionMatcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@  discard block
 block discarded – undo
2 2
 
3 3
 namespace Kaliop\eZMigrationBundle\Core\Matcher;
4 4
 
5
-use eZ\Publish\API\Repository\Exceptions\UnauthorizedException ;
5
+use eZ\Publish\API\Repository\Exceptions\UnauthorizedException;
6 6
 use eZ\Publish\API\Repository\Repository;
7 7
 use eZ\Publish\API\Repository\Values\Content\Content;
8 8
 use eZ\Publish\API\Repository\Values\Content\VersionInfo;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
                     }
212 212
                 } else {
213 213
                     // negative $acceptedVersionNo means 'leave the last X versions', eg: -1 = leave the last version
214
-                    if ($i < $contentVersionsCount + $acceptedVersionNo)  {
214
+                    if ($i < $contentVersionsCount + $acceptedVersionNo) {
215 215
                         $versions[$versionKey] = $versionInfo;
216 216
                         break;
217 217
 
Please login to merge, or discard this patch.
Core/Executor/MailExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
         }
92 92
         if (isset($dsl['attach'])) {
93 93
             $paths = $this->resolveReferencesRecursively($dsl['attach']);
94
-            foreach((array)$paths as $path) {
94
+            foreach ((array)$paths as $path) {
95 95
                 // we use the same logic as for the image/file fields in content: look up file 1st relative to the migration
96 96
                 $attachment = dirname($context['path']) . '/' . $path;
97 97
                 if (!is_file($attachment)) {
Please login to merge, or discard this patch.
Core/Executor/ReferenceExecutor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
             throw new MigrationBundleException("Invalid step definition: file '$fileName' for saving references already exists");
171 171
         }
172 172
 
173
-        if (! $this->referenceResolver instanceof EnumerableReferenceResolverInterface) {
173
+        if (!$this->referenceResolver instanceof EnumerableReferenceResolverInterface) {
174 174
             throw new MigrationBundleException("Can not save references as resolver is not enumerable");
175 175
         }
176 176
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $value = $this->dumpVar($this->resolveReference($dsl['identifier']));
216 216
 
217 217
         if (isset($context['output']) && $context['output'] instanceof OutputInterface) {
218
-            $context['output']->write($label . $value, false, OutputInterface::OUTPUT_RAW|OutputInterface::VERBOSITY_NORMAL);
218
+            $context['output']->write($label . $value, false, OutputInterface::OUTPUT_RAW | OutputInterface::VERBOSITY_NORMAL);
219 219
         } else {
220 220
             echo $label . $value;
221 221
         }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 
238 238
         $dumper->dump(
239 239
             $cloner->cloneVar($var),
240
-            function ($line, $depth) use (&$output) {
240
+            function($line, $depth) use (&$output) {
241 241
                 // A negative depth means "end of dump"
242 242
                 if ($depth >= 0) {
243 243
                     // Adds a two spaces indentation to the line
Please login to merge, or discard this patch.
Core/Executor/HTTPExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
         $body = isset($dsl['body']) ? $this->resolveReferencesInText($dsl['body']) : null;
77 77
 
78 78
         if (isset($dsl['client'])) {
79
-            $client = $this->container->get('httplug.client.'.$this->resolveReference($dsl['client']));
79
+            $client = $this->container->get('httplug.client.' . $this->resolveReference($dsl['client']));
80 80
         } else {
81 81
             $client = $this->container->get('httplug.client');
82 82
         }
Please login to merge, or discard this patch.
Core/Executor/ReferenceSetterTrait.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/MigrationDefinitionExecutor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         /// @todo can we could have the included migration's steps be printed as 1.1, 1.2 etc...
86 86
         /// @todo we could return the result of the included migration's last step
87
-        foreach($migrationDefinitions as $migrationDefinition) {
87
+        foreach ($migrationDefinitions as $migrationDefinition) {
88 88
             $this->migrationService->executeMigration($migrationDefinition, $context);
89 89
         }
90 90
 
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 
211 211
         foreach ($dsl['references'] as $key => $reference) {
212 212
             // BC
213
-            if (is_array($reference) && isset($reference['json_path']) && !isset($reference['attribute'] )) {
213
+            if (is_array($reference) && isset($reference['json_path']) && !isset($reference['attribute'])) {
214 214
                 $reference['attribute'] = $reference['json_path'];
215 215
             }
216 216
             $reference = $this->parseReferenceDefinition($key, $reference);
Please login to merge, or discard this patch.