@@ -178,7 +178,7 @@ |
||
| 178 | 178 | return $this->matchConditions($values); |
| 179 | 179 | |
| 180 | 180 | default: |
| 181 | - throw new InvalidStepDefinitionException("Unknown until condition: '$key' when suspending a migration ".var_export($conditions, true)); |
|
| 181 | + throw new InvalidStepDefinitionException("Unknown until condition: '$key' when suspending a migration " . var_export($conditions, true)); |
|
| 182 | 182 | } |
| 183 | 183 | } |
| 184 | 184 | } |
@@ -58,25 +58,25 @@ |
||
| 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 | } |
@@ -2,7 +2,7 @@ discard block |
||
| 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 |
||
| 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 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | if (is_string($key) && is_string($value)) { |
| 32 | 32 | return array('identifier' => $key, 'attribute' => $value); |
| 33 | 33 | } |
| 34 | - if (!is_array($value) || !isset($value['identifier']) || ! isset($value['attribute'])) { |
|
| 34 | + if (!is_array($value) || !isset($value['identifier']) || !isset($value['attribute'])) { |
|
| 35 | 35 | throw new InvalidStepDefinitionException("Invalid reference definition for reference number $key"); |
| 36 | 36 | } |
| 37 | 37 | return $value; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | if (is_object($value) || is_resource($value)) { |
| 51 | 51 | return false; |
| 52 | 52 | } |
| 53 | - foreach($value as $subValue) { |
|
| 53 | + foreach ($value as $subValue) { |
|
| 54 | 54 | if (!$this->isValidReferenceValue($subValue)) { |
| 55 | 55 | return false; |
| 56 | 56 | } |
@@ -91,7 +91,7 @@ |
||
| 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)) { |
@@ -170,7 +170,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
@@ -76,7 +76,7 @@ |
||
| 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 | } |