Passed
Pull Request — master (#79)
by
unknown
04:32
created
src/Form/Type/SIUnitType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $resolver->setDefaults([
71 71
             'measurement_unit' => null,
72
-            'show_prefix' => static function (Options $options) {
72
+            'show_prefix' => static function(Options $options) {
73 73
                 if (null !== $options['measurement_unit']) {
74 74
                     /** @var MeasurementUnit $unit */
75 75
                     $unit = $options['measurement_unit'];
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
                 return false;
81 81
             },
82
-            'is_integer' => static function (Options $options) {
82
+            'is_integer' => static function(Options $options) {
83 83
                 if (null !== $options['measurement_unit']) {
84 84
                     /** @var MeasurementUnit $unit */
85 85
                     $unit = $options['measurement_unit'];
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
                 return false;
91 91
             },
92
-            'unit' => static function (Options $options) {
92
+            'unit' => static function(Options $options) {
93 93
                 if (null !== $options['measurement_unit']) {
94 94
                     /** @var MeasurementUnit $unit */
95 95
                     $unit = $options['measurement_unit'];
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
         $resolver->setDefaults([
112 112
             'min' => 0,
113 113
             'max' => '',
114
-            'step' => static function (Options $options) {
114
+            'step' => static function(Options $options) {
115 115
                 if (true === $options['is_integer']) {
116 116
                     return 1;
117 117
                 }
Please login to merge, or discard this patch.
src/Form/Type/StructuralEntityType.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
     public function buildForm(FormBuilderInterface $builder, array $options): void
80 80
     {
81 81
         $builder->addModelTransformer(new CallbackTransformer(
82
-                                          function ($value) use ($options) {
82
+                                          function($value) use ($options) {
83 83
                                               return $this->transform($value, $options);
84
-                                          }, function ($value) use ($options) {
84
+                                          }, function($value) use ($options) {
85 85
                                               return $this->reverseTransform($value, $options);
86 86
                                           }));
87 87
     }
@@ -91,21 +91,21 @@  discard block
 block discarded – undo
91 91
         $resolver->setRequired(['class']);
92 92
         $resolver->setDefaults([
93 93
             'show_fullpath_in_subtext' => true, //When this is enabled, the full path will be shown in subtext
94
-            'subentities_of' => null,   //Only show entities with the given parent class
95
-            'disable_not_selectable' => false,  //Disable entries with not selectable property
94
+            'subentities_of' => null, //Only show entities with the given parent class
95
+            'disable_not_selectable' => false, //Disable entries with not selectable property
96 96
             'choice_value' => 'id', //Use the element id as option value and for comparing items
97
-            'choice_loader' => function (Options $options) {
98
-                return new CallbackChoiceLoader(function () use ($options) {
97
+            'choice_loader' => function(Options $options) {
98
+                return new CallbackChoiceLoader(function() use ($options) {
99 99
                     return $this->getEntries($options);
100 100
                 });
101 101
             },
102
-            'choice_label' => function (Options $options) {
103
-                return function ($choice, $key, $value) use ($options) {
102
+            'choice_label' => function(Options $options) {
103
+                return function($choice, $key, $value) use ($options) {
104 104
                     return $this->generateChoiceLabels($choice, $key, $value, $options);
105 105
                 };
106 106
             },
107
-            'choice_attr' => function (Options $options) {
108
-                return function ($choice, $key, $value) use ($options) {
107
+            'choice_attr' => function(Options $options) {
108
+                return function($choice, $key, $value) use ($options) {
109 109
                     return $this->generateChoiceAttr($choice, $key, $value, $options);
110 110
                 };
111 111
             },
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
         $resolver->setDefault('empty_message', null);
116 116
 
117
-        $resolver->setDefault('attr', static function (Options $options) {
117
+        $resolver->setDefault('attr', static function(Options $options) {
118 118
             $tmp = [
119 119
                 'class' => 'selectpicker',
120 120
                 'data-live-search' => true,
Please login to merge, or discard this patch.
src/Form/Type/MasterPictureAttachmentType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
                 'class' => 'selectpicker',
66 66
                 'title' => 'selectpicker.nothing_selected',
67 67
             ],
68
-            'choice_attr' => static function (Options $options) {
69
-                return  static function ($choice, $key, $value) use ($options) {
68
+            'choice_attr' => static function(Options $options) {
69
+                return  static function($choice, $key, $value) use ($options) {
70 70
                     /** @var Attachment $choice */
71 71
                     $tmp = ['data-subtext' => $choice->getFilename() ?? 'URL'];
72 72
 
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
                 };
81 81
             },
82 82
             'choice_label' => 'name',
83
-            'choice_loader' => static function (Options $options) {
83
+            'choice_loader' => static function(Options $options) {
84 84
                 return new CallbackChoiceLoader(
85
-                    static function () use ($options) {
85
+                    static function() use ($options) {
86 86
                         $entity = $options['entity'];
87 87
                         if (!$entity instanceof AttachmentContainingDBElement) {
88 88
                             throw new \RuntimeException('$entity must have Attachments! (be of type AttachmentContainingDBElement)');
Please login to merge, or discard this patch.
src/Form/UserSettingsType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -124,7 +124,7 @@
 block discarded – undo
124 124
                 ],
125 125
                 'choice_translation_domain' => false,
126 126
                 'choices' => User::AVAILABLE_THEMES,
127
-                'choice_label' => static function ($entity, $key, $value) {
127
+                'choice_label' => static function($entity, $key, $value) {
128 128
                     return $value;
129 129
                 },
130 130
                 'placeholder' => 'user_settings.theme.placeholder',
Please login to merge, or discard this patch.
src/Form/TFAGoogleSettingsType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
 
64 64
     public function buildForm(FormBuilderInterface $builder, array $options): void
65 65
     {
66
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, static function (FormEvent $event): void {
66
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, static function(FormEvent $event): void {
67 67
             $form = $event->getForm();
68 68
             /** @var User $user */
69 69
             $user = $event->getData();
Please login to merge, or discard this patch.
src/Form/AdminPages/AttachmentTypeAdminForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,10 +76,10 @@
 block discarded – undo
76 76
 
77 77
         //Normalize data before writing it to database
78 78
         $builder->get('filetype_filter')->addViewTransformer(new CallbackTransformer(
79
-            static function ($value) {
79
+            static function($value) {
80 80
                 return $value;
81 81
             },
82
-            function ($value) {
82
+            function($value) {
83 83
                 return $this->filterTools->normalizeFilterString($value);
84 84
             }
85 85
         ));
Please login to merge, or discard this patch.
src/Form/Permissions/PermissionsType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
     {
67 67
         $resolver->setDefaults([
68 68
             'show_legend' => true,
69
-            'constraints' => static function (Options $options) {
69
+            'constraints' => static function(Options $options) {
70 70
                 if (!$options['disabled']) {
71 71
                     return [new NoLockout()];
72 72
                 }
Please login to merge, or discard this patch.
src/Form/Permissions/PermissionGroupType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -88,13 +88,13 @@
 block discarded – undo
88 88
     {
89 89
         parent::configureOptions($resolver);
90 90
 
91
-        $resolver->setDefault('group_name', static function (Options $options) {
91
+        $resolver->setDefault('group_name', static function(Options $options) {
92 92
             return trim($options['name']);
93 93
         });
94 94
 
95 95
         $resolver->setDefault('inherit', false);
96 96
 
97
-        $resolver->setDefault('label', function (Options $options) {
97
+        $resolver->setDefault('label', function(Options $options) {
98 98
             if (!empty($this->perm_structure['groups'][$options['group_name']]['label'])) {
99 99
                 return $this->perm_structure['groups'][$options['group_name']]['label'];
100 100
             }
Please login to merge, or discard this patch.
src/Form/Permissions/PermissionType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,11 +66,11 @@  discard block
 block discarded – undo
66 66
     {
67 67
         parent::configureOptions($resolver);
68 68
 
69
-        $resolver->setDefault('perm_name', static function (Options $options) {
69
+        $resolver->setDefault('perm_name', static function(Options $options) {
70 70
             return $options['name'];
71 71
         });
72 72
 
73
-        $resolver->setDefault('label', function (Options $options) {
73
+        $resolver->setDefault('label', function(Options $options) {
74 74
             if (!empty($this->perm_structure['perms'][$options['perm_name']]['label'])) {
75 75
                 return $this->perm_structure['perms'][$options['perm_name']]['label'];
76 76
             }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             return $options['name'];
79 79
         });
80 80
 
81
-        $resolver->setDefault('multi_checkbox', static function (Options $options) {
81
+        $resolver->setDefault('multi_checkbox', static function(Options $options) {
82 82
             return !$options['disabled'];
83 83
         });
84 84
 
Please login to merge, or discard this patch.