Passed
Push — master ( 20caea...cf7f72 )
by Gaetano
03:43
created
Core/ReferenceResolver/ChainResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
         $refs = array();
132 132
 
133 133
         foreach ($this->resolvers as $resolver) {
134
-            if (! $resolver instanceof EnumerableReferenceResolverInterface) {
134
+            if (!$resolver instanceof EnumerableReferenceResolverInterface) {
135 135
                 // Disabled - we now allow chaining enumerable and non-enumerable sets
136 136
                 //throw new \Exception("Could not enumerate references because of chained resolver of type: " . get_class($resolver));
137 137
                 continue;
Please login to merge, or discard this patch.
Core/Executor/BasePHPExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 
85 85
             $args = $dsl['arguments'];
86 86
 
87
-            foreach($args as &$val) {
87
+            foreach ($args as &$val) {
88 88
                 $val = $this->resolveReferencesRecursively($val);
89 89
             }
90 90
         } else {
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
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
         $body = isset($dsl['body']) ? $this->resolveReferencesInText($dsl['body']) : null;
76 76
 
77 77
         if (isset($dsl['client'])) {
78
-            $client = $this->container->get('httplug.client.'.$this->referenceResolver->resolveReference($dsl['client']));
78
+            $client = $this->container->get('httplug.client.' . $this->referenceResolver->resolveReference($dsl['client']));
79 79
         } else {
80 80
             $client = $this->container->get('httplug.client');
81 81
         }
Please login to merge, or discard this patch.
Core/Executor/LoopExecutor.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -99,14 +99,14 @@  discard block
 block discarded – undo
99 99
                     $subStep = new MigrationStep($type, $stepDef, array_merge($context, array()));
100 100
                     try {
101 101
                         $result = $stepExecutors[$j]->execute($subStep);
102
-                    } catch(MigrationStepSkippedException $e) {
102
+                    } catch (MigrationStepSkippedException $e) {
103 103
                         // all ok, continue the loop
104
-                    } catch(LoopContinueException $e) {
104
+                    } catch (LoopContinueException $e) {
105 105
                         // all ok, move to the next iteration
106 106
                         break;
107 107
                     }
108 108
                 }
109
-            } catch(LoopBreakException $e) {
109
+            } catch (LoopBreakException $e) {
110 110
                 // all ok, exit the loop
111 111
                 break;
112 112
             }
@@ -135,14 +135,14 @@  discard block
 block discarded – undo
135 135
                     $subStep = new MigrationStep($type, $stepDef, array_merge($context, array()));
136 136
                     try {
137 137
                         $result = $stepExecutors[$j]->execute($subStep);
138
-                    } catch(MigrationStepSkippedException $e) {
138
+                    } catch (MigrationStepSkippedException $e) {
139 139
                         // all ok, continue the loop
140
-                    } catch(LoopContinueException $e) {
140
+                    } catch (LoopContinueException $e) {
141 141
                         // all ok, move to the next iteration
142 142
                         break;
143 143
                     }
144 144
                 }
145
-            } catch(LoopBreakException $e) {
145
+            } catch (LoopBreakException $e) {
146 146
                 // all ok, exit the loop
147 147
                 break;
148 148
             }
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
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
         $builderArgs = array($this->referenceResolver->resolveReference($dsl['command']));
72 72
 
73 73
         if (isset($dsl['arguments'])) {
74
-            foreach($dsl['arguments'] as $arg) {
74
+            foreach ($dsl['arguments'] as $arg) {
75 75
                 /// @todo should this be recursive?
76 76
                 $builderArgs[] = $this->referenceResolver->resolveReference($arg);
77 77
             }
Please login to merge, or discard this patch.
Core/Executor/ContentManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
                             }
494 494
                             // we do allow array values for refs, but not multi-level
495 495
                             if (is_array($value)) {
496
-                                foreach($hashValue as $subValue) {
496
+                                foreach ($hashValue as $subValue) {
497 497
                                     if (is_array($subValue) || is_object($subValue)) {
498 498
                                         throw new \InvalidArgumentException('Content Manager does not support setting references for attribute ' . $reference['attribute'] . ': the given value is an array with a non scalar element');
499 499
                                     }
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
                     $locations = $locationService->loadLocations($content->contentInfo);
576 576
                     if (count($locations) > 1) {
577 577
                         $otherParentLocations = array();
578
-                        foreach($locations as $otherLocation) {
578
+                        foreach ($locations as $otherLocation) {
579 579
                             if ($otherLocation->id != $location->id) {
580 580
                                 $otherParentLocations[] = $otherLocation->parentLocationId;
581 581
                             }
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
                 }
627 627
 
628 628
                 $attributes = array();
629
-                foreach($languages as $lang) {
629
+                foreach ($languages as $lang) {
630 630
                     foreach ($content->getFieldsByLanguage($lang) as $fieldIdentifier => $field) {
631 631
                         $fieldDefinition = $contentType->getFieldDefinition($fieldIdentifier);
632 632
                         $fieldValue = $this->fieldHandlerManager->fieldValueToHash(
@@ -774,7 +774,7 @@  discard block
 block discarded – undo
774 774
             },
775 775
             array_filter(
776 776
                 $this->repository->getContentLanguageService()->loadLanguages(),
777
-                function ($language) {
777
+                function($language) {
778 778
                     return $language->enabled;
779 779
                 }
780 780
             )
Please login to merge, or discard this patch.
Core/Loader/Filesystem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,6 +120,6 @@
 block discarded – undo
120 120
     {
121 121
         $rootDir = realpath($this->kernel->getRootDir() . '/..') . '/';
122 122
         // note: we handle the case of 'path = root dir', but path is expected to include a filename...
123
-        return $path === $rootDir ? './' : preg_replace('#^' . preg_quote($rootDir, '#'). '#', '', $path);
123
+        return $path === $rootDir ? './' : preg_replace('#^' . preg_quote($rootDir, '#') . '#', '', $path);
124 124
     }
125 125
 }
Please login to merge, or discard this patch.
Core/FieldHandler/EzSelection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         // allow user to pass in selection values by name
38 38
         $fieldSettings = null;
39
-        foreach($fieldValue as $key => $val) {
39
+        foreach ($fieldValue as $key => $val) {
40 40
 
41 41
             // NB: this might result in double reference-resolving when the original value is a string, given preResolveReferences...
42 42
             $val = $this->referenceResolver->resolveReference($val);
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                     if ($fieldSettings === null) {
49 49
                         $fieldSettings = $this->loadFieldSettings($context['contentTypeIdentifier'], $context['fieldIdentifier']);
50 50
                     }
51
-                    foreach($fieldSettings['options'] as $pos => $name) {
51
+                    foreach ($fieldSettings['options'] as $pos => $name) {
52 52
                         if ($name === $val) {
53 53
                             $fieldValue[$key] = $pos;
54 54
                             break;
Please login to merge, or discard this patch.
Core/Matcher/QueryBasedMatcher.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
                     return new Query\Criterion\Field($attribute, self::$operatorsMap[$operator], $match);
156 156
                 } else {
157 157
                     /// @todo make the list of unary operators more flexible
158
-                    switch($spec) {
158
+                    switch ($spec) {
159 159
                         case 'empty':
160 160
                             return new Query\Criterion\IsFieldEmpty($attribute);
161 161
                         default:
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
                 return new Query\Criterion\DateMetadata(Query\Criterion\DateMetadata::CREATED, self::$operatorsMap[$operator], $match);
181 181
 
182 182
             case self::MATCH_GROUP:
183
-                foreach($values as &$value) {
183
+                foreach ($values as &$value) {
184 184
                     if (!ctype_digit($value)) {
185 185
                         $value = $this->groupMatcher->matchOneByKey($value)->id;
186 186
                     }
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
                 return new Query\Criterion\DateMetadata(Query\Criterion\DateMetadata::MODIFIED, self::$operatorsMap[$operator], $match);
200 200
 
201 201
             case self::MATCH_OBJECT_STATE:
202
-                foreach($values as &$value) {
202
+                foreach ($values as &$value) {
203 203
                     if (!ctype_digit($value)) {
204 204
                         $value = $this->stateMatcher->matchOneByKey($value)->id;
205 205
                     }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                 return new Query\Criterion\ObjectStateId($values);
208 208
 
209 209
             case self::MATCH_OWNER:
210
-                foreach($values as &$value) {
210
+                foreach ($values as &$value) {
211 211
                     if (!ctype_digit($value)) {
212 212
                         $value = $this->userMatcher->matchOneByKey($value)->id;
213 213
                     }
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
                 return new Query\Criterion\ParentLocationId($locationIds);
228 228
 
229 229
             case self::MATCH_SECTION:
230
-                foreach($values as &$value) {
230
+                foreach ($values as &$value) {
231 231
                     if (!ctype_digit($value)) {
232 232
                         $value = $this->sectionMatcher->matchOneByKey($value)->id;
233 233
                     }
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
             case self::MATCH_AND:
250 250
                 $subCriteria = array();
251
-                foreach($values as $subCriterion) {
251
+                foreach ($values as $subCriterion) {
252 252
                     $value = reset($subCriterion);
253 253
                     $subCriteria[] = $this->getQueryCriterion(key($subCriterion), $value);
254 254
                 }
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 
257 257
             case self::MATCH_OR:
258 258
                 $subCriteria = array();
259
-                foreach($values as $subCriterion) {
259
+                foreach ($values as $subCriterion) {
260 260
                     $value = reset($subCriterion);
261 261
                     $subCriteria[] = $this->getQueryCriterion(key($subCriterion), $value);
262 262
                 }
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 
302 302
             $direction = $this->hash2SortOrder($sortItem['sort_order']);
303 303
 
304
-            switch($sortItem['sort_field']) {
304
+            switch ($sortItem['sort_field']) {
305 305
                 case self::SORT_CONTENT_ID:
306 306
                     $out[] = new SortClause\ContentId($direction);
307 307
                     break;
Please login to merge, or discard this patch.