@@ -34,11 +34,11 @@ discard block |
||
| 34 | 34 | $resolver |
| 35 | 35 | ->setRequired('schema') |
| 36 | 36 | ->setAllowedTypes('schema', schema::class) |
| 37 | - ->setDefault('action', function (Options $options, $value) { |
|
| 37 | + ->setDefault('action', function(Options $options, $value) { |
|
| 38 | 38 | return $options['schema']->get('action'); |
| 39 | 39 | }); |
| 40 | 40 | |
| 41 | - $resolver->setNormalizer('csrf_protection', function (Options $options, $value) { |
|
| 41 | + $resolver->setNormalizer('csrf_protection', function(Options $options, $value) { |
|
| 42 | 42 | foreach ($options['schema']->get('fields') as $config) { |
| 43 | 43 | if ($config['widget'] === 'csrf') { |
| 44 | 44 | return true; |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | } |
| 47 | 47 | return false; |
| 48 | 48 | }); |
| 49 | - $resolver->setNormalizer('constraints', function (Options $options, $value) { |
|
| 49 | + $resolver->setNormalizer('constraints', function(Options $options, $value) { |
|
| 50 | 50 | $validation = $options['schema']->get('validation'); |
| 51 | 51 | if (!empty($validation)) { |
| 52 | 52 | $cb_wrapper = new cb_wrapper($validation); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | // this is mainly there to skip validation in case the user pressed cancel |
| 73 | 73 | $builder->addEventListener(FormEvents::POST_SUBMIT, function(PostSubmitEvent $event) { |
| 74 | 74 | $form = $event->getForm(); |
| 75 | - if ( $form instanceof Form |
|
| 75 | + if ($form instanceof Form |
|
| 76 | 76 | && $form->getClickedButton() |
| 77 | 77 | && $form->getClickedButton()->getConfig()->getOption('operation') == controller::CANCEL) { |
| 78 | 78 | $event->stopPropagation(); |