@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $references = $this->repository->getResults($refsId); |
| 89 | 89 | foreach ($references as $reference) { |
| 90 | 90 | if ($transform === true) { |
| 91 | - $transformViewReferenceFn = function ($parentViewReference) use (&$transformViewReferenceFn, $keepChildren) { |
|
| 91 | + $transformViewReferenceFn = function($parentViewReference) use (&$transformViewReferenceFn, $keepChildren) { |
|
| 92 | 92 | $transformer = ViewReferenceManager::findTransformerFromElement($parentViewReference); |
| 93 | 93 | $reference = $transformer->transform($parentViewReference); |
| 94 | 94 | if ($keepChildren) { |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | { |
| 153 | 153 | $viewsReferences = []; |
| 154 | 154 | |
| 155 | - $decoratorFn = function ($depth, $char0 = '└', $char = '─') { |
|
| 155 | + $decoratorFn = function($depth, $char0 = '└', $char = '─') { |
|
| 156 | 156 | $decorator = $char0; |
| 157 | 157 | for ($i = 0; $i <= $depth; $i++) { |
| 158 | 158 | $decorator .= $char; |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | public function addDataSource($dataSource, $parameters) |
| 22 | 22 | { |
| 23 | 23 | $method = $parameters['method']; |
| 24 | - $data = function () use ($dataSource, $method) { |
|
| 24 | + $data = function() use ($dataSource, $method) { |
|
| 25 | 25 | return $dataSource->{$method}(); |
| 26 | 26 | }; |
| 27 | 27 | $this->dataSource[$parameters['alias']] = [ |
@@ -495,7 +495,7 @@ |
||
| 495 | 495 | */ |
| 496 | 496 | public function hasCriteriaNamed($criteriaAlias) |
| 497 | 497 | { |
| 498 | - return $this->criterias->exists(function ($key, $element) use ($criteriaAlias) { |
|
| 498 | + return $this->criterias->exists(function($key, $element) use ($criteriaAlias) { |
|
| 499 | 499 | return $criteriaAlias === $element->getName(); |
| 500 | 500 | }); |
| 501 | 501 | } |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | $widget = $widgetMap->getWidget(); |
| 44 | 44 | $widget->setWidgetMap($widgetMap); |
| 45 | 45 | $widgetMap->setWidget(null); |
| 46 | - if ($key % 100 == 0) { |
|
| 46 | + if ($key%100 == 0) { |
|
| 47 | 47 | $entityManager->flush(); |
| 48 | 48 | } |
| 49 | 49 | $progress->advance(); |
@@ -264,7 +264,7 @@ |
||
| 264 | 264 | |
| 265 | 265 | private function formatAttributes($attributes) |
| 266 | 266 | { |
| 267 | - array_walk($attributes, function (&$item, $key) { |
|
| 267 | + array_walk($attributes, function(&$item, $key) { |
|
| 268 | 268 | if (is_array($item)) { |
| 269 | 269 | $item = implode($item, ' '); |
| 270 | 270 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | 'options' => [ |
| 51 | 51 | 'choices' => $this->getAllAvailableRoles($this->roleHierarchy), |
| 52 | 52 | 'choices_as_values' => true, |
| 53 | - 'choice_label' => function ($value) { |
|
| 53 | + 'choice_label' => function($value) { |
|
| 54 | 54 | return $value; |
| 55 | 55 | }, |
| 56 | 56 | ], |
@@ -443,7 +443,7 @@ |
||
| 443 | 443 | */ |
| 444 | 444 | private function getPageRoles(View $view) |
| 445 | 445 | { |
| 446 | - $insertAncestorRole = function (View $view = null) use (&$insertAncestorRole) { |
|
| 446 | + $insertAncestorRole = function(View $view = null) use (&$insertAncestorRole) { |
|
| 447 | 447 | if ($view === null) { |
| 448 | 448 | return; |
| 449 | 449 | } |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | 'class' => 'Victoire\Bundle\BlogBundle\Entity\Blog', |
| 27 | 27 | 'property' => 'name', |
| 28 | 28 | 'preferred_choices' => $options['blog'] ? [$options['blog']] : [], |
| 29 | - 'query_builder' => function (EntityRepository $er) use ($options) { |
|
| 29 | + 'query_builder' => function(EntityRepository $er) use ($options) { |
|
| 30 | 30 | return $er->joinTranslations($options['locale'])->getInstance(); |
| 31 | 31 | }, |
| 32 | 32 | ] |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | ]); |
| 239 | 239 | |
| 240 | 240 | $question = new Question($questionHelper->getQuestion('Widget name', $input->getOption('bundle-name'))); |
| 241 | - $question->setValidator(function ($answer) { |
|
| 241 | + $question->setValidator(function($answer) { |
|
| 242 | 242 | return self::validateWidgetName($answer, false); |
| 243 | 243 | }); |
| 244 | 244 | |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | ]); |
| 286 | 286 | |
| 287 | 287 | $question = new Question($questionHelper->getQuestion('Parent widget name', false)); |
| 288 | - $question->setValidator(function ($answer) { |
|
| 288 | + $question->setValidator(function($answer) { |
|
| 289 | 289 | return self::validateWidgetName($answer, false); |
| 290 | 290 | }); |
| 291 | 291 | $parent = $questionHelper->ask($input, $output, $question); |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | ]); |
| 311 | 311 | |
| 312 | 312 | $question = new Question($questionHelper->getQuestion('Target directory', $dir), $dir); |
| 313 | - $question->setValidator(function ($dir) use ($bundle, $namespace) { |
|
| 313 | + $question->setValidator(function($dir) use ($bundle, $namespace) { |
|
| 314 | 314 | return Validators::validateTargetDir($dir, $bundle, $namespace); |
| 315 | 315 | }); |
| 316 | 316 | $dir = $questionHelper->ask($input, $output, $question); |
@@ -486,7 +486,7 @@ discard block |
||
| 486 | 486 | } |
| 487 | 487 | $output->writeln(''); |
| 488 | 488 | |
| 489 | - $fieldValidator = function ($type) use ($types) { |
|
| 489 | + $fieldValidator = function($type) use ($types) { |
|
| 490 | 490 | if (!in_array($type, $types)) { |
| 491 | 491 | throw new \InvalidArgumentException(sprintf('Invalid type "%s".', $type)); |
| 492 | 492 | } |
@@ -494,7 +494,7 @@ discard block |
||
| 494 | 494 | return $type; |
| 495 | 495 | }; |
| 496 | 496 | |
| 497 | - $lengthValidator = function ($length) { |
|
| 497 | + $lengthValidator = function($length) { |
|
| 498 | 498 | if (!$length) { |
| 499 | 499 | return $length; |
| 500 | 500 | } |
@@ -516,7 +516,7 @@ discard block |
||
| 516 | 516 | |
| 517 | 517 | $question = new Question($questionHelper->getQuestion('New field name (press <return> to stop adding fields)', null)); |
| 518 | 518 | $question->setValidator( |
| 519 | - function ($name) use ($fields, $generator) { |
|
| 519 | + function($name) use ($fields, $generator) { |
|
| 520 | 520 | if (isset($fields[$name]) || 'id' == $name) { |
| 521 | 521 | throw new \InvalidArgumentException(sprintf('Field "%s" is already defined.', $name)); |
| 522 | 522 | } |