Passed
Push — master ( 77a6e6...0cc661 )
by Gaetano
08:48
created
Core/Executor/ContentTypeManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
                 }
250 250
 
251 251
                 // Add new attributes
252
-                foreach($newFieldDefinitions as $newFieldDefinition) {
252
+                foreach ($newFieldDefinitions as $newFieldDefinition) {
253 253
                     if ($newFieldDefinition->position == 0) {
254 254
                         $newFieldDefinition->position = ++$maxFieldDefinitionPos;
255 255
                     }
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                     break;
371 371
                 case 'content_type_groups_ids':
372 372
                     $value = [];
373
-                    foreach($contentType->contentTypeGroups as $existingGroup) {
373
+                    foreach ($contentType->contentTypeGroups as $existingGroup) {
374 374
                         $value[] = $existingGroup->id;
375 375
                     }
376 376
                     break;
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
         $contentTypeGroup = $this->contentTypeGroupMatcher->matchOneByKey($contentTypeGroupId);
767 767
         $contentTypeGroupId = $contentTypeGroup->id;
768 768
 
769
-        foreach($contentType->contentTypeGroups as $existingGroup) {
769
+        foreach ($contentType->contentTypeGroups as $existingGroup) {
770 770
             if ($existingGroup->id === $contentTypeGroupId) {
771 771
                 return;
772 772
             }
@@ -782,7 +782,7 @@  discard block
 block discarded – undo
782 782
         $contentTypeGroup = $this->contentTypeGroupMatcher->matchOneByKey($contentTypeGroupId);
783 783
         $contentTypeGroupId = $contentTypeGroup->id;
784 784
 
785
-        foreach($contentType->contentTypeGroups as $existingGroup) {
785
+        foreach ($contentType->contentTypeGroups as $existingGroup) {
786 786
             if ($existingGroup->id === $contentTypeGroupId) {
787 787
                 $contentTypeService = $this->repository->getContentTypeService();
788 788
                 $contentTypeService->unassignContentTypeGroup($contentType, $contentTypeGroup);
Please login to merge, or discard this patch.
Core/Executor/ContentManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
                     $locations = $locationService->loadLocations($content->contentInfo);
521 521
                     if (count($locations) > 1) {
522 522
                         $otherParentLocations = array();
523
-                        foreach($locations as $otherLocation) {
523
+                        foreach ($locations as $otherLocation) {
524 524
                             if ($otherLocation->id != $location->id) {
525 525
                                 $otherParentLocations[] = $otherLocation->parentLocationId;
526 526
                             }
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
             },
697 697
             array_filter(
698 698
                 $this->repository->getContentLanguageService()->loadLanguages(),
699
-                function ($language) {
699
+                function($language) {
700 700
                     return $language->enabled;
701 701
                 }
702 702
             )
Please login to merge, or discard this patch.
Core/ReferenceResolver/LoopResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
      */
36 36
     public function getReferenceValue($identifier)
37 37
     {
38
-        switch(substr($identifier, 5)) {
38
+        switch (substr($identifier, 5)) {
39 39
             case 'iteration':
40 40
                 $current = end($this->stack);
41 41
                 return $current['step'];
Please login to merge, or discard this patch.
Core/Executor/LoopExecutor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                     $subStep = new MigrationStep($type, $stepDef, array_merge($step->context, array()));
81 81
                     try {
82 82
                         $result = $stepExecutors[$j]->execute($subStep);
83
-                    } catch(MigrationStepSkippedException $e) {
83
+                    } catch (MigrationStepSkippedException $e) {
84 84
                         // all ok, continue the loop
85 85
                     }
86 86
                 }
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                     $subStep = new MigrationStep($type, $stepDef, array_merge($step->context, array()));
98 98
                     try {
99 99
                         $result = $stepExecutors[$j]->execute($subStep);
100
-                    } catch(MigrationStepSkippedException $e) {
100
+                    } catch (MigrationStepSkippedException $e) {
101 101
                         // all ok, continue the loop
102 102
                     }
103 103
                 }
Please login to merge, or discard this patch.
Core/Helper/SortConverter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
     public function sortField2Hash($value)
41 41
     {
42 42
         $ref = new \ReflectionClass('eZ\Publish\API\Repository\Values\Content\Location');
43
-        foreach($ref->getConstants() as $key => $val) {
43
+        foreach ($ref->getConstants() as $key => $val) {
44 44
             if (strpos($key, 'SORT_FIELD_') === 0 && $val == $value) {
45 45
                 $out = strtolower(substr($key, 11));
46 46
                 if ($out == 'contentobject_id') {
Please login to merge, or discard this patch.
Core/Executor/ContentVersionManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
 
150 150
     protected function versionStatusToHash($status)
151 151
     {
152
-        foreach(ContentVersionMatcher::STATUS_MAP as $own => $ez) {
152
+        foreach (ContentVersionMatcher::STATUS_MAP as $own => $ez) {
153 153
             if ($status == $ez) {
154 154
                 return $own;
155 155
             }
Please login to merge, or discard this patch.
Core/Matcher/QueryBasedMatcher.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
                 return new Query\Criterion\DateMetadata(Query\Criterion\DateMetadata::CREATED, self::$operatorsMap[$operator], $match);
149 149
 
150 150
             case self::MATCH_GROUP:
151
-                foreach($values as &$value) {
151
+                foreach ($values as &$value) {
152 152
                     if (!ctype_digit($value)) {
153 153
                         $value = $this->groupMatcher->matchOneByKey($value)->id;
154 154
                     }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                 return new Query\Criterion\DateMetadata(Query\Criterion\DateMetadata::MODIFIED, self::$operatorsMap[$operator], $match);
168 168
 
169 169
             case self::MATCH_OBJECT_STATE:
170
-                foreach($values as &$value) {
170
+                foreach ($values as &$value) {
171 171
                     if (!ctype_digit($value)) {
172 172
                         $value = $this->stateMatcher->matchOneByKey($value)->id;
173 173
                     }
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
                 return new Query\Criterion\ObjectStateId($values);
176 176
 
177 177
             case self::MATCH_OWNER:
178
-                foreach($values as &$value) {
178
+                foreach ($values as &$value) {
179 179
                     if (!ctype_digit($value)) {
180 180
                         $value = $this->userMatcher->matchOneByKey($value)->id;
181 181
                     }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
                 return new Query\Criterion\ParentLocationId($locationIds);
196 196
 
197 197
             case self::MATCH_SECTION:
198
-                foreach($values as &$value) {
198
+                foreach ($values as &$value) {
199 199
                     if (!ctype_digit($value)) {
200 200
                         $value = $this->sectionMatcher->matchOneByKey($value)->id;
201 201
                     }
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 
217 217
             case self::MATCH_AND:
218 218
                 $subCriteria = array();
219
-                foreach($values as $subCriterion) {
219
+                foreach ($values as $subCriterion) {
220 220
                     $value = reset($subCriterion);
221 221
                     $subCriteria[] = $this->getQueryCriterion(key($subCriterion), $value);
222 222
                 }
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 
225 225
             case self::MATCH_OR:
226 226
                 $subCriteria = array();
227
-                foreach($values as $subCriterion) {
227
+                foreach ($values as $subCriterion) {
228 228
                     $value = reset($subCriterion);
229 229
                     $subCriteria[] = $this->getQueryCriterion(key($subCriterion), $value);
230 230
                 }
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 
267 267
             $direction = $this->hash2SortOrder($sortItem['sort_order']);
268 268
 
269
-            switch($sortItem['sort_field']) {
269
+            switch ($sortItem['sort_field']) {
270 270
                 case self::SORT_CONTENT_ID:
271 271
                     $out[] = new SortClause\ContentId($direction);
272 272
                     break;
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
             $val = $this->referenceResolver->resolveReference($val);
42 42
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                     if ($fieldSettings === null) {
48 48
                         $fieldSettings = $this->loadFieldSettings($context['contentTypeIdentifier'], $context['fieldIdentifier']);
49 49
                     }
50
-                    foreach($fieldSettings['options'] as $pos => $name) {
50
+                    foreach ($fieldSettings['options'] as $pos => $name) {
51 51
                         if ($name === $val) {
52 52
                             $fieldValue[$key] = $pos;
53 53
                             break;
Please login to merge, or discard this patch.
Core/Process/Process.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
     public static function forceSigchildEnabled($force)
16 16
     {
17
-        self::$forceSigchildEnabled = (bool) $force;
17
+        self::$forceSigchildEnabled = (bool)$force;
18 18
     }
19 19
 
20 20
     protected function isSigchildEnabled()
Please login to merge, or discard this patch.