@@ -106,7 +106,7 @@ |
||
106 | 106 | * Return action configuration resolver |
107 | 107 | * |
108 | 108 | * @param OptionsResolver $resolver |
109 | - * @param $actionName |
|
109 | + * @param string $actionName |
|
110 | 110 | * @param Admin|null $admin |
111 | 111 | */ |
112 | 112 | protected function configureOptionsResolver(OptionsResolver $resolver, $actionName, Admin $admin = null) |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $resolver |
83 | 83 | ->setDefault('route', '') |
84 | 84 | ->setAllowedTypes('route', 'string') |
85 | - ->setNormalizer('route', function (Options $options, $value) { |
|
85 | + ->setNormalizer('route', function(Options $options, $value) { |
|
86 | 86 | if (!$value) { |
87 | 87 | // if no route was provided, it should be linked to an Admin |
88 | 88 | if (!$this->admin) { |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | ->addAllowedValues('load_strategy', AdminInterface::LOAD_STRATEGY_NONE) |
115 | 115 | ->addAllowedValues('load_strategy', AdminInterface::LOAD_STRATEGY_UNIQUE) |
116 | 116 | ->addAllowedValues('load_strategy', AdminInterface::LOAD_STRATEGY_MULTIPLE) |
117 | - ->setNormalizer('load_strategy', function (Options $options, $value) { |
|
117 | + ->setNormalizer('load_strategy', function(Options $options, $value) { |
|
118 | 118 | |
119 | 119 | if (!$value) { |
120 | 120 | if ($this->actionName == 'create') { |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | // criteria used to find entity in the data provider |
140 | 140 | $resolver |
141 | 141 | ->setDefault('criteria', []) |
142 | - ->setNormalizer('criteria', function (Options $options, $value) { |
|
142 | + ->setNormalizer('criteria', function(Options $options, $value) { |
|
143 | 143 | |
144 | 144 | if (!$value) { |
145 | 145 | $idActions = [ |
@@ -62,7 +62,7 @@ |
||
62 | 62 | $resolver->setAllowedTypes('base_template', 'string'); |
63 | 63 | $resolver->setNormalizer('base_template', function (Options $options, $value) { |
64 | 64 | // resource must exists |
65 | - $this |
|
65 | + $this |
|
66 | 66 | ->kernel |
67 | 67 | ->locateResource($value); |
68 | 68 |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | // main base template |
61 | 61 | $resolver->setDefault('base_template', 'LAGAdminBundle::admin.layout.html.twig'); |
62 | 62 | $resolver->setAllowedTypes('base_template', 'string'); |
63 | - $resolver->setNormalizer('base_template', function (Options $options, $value) { |
|
63 | + $resolver->setNormalizer('base_template', function(Options $options, $value) { |
|
64 | 64 | // resource must exists |
65 | 65 | $this |
66 | 66 | ->kernel |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | // form block template |
73 | 73 | $resolver->setDefault('block_template', 'LAGAdminBundle:Form:fields.html.twig'); |
74 | 74 | $resolver->setAllowedTypes('block_template', 'string'); |
75 | - $resolver->setNormalizer('block_template', function (Options $options, $value) { |
|
75 | + $resolver->setNormalizer('block_template', function(Options $options, $value) { |
|
76 | 76 | // resource must exists |
77 | 77 | $this |
78 | 78 | ->kernel |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | 'name_pattern' => 'lag.admin.{admin}', |
103 | 103 | ]); |
104 | 104 | $resolver->setAllowedTypes('routing', 'array'); |
105 | - $resolver->setNormalizer('routing', function (Options $options, $value) { |
|
105 | + $resolver->setNormalizer('routing', function(Options $options, $value) { |
|
106 | 106 | |
107 | 107 | // url pattern should contain {admin} and {action} token |
108 | 108 | $urlPattern = $value['url_pattern']; |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | 'pattern' => 'lag.admin.{key}' |
131 | 131 | ]); |
132 | 132 | $resolver->setAllowedTypes('translation', 'array'); |
133 | - $resolver->setNormalizer('translation', function (Options $options, $value) { |
|
133 | + $resolver->setNormalizer('translation', function(Options $options, $value) { |
|
134 | 134 | |
135 | 135 | if (!is_bool($value['enabled'])) { |
136 | 136 | throw new InvalidOptionsException('Admin translation enabled parameter should be a boolean'); |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | |
162 | 162 | $resolver->setDefault('fields_mapping', $defaultMapping); |
163 | 163 | $resolver->setAllowedTypes('fields_mapping', 'array'); |
164 | - $resolver->setNormalizer('fields_mapping', function (Options $options, $value) use ($defaultMapping) { |
|
164 | + $resolver->setNormalizer('fields_mapping', function(Options $options, $value) use ($defaultMapping) { |
|
165 | 165 | // merge with default mapping to allow override |
166 | 166 | $value = array_merge($defaultMapping, $value); |
167 | 167 |