Passed
Branch master (7a7694)
by Andreas
18:25
created
src/midcom/datamanager/schema.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             'customdata' => []
161 161
         ], $config));
162 162
 
163
-        $normalize_widget = function (Options $options, $value) {
163
+        $normalize_widget = function(Options $options, $value) {
164 164
             if ($value == 'text') {
165 165
                 if (!empty($options['widget_config']['hideinput'])) {
166 166
                     return PasswordType::class;
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
             return $value;
186 186
         };
187 187
 
188
-        $normalize_storage = function (Options $options, $value) use ($name) {
188
+        $normalize_storage = function(Options $options, $value) use ($name) {
189 189
             $default = [
190 190
                 'location' => 'parameter',
191 191
                 'domain' => 'midcom.helper.datamanager2',
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             return $value;
228 228
         };
229 229
 
230
-        $normalize_validation = function (Options $options, $value) {
230
+        $normalize_validation = function(Options $options, $value) {
231 231
             $validation = [];
232 232
 
233 233
             foreach ((array) $value as $key => $rule) {
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
                     $rule = ['type' => $rule];
240 240
                 } elseif (!array_key_exists('type', $rule)) {
241 241
                     throw new midcom_error("Missing validation rule type for rule {$key} on field {$options['name']}, this is a required option.");
242
-                } elseif (   $rule['type'] == 'compare'
242
+                } elseif ($rule['type'] == 'compare'
243 243
                           && !array_key_exists('compare_with', $rule)) {
244 244
                     throw new midcom_error("Missing compare_with option for compare type rule {$key} on field {$options['name']}, this is a required option.");
245 245
                 }
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/type/jsdateType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 'later_than' => null
49 49
             ]
50 50
         ]);
51
-        $resolver->setNormalizer('widget_config', function (Options $options, $value) {
51
+        $resolver->setNormalizer('widget_config', function(Options $options, $value) {
52 52
             $widget_defaults = [
53 53
                 'showOn' => 'both',
54 54
                 'format' => '%Y-%m-%d %H:%M',
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             ];
60 60
             return helper::normalize($widget_defaults, $value);
61 61
         });
62
-        $resolver->setNormalizer('constraints', function (Options $options, $value) {
62
+        $resolver->setNormalizer('constraints', function(Options $options, $value) {
63 63
             if ($options['type_config']['later_than']) {
64 64
                 $value[] = new laterthan($options['type_config']['later_than']);
65 65
             }
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/helper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     public static function add_normalizers(OptionsResolver $resolver, array $defaults)
17 17
     {
18 18
         foreach ($defaults as $key => $values) {
19
-            $resolver->setNormalizer($key, function (Options $options, $value) use ($values) {
19
+            $resolver->setNormalizer($key, function(Options $options, $value) use ($values) {
20 20
                 return self::normalize($values, $value);
21 21
             });
22 22
         }
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/choicelist/loader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
             $converted = [];
50 50
             foreach ($options as $key => $label) {
51 51
                 // symfony expects only strings
52
-                $converted[(string)$label] = (string)$key;
52
+                $converted[(string) $label] = (string) $key;
53 53
             }
54 54
 
55 55
             $this->choice_list = new ArrayChoiceList($converted, $value);
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/textExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
                 'purify_config' => []
36 36
             ]
37 37
         ]);
38
-        $resolver->setNormalizer('constraints', function (Options $options, $value) {
38
+        $resolver->setNormalizer('constraints', function(Options $options, $value) {
39 39
             if (!empty($options['type_config']['forbidden_patterns'])) {
40 40
                 $value[] = new validator(['forbidden_patterns' => $options['type_config']['forbidden_patterns']]);
41 41
             }
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/textareaExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public function configureOptions(OptionsResolver $resolver)
27 27
     {
28
-        $map_attr = function (Options $options, $value) {
28
+        $map_attr = function(Options $options, $value) {
29 29
             if ($value === null) {
30 30
                 $value = [];
31 31
             }
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/type/codemirrorType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function configureOptions(OptionsResolver $resolver)
33 33
     {
34
-        $map_attr = function (Options $options, $value) {
34
+        $map_attr = function(Options $options, $value) {
35 35
             if ($value === null) {
36 36
                 $value = [];
37 37
             }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             ]
54 54
         ]);
55 55
 
56
-        $resolver->setNormalizer('constraints', function (Options $options, $value) {
56
+        $resolver->setNormalizer('constraints', function(Options $options, $value) {
57 57
             if ($options['dm2_type'] == 'php') {
58 58
                 $value[] = new php;
59 59
             }
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/type/otherType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     public function configureOptions(OptionsResolver $resolver)
26 26
     {
27 27
         $resolver->setDefault('error_bubbling', false);
28
-        $resolver->setNormalizer('type_config', function (Options $options, $value) {
28
+        $resolver->setNormalizer('type_config', function(Options $options, $value) {
29 29
             $type_defaults = [
30 30
                 'options' => [],
31 31
                 'allow_other' => true,
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/type/selectType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,14 +26,14 @@  discard block
 block discarded – undo
26 26
      */
27 27
     public function configureOptions(OptionsResolver $resolver)
28 28
     {
29
-        $choice_loader = function (Options $options) {
29
+        $choice_loader = function(Options $options) {
30 30
             if (!empty($options['choices'])) {
31 31
                 return null;
32 32
             }
33 33
             return new loader($options['type_config']);
34 34
         };
35 35
 
36
-        $map_multiple = function (Options $options) {
36
+        $map_multiple = function(Options $options) {
37 37
             return !empty($options['type_config']['allow_multiple']);
38 38
         };
39 39
 
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             'placeholder' => false
44 44
         ]);
45 45
 
46
-        $resolver->setNormalizer('type_config', function (Options $options, $value) {
46
+        $resolver->setNormalizer('type_config', function(Options $options, $value) {
47 47
             $type_defaults = [
48 48
                 'options' => [],
49 49
                 'option_callback' => null,
Please login to merge, or discard this patch.