Passed
Push — master ( e1ec43...8650c6 )
by Gaetano
10:00
created
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.
Core/Matcher/UrlWildcardMatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
                 // return unique contents
94 94
                 $urlWildcard = $this->repository->getURLWildcardService()->load($urlId);
95 95
                 $urls[$urlWildcard->id] = $urlWildcard;
96
-            } catch(NotFoundException $e) {
96
+            } catch (NotFoundException $e) {
97 97
                 if (!$tolerateMisses) {
98 98
                     throw $e;
99 99
                 }
Please login to merge, or discard this patch.
Core/Matcher/UrlAliasMatcher.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
                 // return unique items
109 109
                 $UrlAlias = $this->repository->getUrlAliasService()->load($urlId);
110 110
                 $urls[$UrlAlias->id] = $UrlAlias;
111
-            } catch(NotFoundException $e) {
111
+            } catch (NotFoundException $e) {
112 112
                 if (!$tolerateMisses) {
113 113
                     throw $e;
114 114
                 }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
                 // return unique contents
134 134
                 $UrlAlias = $this->repository->getUrlAliasService()->lookup($url);
135 135
                 $urls[$UrlAlias->id] = $UrlAlias;
136
-            } catch(NotFoundException $e) {
136
+            } catch (NotFoundException $e) {
137 137
                 if (!$tolerateMisses) {
138 138
                     throw $e;
139 139
                 }
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
                         $urls[$UrlAlias->id] = $UrlAlias;
174 174
                     }
175 175
                 }
176
-            } catch(NotFoundException $e) {
176
+            } catch (NotFoundException $e) {
177 177
                 if (!$tolerateMisses) {
178 178
                     throw $e;
179 179
                 }
Please login to merge, or discard this patch.
Core/FieldHandler/EzMatrix.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,11 +65,11 @@
 block discarded – undo
65 65
         $data = array();
66 66
 
67 67
         if ($this->usingLegacyFieldType()) {
68
-            foreach($fieldValue->rows as $row) {
68
+            foreach ($fieldValue->rows as $row) {
69 69
                 $data[] = $row->toArray();
70 70
             }
71 71
         } else {
72
-            foreach($fieldValue->getRows() as $row) {
72
+            foreach ($fieldValue->getRows() as $row) {
73 73
                 $data[] = $row->getCells();
74 74
             }
75 75
         }
Please login to merge, or discard this patch.