@@ -52,18 +52,18 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function configureOptions(OptionsResolver $resolver) |
54 | 54 | { |
55 | - $idPropertyPath = function (Options $options) { |
|
55 | + $idPropertyPath = function(Options $options) { |
|
56 | 56 | $propertyPath = $options['grid']->getDefinition()->getResource()->getIdPropertyPath(); |
57 | 57 | |
58 | - return function ($choice) use ($propertyPath) { |
|
58 | + return function($choice) use ($propertyPath) { |
|
59 | 59 | return $this->propertyAccessor->getValue($choice, $propertyPath); |
60 | 60 | }; |
61 | 61 | }; |
62 | 62 | |
63 | - $labelPropertyPath = function (Options $options) { |
|
63 | + $labelPropertyPath = function(Options $options) { |
|
64 | 64 | $propertyPath = $options['grid']->getDefinition()->getResource()->getLabelPropertyPath(); |
65 | 65 | |
66 | - return function ($choice) use ($propertyPath) { |
|
66 | + return function($choice) use ($propertyPath) { |
|
67 | 67 | return $this->propertyAccessor->getValue($choice, $propertyPath); |
68 | 68 | }; |
69 | 69 | }; |
@@ -77,13 +77,13 @@ discard block |
||
77 | 77 | 'choice_name' => $idPropertyPath, |
78 | 78 | 'choice_value' => $idPropertyPath, |
79 | 79 | 'choice_label' => $labelPropertyPath, |
80 | - 'class' => function (Options $options) { |
|
80 | + 'class' => function(Options $options) { |
|
81 | 81 | return $options['grid']->getDefinition()->getResource()->getModel(); |
82 | 82 | }, |
83 | - 'expanded' => function (Options $options) { |
|
83 | + 'expanded' => function(Options $options) { |
|
84 | 84 | return !$this->parameterResolver->resolveApi(); |
85 | 85 | }, |
86 | - 'constraints' => function (Options $options) { |
|
86 | + 'constraints' => function(Options $options) { |
|
87 | 87 | $resource = $options['grid']->getDefinition()->getResource(); |
88 | 88 | |
89 | 89 | return [new Count([ |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | $builder->add('translations', TranslationsFormsType::class, [ |
31 | 31 | 'form_type' => $options['resource']->getTranslation()->getForm(), |
32 | - 'empty_data' => function () { |
|
32 | + 'empty_data' => function() { |
|
33 | 33 | return new ArrayCollection(); |
34 | 34 | }, |
35 | 35 | ]); |
@@ -62,7 +62,7 @@ |
||
62 | 62 | */ |
63 | 63 | private function getCallback() |
64 | 64 | { |
65 | - return function (LocaleInterface $locale) { |
|
65 | + return function(LocaleInterface $locale) { |
|
66 | 66 | return $locale->getCode(); |
67 | 67 | }; |
68 | 68 | } |
@@ -95,7 +95,7 @@ |
||
95 | 95 | $acceptLanguage = trim($request->headers->get('Accept-Language')); |
96 | 96 | |
97 | 97 | if (!empty($acceptLanguage)) { |
98 | - $locales = array_map(function (AcceptLanguage $acceptLanguage) { |
|
98 | + $locales = array_map(function(AcceptLanguage $acceptLanguage) { |
|
99 | 99 | return $acceptLanguage->getType(); |
100 | 100 | }, $this->localeNegotiator->parse($acceptLanguage)); |
101 | 101 | } |
@@ -55,7 +55,7 @@ |
||
55 | 55 | ->method('setDefinition') |
56 | 56 | ->with( |
57 | 57 | $this->identicalTo($service.'.menu'), |
58 | - $this->callback(function (Definition $definition) use ($service, $alias) { |
|
58 | + $this->callback(function(Definition $definition) use ($service, $alias) { |
|
59 | 59 | return $definition->getClass() === ItemInterface::class |
60 | 60 | && $definition->getTag('knp_menu.menu') === [['alias' => $alias]] |
61 | 61 | && is_array($factory = $definition->getFactory()) |
@@ -75,7 +75,7 @@ |
||
75 | 75 | ->method('dispatch') |
76 | 76 | ->with( |
77 | 77 | $this->identicalTo(MenuBuilderEvents::BUILD), |
78 | - $this->callback(function (MenuBuilderEvent $event) use ($item) { |
|
78 | + $this->callback(function(MenuBuilderEvent $event) use ($item) { |
|
79 | 79 | return $event->getFactory() === $this->factory |
80 | 80 | && $event->getItem() === $item; |
81 | 81 | }) |
@@ -100,7 +100,7 @@ |
||
100 | 100 | $sortType |
101 | 101 | ->expects($this->once()) |
102 | 102 | ->method('configureOptions') |
103 | - ->with($this->callback(function (OptionsResolver $resolver) use ($options) { |
|
103 | + ->with($this->callback(function(OptionsResolver $resolver) use ($options) { |
|
104 | 104 | $resolver->setDefined(array_merge(['builder', 'sort', 'grid'], array_keys($options))); |
105 | 105 | |
106 | 106 | return true; |
@@ -100,7 +100,7 @@ |
||
100 | 100 | $sortType |
101 | 101 | ->expects($this->once()) |
102 | 102 | ->method('configureOptions') |
103 | - ->with($this->callback(function (OptionsResolver $resolver) use ($options) { |
|
103 | + ->with($this->callback(function(OptionsResolver $resolver) use ($options) { |
|
104 | 104 | $resolver->setDefined(array_merge(['builder', 'sort', 'grid'], array_keys($options))); |
105 | 105 | |
106 | 106 | return true; |
@@ -100,7 +100,7 @@ |
||
100 | 100 | $sortType |
101 | 101 | ->expects($this->once()) |
102 | 102 | ->method('configureOptions') |
103 | - ->with($this->callback(function (OptionsResolver $resolver) use ($options) { |
|
103 | + ->with($this->callback(function(OptionsResolver $resolver) use ($options) { |
|
104 | 104 | $resolver->setDefined(array_merge(['builder', 'sort', 'grid'], array_keys($options))); |
105 | 105 | |
106 | 106 | return true; |