@@ -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 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | if (is_string($key) && is_string($value)) { |
47 | 47 | return array('identifier' => $key, 'attribute' => $value); |
48 | 48 | } |
49 | - if (!is_array($value) || !isset($value['identifier']) || ! isset($value['attribute'])) { |
|
49 | + if (!is_array($value) || !isset($value['identifier']) || !isset($value['attribute'])) { |
|
50 | 50 | throw new InvalidStepDefinitionException("Invalid reference definition for reference number $key"); |
51 | 51 | } |
52 | 52 | return $value; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | |
85 | 85 | /// @todo can we could have the included migration's steps be printed as 1.1, 1.2 etc... |
86 | 86 | /// @todo we could return the result of the included migration's last step |
87 | - foreach($migrationDefinitions as $migrationDefinition) { |
|
87 | + foreach ($migrationDefinitions as $migrationDefinition) { |
|
88 | 88 | $this->migrationService->executeMigration($migrationDefinition, $context); |
89 | 89 | } |
90 | 90 | |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | |
211 | 211 | foreach ($dsl['references'] as $key => $reference) { |
212 | 212 | // BC |
213 | - if (is_array($reference) && isset($reference['json_path']) && !isset($reference['attribute'] )) { |
|
213 | + if (is_array($reference) && isset($reference['json_path']) && !isset($reference['attribute'])) { |
|
214 | 214 | $reference['attribute'] = $reference['json_path']; |
215 | 215 | } |
216 | 216 | $reference = $this->parseReferenceDefinition($key, $reference); |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | |
166 | 166 | // sort tags by depth so that there will be no errors in case we are deleting parent and child |
167 | 167 | $tagsCollection = $tagsCollection->getArrayCopy(); |
168 | - uasort($tagsCollection, function ($t1, $t2) { |
|
168 | + uasort($tagsCollection, function($t1, $t2) { |
|
169 | 169 | if ($t1->depth == $t2->depth) return 0; |
170 | 170 | return ($t1->depth > $t2->depth) ? -1 : 1; |
171 | 171 | }); |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | case 'create': |
273 | 273 | // sort top to bottom |
274 | 274 | $tagCollection = $tagCollection->getArrayCopy(); |
275 | - uasort($tagCollection, function ($t1, $t2) { |
|
275 | + uasort($tagCollection, function($t1, $t2) { |
|
276 | 276 | if ($t1->depth == $t2->depth) return 0; |
277 | 277 | return ($t1->depth > $t2->depth) ? 1 : -1; |
278 | 278 | }); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | case 'delete': |
281 | 281 | // sort bottom to top |
282 | 282 | $tagCollection = $tagCollection->getArrayCopy(); |
283 | - uasort($tagCollection, function ($t1, $t2) { |
|
283 | + uasort($tagCollection, function($t1, $t2) { |
|
284 | 284 | if ($t1->depth == $t2->depth) return 0; |
285 | 285 | return ($t1->depth > $t2->depth) ? -1 : 1; |
286 | 286 | }); |
@@ -166,7 +166,9 @@ discard block |
||
166 | 166 | // sort tags by depth so that there will be no errors in case we are deleting parent and child |
167 | 167 | $tagsCollection = $tagsCollection->getArrayCopy(); |
168 | 168 | uasort($tagsCollection, function ($t1, $t2) { |
169 | - if ($t1->depth == $t2->depth) return 0; |
|
169 | + if ($t1->depth == $t2->depth) { |
|
170 | + return 0; |
|
171 | + } |
|
170 | 172 | return ($t1->depth > $t2->depth) ? -1 : 1; |
171 | 173 | }); |
172 | 174 | |
@@ -273,7 +275,9 @@ discard block |
||
273 | 275 | // sort top to bottom |
274 | 276 | $tagCollection = $tagCollection->getArrayCopy(); |
275 | 277 | uasort($tagCollection, function ($t1, $t2) { |
276 | - if ($t1->depth == $t2->depth) return 0; |
|
278 | + if ($t1->depth == $t2->depth) { |
|
279 | + return 0; |
|
280 | + } |
|
277 | 281 | return ($t1->depth > $t2->depth) ? 1 : -1; |
278 | 282 | }); |
279 | 283 | break; |
@@ -281,7 +285,9 @@ discard block |
||
281 | 285 | // sort bottom to top |
282 | 286 | $tagCollection = $tagCollection->getArrayCopy(); |
283 | 287 | uasort($tagCollection, function ($t1, $t2) { |
284 | - if ($t1->depth == $t2->depth) return 0; |
|
288 | + if ($t1->depth == $t2->depth) { |
|
289 | + return 0; |
|
290 | + } |
|
285 | 291 | return ($t1->depth > $t2->depth) ? -1 : 1; |
286 | 292 | }); |
287 | 293 | break; |
@@ -71,7 +71,7 @@ |
||
71 | 71 | { |
72 | 72 | /** @var \Doctrine\DBAL\Connection $connection */ |
73 | 73 | $connection = ($this->connection instanceof ValueHolderInterface) ? $this->connection->getWrappedValueHolderValue() : $this->connection; |
74 | - $cl = \Closure::bind(function () { |
|
74 | + $cl = \Closure::bind(function() { |
|
75 | 75 | $this->transactionNestingLevel = 0; |
76 | 76 | $this->isRollbackOnly = false; |
77 | 77 | }, |