| @@ -150,7 +150,7 @@ discard block | ||
| 150 | 150 | } | 
| 151 | 151 | |
| 152 | 152 | // allow to generate migrations for many entities | 
| 153 | -        if (strpos($matchValue, ',') !== false ) { | |
| 153 | +        if (strpos($matchValue, ',') !== false) { | |
| 154 | 154 |              $matchValue = explode(',', $matchValue); | 
| 155 | 155 | } | 
| 156 | 156 | |
| @@ -260,7 +260,7 @@ discard block | ||
| 260 | 260 |      { | 
| 261 | 261 | $migrationService = $this->getMigrationService(); | 
| 262 | 262 | $executors = $migrationService->listExecutors(); | 
| 263 | -        foreach($executors as $key => $name) { | |
| 263 | +        foreach ($executors as $key => $name) { | |
| 264 | 264 | $executor = $migrationService->getExecutor($name); | 
| 265 | 265 |              if (!$executor instanceof MigrationGeneratorInterface) { | 
| 266 | 266 | unset($executors[$key]); | 
| @@ -559,7 +559,7 @@ | ||
| 559 | 559 | $locations = $locationService->loadLocations($content->contentInfo); | 
| 560 | 560 |                      if (count($locations) > 1) { | 
| 561 | 561 | $otherParentLocations = array(); | 
| 562 | -                        foreach($locations as $otherLocation) { | |
| 562 | +                        foreach ($locations as $otherLocation) { | |
| 563 | 563 |                              if ($otherLocation->id != $location->id) { | 
| 564 | 564 | $otherParentLocations[] = $otherLocation->parentLocationId; | 
| 565 | 565 | } | 
| @@ -4,7 +4,6 @@ | ||
| 4 | 4 | |
| 5 | 5 | use eZ\Publish\API\Repository\Values\ContentType\ContentType; | 
| 6 | 6 | use eZ\Publish\API\Repository\Values\ContentType\FieldDefinition; | 
| 7 | -use eZ\Publish\API\Repository\Values\Content\Location; | |
| 8 | 7 | use eZ\Publish\API\Repository\Values\Content\Content; | 
| 9 | 8 | use eZ\Publish\API\Repository\Values\Content\ContentCreateStruct; | 
| 10 | 9 | use eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct; | 
| @@ -33,7 +33,7 @@ | ||
| 33 | 33 | public function sortField2Hash($value) | 
| 34 | 34 |      { | 
| 35 | 35 |          $ref = new \ReflectionClass('eZ\Publish\API\Repository\Values\Content\Location'); | 
| 36 | -        foreach($ref->getConstants() as $key => $val) { | |
| 36 | +        foreach ($ref->getConstants() as $key => $val) { | |
| 37 | 37 |              if (strpos($key, 'SORT_FIELD_') === 0 && $val == $value) { | 
| 38 | 38 | return strtolower(substr($key, 11)); | 
| 39 | 39 | } | 
| @@ -192,7 +192,7 @@ | ||
| 192 | 192 | } | 
| 193 | 193 | |
| 194 | 194 | // Add new attributes | 
| 195 | -                foreach($newFieldDefinitions as $newFieldDefinition) { | |
| 195 | +                foreach ($newFieldDefinitions as $newFieldDefinition) { | |
| 196 | 196 |                      if ($newFieldDefinition->position == 0) { | 
| 197 | 197 | $newFieldDefinition->position = ++$maxFieldDefinitionPos; | 
| 198 | 198 | } | 
| @@ -234,11 +234,11 @@ | ||
| 234 | 234 |              if ($mode != 'delete') { | 
| 235 | 235 | $names = array(); | 
| 236 | 236 | $descriptions = array(); | 
| 237 | -                foreach($objectStateGroup->languageCodes as $languageCode) { | |
| 238 | - $names[$languageCode] = $objectStateGroup->getName($languageCode); | |
| 237 | +                foreach ($objectStateGroup->languageCodes as $languageCode) { | |
| 238 | + $names[$languageCode] = $objectStateGroup->getName($languageCode); | |
| 239 | 239 | } | 
| 240 | -                foreach($objectStateGroup->languageCodes as $languageCode) { | |
| 241 | - $descriptions[$languageCode] = $objectStateGroup->getDescription($languageCode); | |
| 240 | +                foreach ($objectStateGroup->languageCodes as $languageCode) { | |
| 241 | + $descriptions[$languageCode] = $objectStateGroup->getDescription($languageCode); | |
| 242 | 242 | } | 
| 243 | 243 | $groupData = array_merge( | 
| 244 | 244 | $groupData, | 
| @@ -248,11 +248,11 @@ | ||
| 248 | 248 |              if ($mode != 'delete') { | 
| 249 | 249 | $names = array(); | 
| 250 | 250 | $descriptions = array(); | 
| 251 | -                foreach($objectState->languageCodes as $languageCode) { | |
| 252 | - $names[$languageCode] = $objectState->getName($languageCode); | |
| 251 | +                foreach ($objectState->languageCodes as $languageCode) { | |
| 252 | + $names[$languageCode] = $objectState->getName($languageCode); | |
| 253 | 253 | } | 
| 254 | -                foreach($objectState->languageCodes as $languageCode) { | |
| 255 | - $descriptions[$languageCode] = $objectState->getDescription($languageCode); | |
| 254 | +                foreach ($objectState->languageCodes as $languageCode) { | |
| 255 | + $descriptions[$languageCode] = $objectState->getDescription($languageCode); | |
| 256 | 256 | } | 
| 257 | 257 | $groupData = array_merge( | 
| 258 | 258 | $groupData, | 
| @@ -114,7 +114,7 @@ | ||
| 114 | 114 |      { | 
| 115 | 115 | $migrationService = $this->migrationService; | 
| 116 | 116 | $executors = $migrationService->listExecutors(); | 
| 117 | -        foreach($executors as $key => $name) { | |
| 117 | +        foreach ($executors as $key => $name) { | |
| 118 | 118 | $executor = $migrationService->getExecutor($name); | 
| 119 | 119 |              if (!$executor instanceof MigrationGeneratorInterface) { | 
| 120 | 120 | unset($executors[$key]); | 
| @@ -104,7 +104,7 @@ discard block | ||
| 104 | 104 | |
| 105 | 105 |          foreach ($contentIds as $contentId) { | 
| 106 | 106 | $content = $this->repository->getContentService()->loadContent($contentId); | 
| 107 | -            foreach($this->repository->getLocationService()->loadLocations($content->contentInfo) as $location) { | |
| 107 | +            foreach ($this->repository->getLocationService()->loadLocations($content->contentInfo) as $location) { | |
| 108 | 108 | $locations[$location->id] = $location; | 
| 109 | 109 | } | 
| 110 | 110 | } | 
| @@ -124,7 +124,7 @@ discard block | ||
| 124 | 124 | |
| 125 | 125 |          foreach ($remoteContentIds as $remoteContentId) { | 
| 126 | 126 | $content = $this->repository->getContentService()->loadContentByRemoteId($remoteContentId); | 
| 127 | -            foreach($this->repository->getLocationService()->loadLocations($content->contentInfo) as $location) { | |
| 127 | +            foreach ($this->repository->getLocationService()->loadLocations($content->contentInfo) as $location) { | |
| 128 | 128 | $locations[$location->id] = $location; | 
| 129 | 129 | } | 
| 130 | 130 | } | 
| @@ -35,7 +35,7 @@ discard block | ||
| 35 | 35 | |
| 36 | 36 | // allow user to pass in selection values by name | 
| 37 | 37 | $fieldSettings = null; | 
| 38 | -        foreach($fieldValue as $key => $val) { | |
| 38 | +        foreach ($fieldValue as $key => $val) { | |
| 39 | 39 |              if (is_string($val)) { | 
| 40 | 40 |                  if (ctype_digit($val)) { | 
| 41 | 41 | $fieldValue[$key] = (int)$val; | 
| @@ -43,7 +43,7 @@ discard block | ||
| 43 | 43 |                      if ($fieldSettings === null) { | 
| 44 | 44 | $fieldSettings = $this->loadFieldSettings($context['contentTypeIdentifier'], $context['fieldIdentifier']); | 
| 45 | 45 | } | 
| 46 | -                    foreach($fieldSettings['options'] as $pos => $name) { | |
| 46 | +                    foreach ($fieldSettings['options'] as $pos => $name) { | |
| 47 | 47 |                          if ($name === $val) { | 
| 48 | 48 | $fieldValue[$key] = $pos; | 
| 49 | 49 | break; |