Passed
Push — master ( bdfe16...bd3b7f )
by Andreas
10:59
created
src/midcom/datamanager/extension/textareaExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      */
23 23
     public function configureOptions(OptionsResolver $resolver) : void
24 24
     {
25
-        $map_attr = function (Options $options, $value) {
25
+        $map_attr = function(Options $options, $value) {
26 26
             $value ??= [];
27 27
             $value['rows'] = $options['widget_config']['height'];
28 28
             $value['cols'] = $options['widget_config']['width'];
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/transformer/jsdateTransformer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
             }
34 34
         }
35 35
 
36
-        if (   empty($input)
37
-            || (   $input instanceof DateTime
36
+        if (empty($input)
37
+            || ($input instanceof DateTime
38 38
                 && $input->format('Y-m-d H:i:s') == '0001-01-01 00:00:00')) {
39 39
             return $result;
40 40
         }
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
             throw new TransformationFailedException('Expected an array.');
60 60
         }
61 61
 
62
-        if (   empty($array['date'])
63
-            || (   $array['date'] instanceof DateTime
62
+        if (empty($array['date'])
63
+            || ($array['date'] instanceof DateTime
64 64
                 && $array['date']->format('Y-m-d H:i:s') == '0001-01-01 00:00:00')) {
65 65
             return null;
66 66
         }
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/transformer/multipleTransformer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                     return [];
55 55
                 }
56 56
                 $results = explode($this->multiple_separator, substr($input, 1, -1));
57
-                if (   !empty($this->config['widget_config']['id_field'])
57
+                if (!empty($this->config['widget_config']['id_field'])
58 58
                     && $this->config['widget_config']['id_field'] == 'id') {
59 59
                     $results = array_map('intval', $results);
60 60
                 }
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
     public function reverseTransform(mixed $array) : mixed
69 69
     {
70
-        if (!is_array($array) ) {
70
+        if (!is_array($array)) {
71 71
             throw new TransformationFailedException('Expected an array.');
72 72
         }
73 73
 
Please login to merge, or discard this patch.
lib/midcom/response/relocate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      */
28 28
     public function setTargetUrl(string $url) : static
29 29
     {
30
-        if (   !str_starts_with($url, "/")
30
+        if (!str_starts_with($url, "/")
31 31
             && !preg_match('|^https?://|', $url)) {
32 32
             $prefix = midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ANCHORPREFIX) ?: '/';
33 33
             $url = $prefix . $url;
Please login to merge, or discard this patch.