Passed
Push — master ( 74e782...1a1332 )
by Andreas
29:41
created
src/midcom/datamanager/extension/type/schemaType.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
         $resolver
36 36
             ->setRequired('schema')
37 37
             ->setAllowedTypes('schema', [schema::class, 'string'])
38
-            ->setDefault('action', function (Options $options, $value) {
38
+            ->setDefault('action', function(Options $options, $value) {
39 39
                 return $options['schema']->get('action');
40 40
             });
41 41
 
42
-        $resolver->setNormalizer('csrf_protection', function (Options $options, $value) {
42
+        $resolver->setNormalizer('csrf_protection', function(Options $options, $value) {
43 43
             foreach ($options['schema']->get('fields') as $config) {
44 44
                 if ($config['widget'] === 'csrf') {
45 45
                     return true;
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             }
48 48
             return false;
49 49
         });
50
-        $resolver->setNormalizer('constraints', function (Options $options, $value) {
50
+        $resolver->setNormalizer('constraints', function(Options $options, $value) {
51 51
             $validation = $options['schema']->get('validation');
52 52
             if (!empty($validation)) {
53 53
                 $cb_wrapper = new cb_wrapper($validation);
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             }
56 56
             return $value;
57 57
         });
58
-        $resolver->setNormalizer('schema', function (Options $options, $value) {
58
+        $resolver->setNormalizer('schema', function(Options $options, $value) {
59 59
             if (is_string($value)) {
60 60
                 $schemadb = schemadb::from_path($value);
61 61
                 return $schemadb->get_first();
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         // this is mainly there to skip validation in case the user pressed cancel
81 81
         $builder->addEventListener(FormEvents::POST_SUBMIT, function(PostSubmitEvent $event) {
82 82
             $form = $event->getForm();
83
-            if (   $form instanceof Form
83
+            if ($form instanceof Form
84 84
                 && $form->getClickedButton()
85 85
                 && $form->getClickedButton()->getConfig()->getOption('operation') == controller::CANCEL) {
86 86
                 $event->stopPropagation();
Please login to merge, or discard this patch.