| @@ -87,7 +87,7 @@ discard block | ||
| 87 | 87 |              ->setAllowedTypes('routing_name_pattern', 'string') | 
| 88 | 88 |              ->setAllowedTypes('routing_url_pattern', 'string') | 
| 89 | 89 |              ->setAllowedTypes('page_parameter', 'string') | 
| 90 | -            ->setNormalizer('routing_name_pattern', function (Options $options, $value) { | |
| 90 | +            ->setNormalizer('routing_name_pattern', function(Options $options, $value) { | |
| 91 | 91 |                  if (false === strstr($value, '{admin}')) { | 
| 92 | 92 |                      throw new InvalidOptionsException('Admin routing configuration pattern name should contains the {admin} placeholder'); | 
| 93 | 93 | } | 
| @@ -97,7 +97,7 @@ discard block | ||
| 97 | 97 | |
| 98 | 98 | return $value; | 
| 99 | 99 | }) | 
| 100 | -            ->setNormalizer('routing_url_pattern', function (Options $options, $value) { | |
| 100 | +            ->setNormalizer('routing_url_pattern', function(Options $options, $value) { | |
| 101 | 101 |                  if (false === strstr($value, '{admin}')) { | 
| 102 | 102 |                      throw new InvalidOptionsException('Admin routing configuration url pattern should contains {admin} placeholder'); | 
| 103 | 103 | } | 
| @@ -135,7 +135,7 @@ discard block | ||
| 135 | 135 | |
| 136 | 136 |          $resolver->setDefault('fields_mapping', $defaultMapping); | 
| 137 | 137 |          $resolver->setAllowedTypes('fields_mapping', 'array'); | 
| 138 | -        $resolver->setNormalizer('fields_mapping', function (Options $options, $value) use ($defaultMapping) { | |
| 138 | +        $resolver->setNormalizer('fields_mapping', function(Options $options, $value) use ($defaultMapping) { | |
| 139 | 139 | // Merge with default mapping to allow override | 
| 140 | 140 | $value = array_merge($defaultMapping, $value); | 
| 141 | 141 | |
| @@ -149,7 +149,7 @@ discard block | ||
| 149 | 149 | |
| 150 | 150 |          $resolver->setDefault('fields_template_mapping', $defaultMapping); | 
| 151 | 151 |          $resolver->setAllowedTypes('fields_template_mapping', 'array'); | 
| 152 | -        $resolver->setNormalizer('fields_template_mapping', function (Options $options, $value) use ($defaultMapping) { | |
| 152 | +        $resolver->setNormalizer('fields_template_mapping', function(Options $options, $value) use ($defaultMapping) { | |
| 153 | 153 | // Merge with default mapping to allow override | 
| 154 | 154 | $value = array_merge($defaultMapping, $value); | 
| 155 | 155 | |
| @@ -14,7 +14,7 @@ discard block | ||
| 14 | 14 |      { | 
| 15 | 15 | $resolver | 
| 16 | 16 | ->setDefaults([ | 
| 17 | -                'translation' => function (OptionsResolver $subResolver) use ($pattern, $catalog) { | |
| 17 | +                'translation' => function(OptionsResolver $subResolver) use ($pattern, $catalog) { | |
| 18 | 18 | $subResolver | 
| 19 | 19 | ->setDefaults([ | 
| 20 | 20 | 'enabled' => true, | 
| @@ -25,7 +25,7 @@ discard block | ||
| 25 | 25 | }, | 
| 26 | 26 | ]) | 
| 27 | 27 |              ->setAllowedTypes('translation', 'array') | 
| 28 | -            ->setNormalizer('translation', function (Options $options, $value) { | |
| 28 | +            ->setNormalizer('translation', function(Options $options, $value) { | |
| 29 | 29 |                  if (!array_key_exists('enabled', $value)) { | 
| 30 | 30 |                      throw new InvalidOptionsException('Admin translation enabled parameter should be defined'); | 
| 31 | 31 | } | 
| @@ -148,7 +148,7 @@ discard block | ||
| 148 | 148 | */ | 
| 149 | 149 | private function getFieldsNormalizer() | 
| 150 | 150 |      { | 
| 151 | -        return function (Options $options, $fields) { | |
| 151 | +        return function(Options $options, $fields) { | |
| 152 | 152 | $normalizedFields = []; | 
| 153 | 153 | |
| 154 | 154 |              foreach ($fields as $name => $field) { | 
| @@ -170,7 +170,7 @@ discard block | ||
| 170 | 170 | */ | 
| 171 | 171 | private function getOrderNormalizer() | 
| 172 | 172 |      { | 
| 173 | -        return function (Options $options, $order) { | |
| 173 | +        return function(Options $options, $order) { | |
| 174 | 174 |              foreach ($order as $field => $sort) { | 
| 175 | 175 |                  if (!is_string($sort) || !is_string($field) || !in_array(strtolower($sort), ['asc', 'desc'])) { | 
| 176 | 176 |                      throw new Exception('Order value should be an array of string (["field" => $key]), got '.gettype($sort)); | 
| @@ -189,7 +189,7 @@ discard block | ||
| 189 | 189 | */ | 
| 190 | 190 | private function getLoadStrategyNormalizer() | 
| 191 | 191 |      { | 
| 192 | -        return function (Options $options, $value) { | |
| 192 | +        return function(Options $options, $value) { | |
| 193 | 193 |              if (!$value) { | 
| 194 | 194 |                  if ('create' == $this->actionName) { | 
| 195 | 195 | $value = LAGAdminBundle::LOAD_STRATEGY_NONE; | 
| @@ -212,7 +212,7 @@ discard block | ||
| 212 | 212 | */ | 
| 213 | 213 | private function getCriteriaNormalizer() | 
| 214 | 214 |      { | 
| 215 | -        return function (Options $options, $value) { | |
| 215 | +        return function(Options $options, $value) { | |
| 216 | 216 |              if (!$value) { | 
| 217 | 217 | $idActions = [ | 
| 218 | 218 | 'edit', | 
| @@ -250,7 +250,7 @@ discard block | ||
| 250 | 250 | */ | 
| 251 | 251 | private function getFiltersNormalizer(): Closure | 
| 252 | 252 |      { | 
| 253 | -        return function (Options $options, $data) { | |
| 253 | +        return function(Options $options, $data) { | |
| 254 | 254 | $normalizedData = []; | 
| 255 | 255 | |
| 256 | 256 |              foreach ($data as $name => $field) { | 
| @@ -276,7 +276,7 @@ discard block | ||
| 276 | 276 | |
| 277 | 277 | private function getRouteDefaultNormalizer(): Closure | 
| 278 | 278 |      { | 
| 279 | -        return function (Options $options, $value) { | |
| 279 | +        return function(Options $options, $value) { | |
| 280 | 280 |              if (!is_array($value)) { | 
| 281 | 281 | $value = []; | 
| 282 | 282 | } | 
| @@ -289,7 +289,7 @@ discard block | ||
| 289 | 289 | |
| 290 | 290 | private function getFormNormalizer(): Closure | 
| 291 | 291 |      { | 
| 292 | -        return function (Options $options, $value) { | |
| 292 | +        return function(Options $options, $value) { | |
| 293 | 293 |              if (null !== $value) { | 
| 294 | 294 | return $value; | 
| 295 | 295 | } | 
| @@ -309,7 +309,7 @@ discard block | ||
| 309 | 309 | |
| 310 | 310 | private function getTitleNormalizer(): Closure | 
| 311 | 311 |      { | 
| 312 | -        return function (Options $options, $value) { | |
| 312 | +        return function(Options $options, $value) { | |
| 313 | 313 | // If the translation system is not used, return the provided value as is | 
| 314 | 314 |              if (!$this->adminConfiguration->isTranslationEnabled()) { | 
| 315 | 315 |                  if (null === $value) { | 
| @@ -381,7 +381,7 @@ discard block | ||
| 381 | 381 | 'menus' => [], | 
| 382 | 382 | ]) | 
| 383 | 383 |              ->setAllowedTypes('add_return', 'boolean') | 
| 384 | -            ->setNormalizer('menus', function (Options $options, $value) { | |
| 384 | +            ->setNormalizer('menus', function(Options $options, $value) { | |
| 385 | 385 |                  if (false === $value) { | 
| 386 | 386 | return $value; | 
| 387 | 387 | } |