Passed
Push — master ( dc3f28...9cb9a1 )
by Andreas
16:51
created
lib/midcom/core/querybuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
         $this->_add_visibility_checks();
107 107
 
108
-        if (   empty($this->_limit)
108
+        if (empty($this->_limit)
109 109
             && empty($this->_offset)) {
110 110
             // No point to do windowing
111 111
             $newresult = $this->_execute_and_check_privileges();
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
         }
151 151
         $this->_query->set_limit($window_size);
152 152
 
153
-        while (    ($resultset = $this->_execute_and_check_privileges())
153
+        while (($resultset = $this->_execute_and_check_privileges())
154 154
                 || $this->denied > $denied) {
155 155
             $size = count($resultset);
156 156
             $total_size = $size + ($this->denied - $denied);
Please login to merge, or discard this patch.
lib/net/nemein/rss/manage.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,8 @@
 block discarded – undo
25 25
     {
26 26
         try {
27 27
             $viewer->register_plugin_namespace('__feeds', ['rss' => ['class' => __CLASS__]]);
28
-        } catch (midcom_error $e) {
28
+        }
29
+        catch (midcom_error $e) {
29 30
             $e->log();
30 31
         }
31 32
     }
Please login to merge, or discard this patch.
lib/midgard/admin/asgard/stylehelper.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
                 'midcom' => [
95 95
                     'style-init' => '',
96 96
                     'style-finish' => '',
97
-                 ]
97
+                    ]
98 98
             ],
99 99
             'nodes' => [],
100 100
         ];
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
     public function __construct(array &$data)
24 24
     {
25
-        $this->_data =& $data;
25
+        $this->_data = & $data;
26 26
         midcom::get()->head->enable_jquery_ui(['accordion']);
27 27
     }
28 28
 
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
             return;
33 33
         }
34 34
 
35
-        if (   midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_style')
36
-            && (   $this->_data['handler_id'] !== 'object_create'
35
+        if (midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_style')
36
+            && ($this->_data['handler_id'] !== 'object_create'
37 37
                 || $this->_data['current_type'] == 'midgard_element')) {
38 38
             // Suggest element names to create under a style
39 39
             $this->_data['help_style_elementnames'] = $this->_get_style_elements_and_nodes($this->_data['object']->id);
40 40
             midcom_show_style('midgard_admin_asgard_stylehelper_elementnames');
41 41
 
42
-        } elseif (   midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_element')
42
+        } elseif (midcom::get()->dbfactory->is_a($this->_data['object'], 'midgard_element')
43 43
                   && $this->_get_help_element()) {
44 44
             midcom_show_style('midgard_admin_asgard_stylehelper_element');
45 45
         }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 
48 48
     private function _get_help_element() : bool
49 49
     {
50
-        if (   empty($this->_data['object']->name)
50
+        if (empty($this->_data['object']->name)
51 51
             || empty($this->_data['object']->style)) {
52 52
             // We cannot help with empty elements
53 53
             return false;
Please login to merge, or discard this patch.
lib/midcom/helper/toolbar/view.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
             ]);
55 55
         }
56 56
 
57
-        if (   midcom::get()->config->get('midcom_services_rcs_enable')
57
+        if (midcom::get()->config->get('midcom_services_rcs_enable')
58 58
             && $object->can_do('midgard:update')
59 59
             && $object->_use_rcs) {
60 60
             $buttons[] = [
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             }
85 85
 
86 86
             $icon = 'stock-icons/16x16/page-' . $icontype . '.png';
87
-            if (   !midcom::get()->config->get('show_hidden_objects')
87
+            if (!midcom::get()->config->get('show_hidden_objects')
88 88
                 && !$object->metadata->is_visible()) {
89 89
                 // Take scheduling into account
90 90
                 $icon = 'stock-icons/16x16/page-' . $icontype . '-notpublished.png';
Please login to merge, or discard this patch.
lib/org/openpsa/reports/handler/projects/report.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,8 @@
 block discarded – undo
123 123
             $row = [];
124 124
             try {
125 125
                 $row['person'] = org_openpsa_contacts_person_dba::get_cached($hour->person);
126
-            } catch (midcom_error $e) {
126
+            }
127
+            catch (midcom_error $e) {
127 128
                 $e->log();
128 129
                 continue;
129 130
             }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
         $qb_hr = org_openpsa_expenses_hour_report_dba::new_query_builder();
48 48
         $qb_hr->add_constraint('date', '<=', (int) $query_data['end']);
49 49
         $qb_hr->add_constraint('date', '>=', (int) $query_data['start']);
50
-        if (   array_key_exists('invoiceable_filter', $query_data)
50
+        if (array_key_exists('invoiceable_filter', $query_data)
51 51
             && $query_data['invoiceable_filter'] != -1) {
52 52
             $qb_hr->add_constraint('invoiceable', '=', (bool) $query_data['invoiceable_filter']);
53 53
         }
54 54
 
55
-        if (   array_key_exists('invoiced_filter', $query_data)
55
+        if (array_key_exists('invoiced_filter', $query_data)
56 56
             && $query_data['invoiced_filter'] != -1) {
57 57
             if ((int) $query_data['invoiced_filter']) {
58 58
                 debug_add('invoiced_filter parsed as ONLY, adding constraint');
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             $tasks = $this->_expand_task($query_data['task']);
72 72
             $qb_hr->add_constraint('task', 'IN', $tasks);
73 73
         }
74
-        if (   array_key_exists('hour_type_filter', $query_data)
74
+        if (array_key_exists('hour_type_filter', $query_data)
75 75
             && $query_data['hour_type_filter'] != 'builtin:all') {
76 76
             $qb_hr->add_constraint('reportType', '=', $query_data['hour_type_filter']);
77 77
         }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
     private function add_to_group(array $new_row, string $matching, string $sort, string $title)
142 142
     {
143
-        $rows =& $this->_request_data['report']['rows'];
143
+        $rows = & $this->_request_data['report']['rows'];
144 144
         if (array_key_exists($matching, $rows)) {
145 145
             $rows[$matching]['rows'][] = $new_row;
146 146
             $rows[$matching]['total_hours'] += $new_row['hour']->hours;
Please login to merge, or discard this patch.
src/midcom/datamanager/datamanager.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -210,8 +210,7 @@
 block discarded – undo
210 210
     {
211 211
         $ret = [];
212 212
 
213
-        foreach ($this->storage as $field => $value)
214
-        {
213
+        foreach ($this->storage as $field => $value) {
215 214
             $ret[$field] = $value->get_value();
216 215
             $config = $this->schema->get_field($field);
217 216
             if (!empty($config['type_config']['allow_multiple'])) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 
58 58
     public function set_storage(?midcom_core_dbaobject $storage = null, ?string $schemaname = null) : self
59 59
     {
60
-        if (   $schemaname === null
60
+        if ($schemaname === null
61 61
             && !empty($storage->id)) {
62 62
             $schemaname = $storage->get_parameter('midcom.helper.datamanager2', 'schema_name');
63 63
         }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             $this->form = null;
147 147
         }
148 148
 
149
-        if (   $this->form === null
149
+        if ($this->form === null
150 150
             || ($name && $this->form->getName() != $name)) {
151 151
             $this->build_form($this->get_builder($name));
152 152
         }
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
     {
240 240
         $ret = true;
241 241
         foreach ($this->storage as $field) {
242
-            if (   $field instanceof recreateable
242
+            if ($field instanceof recreateable
243 243
                 && !$field->recreate()) {
244 244
                 $ret = false;
245 245
             }
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/handler/group/create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
 
73 73
         $this->_group = new org_openpsa_contacts_group_dba();
74 74
 
75
-        if (   $this->_type == 'organization'
75
+        if ($this->_type == 'organization'
76 76
             && $this->_parent_group) {
77 77
             $this->_group->owner = $this->_parent_group->id;
78 78
         } else {
Please login to merge, or discard this patch.
lib/org/openpsa/documents/handler/directory/create.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,6 +50,6 @@
 block discarded – undo
50 50
         $indexer = new org_openpsa_documents_midcom_indexer($this->_topic);
51 51
         $indexer->index($controller->get_datamanager());
52 52
 
53
-        return $controller->get_datamanager()->get_storage()->get_value()->name. "/";
53
+        return $controller->get_datamanager()->get_storage()->get_value()->name . "/";
54 54
     }
55 55
 }
Please login to merge, or discard this patch.
src/midcom/datamanager/storage/dbanode.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,8 @@
 block discarded – undo
30 30
         $this->config = $config;
31 31
     }
32 32
 
33
-    protected function cast($value) {
33
+    protected function cast($value)
34
+    {
34 35
         if ($this->config['type'] == 'number' && !is_numeric($value)) {
35 36
             $value = (float) $value;
36 37
         }
Please login to merge, or discard this patch.