Passed
Push — master ( dc3f28...9cb9a1 )
by Andreas
16:51
created
lib/midgard/admin/asgard/toolbar.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,8 @@
 block discarded – undo
117 117
                                 }
118 118
                                 break;
119 119
                         }
120
-                    } catch (midcom_error $e) {
120
+                    }
121
+                    catch (midcom_error $e) {
121 122
                         $e->log();
122 123
                     }
123 124
                 }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             ];
143 143
         }
144 144
 
145
-        if (   midcom::get()->config->get('midcom_services_rcs_enable')
145
+        if (midcom::get()->config->get('midcom_services_rcs_enable')
146 146
             && $object->can_do('midgard:update')
147 147
             && $object->_use_rcs) {
148 148
             $buttons[] = [
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     private function get_toolbar_update_items(midcom_core_dbaobject $object) : array
204 204
     {
205 205
         $buttons = [];
206
-        if (   $object instanceof midcom_db_topic
206
+        if ($object instanceof midcom_db_topic
207 207
             && $object->component
208 208
             && $object->can_do('midcom:component_config')) {
209 209
             $buttons[] = [
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
             MIDCOM_TOOLBAR_ENABLED => $object->can_do('midgard:privileges'),
242 242
         ];
243 243
 
244
-        if (   midcom::get()->componentloader->is_installed('midcom.helper.replicator')
244
+        if (midcom::get()->componentloader->is_installed('midcom.helper.replicator')
245 245
             && midcom::get()->auth->admin) {
246 246
             $buttons[] = [
247 247
                 MIDCOM_TOOLBAR_URL => "__mfa/asgard_midcom.helper.replicator/object/{$object->guid}/",
Please login to merge, or discard this patch.
lib/org/openpsa/documents/directory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         $ownerwg = $this->get_parameter('org.openpsa.core', 'orgOpenpsaOwnerWg');
21 21
         $accesstype = $this->get_parameter('org.openpsa.core', 'orgOpenpsaAccesstype');
22 22
 
23
-        if (   $ownerwg
23
+        if ($ownerwg
24 24
             && $accesstype) {
25 25
             // Sync the object's ACL properties into MidCOM ACL system
26 26
             $sync = new org_openpsa_core_acl_synchronizer();
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     private function _update_parent_timestamp()
42 42
     {
43 43
         $parent = $this->get_parent();
44
-        if (   $parent
44
+        if ($parent
45 45
             && $parent->component == 'org.openpsa.documents') {
46 46
             midcom::get()->auth->request_sudo('org.openpsa.documents');
47 47
 
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/scheduler.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -126,7 +126,8 @@
 block discarded – undo
126 126
         $salesproject = org_openpsa_sales_salesproject_dba::get_cached($this->_deliverable->salesproject);
127 127
         try {
128 128
             $owner = midcom_db_person::get_cached($salesproject->owner);
129
-        } catch (midcom_error $e) {
129
+        }
130
+        catch (midcom_error $e) {
130 131
             $e->log();
131 132
             return;
132 133
         }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         }
96 96
 
97 97
         // TODO: Warehouse management: create new order
98
-        if (   $this->_deliverable->end < $next_cycle_start
98
+        if ($this->_deliverable->end < $next_cycle_start
99 99
             && $this->_deliverable->end != 0) {
100 100
             debug_add('Do not register next cycle, the contract ends before');
101 101
             return $this->_deliverable->end_subscription();
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
         }
329 329
 
330 330
         //If previous cycle was run at the end of the month, the new one should be at the end of the month as well
331
-        if (   $date->format('t') == $date->format('j')
331
+        if ($date->format('t') == $date->format('j')
332 332
             && $new_date->format('t') != $new_date->format('j')) {
333 333
             $new_date->setDate((int) $new_date->format('Y'), (int) $new_date->format('m'), (int) $new_date->format('t'));
334 334
         }
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/midcom/interfaces.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -159,7 +159,8 @@
 block discarded – undo
159 159
 
160 160
         try {
161 161
             $object = new $classname($guid);
162
-        } catch (midcom_error $e) {
162
+        }
163
+        catch (midcom_error $e) {
163 164
             $handler->print_error($type . " {$guid} not found, error " . $e->getMessage());
164 165
             return false;
165 166
         }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,11 +77,11 @@  discard block
 block discarded – undo
77 77
 
78 78
     public function resolve_object_link(midcom_db_topic $topic, midcom_core_dbaobject $object) : ?string
79 79
     {
80
-        if (   $object instanceof org_openpsa_contacts_group_dba
80
+        if ($object instanceof org_openpsa_contacts_group_dba
81 81
             || $object instanceof midcom_db_group) {
82 82
             return "group/{$object->guid}/";
83 83
         }
84
-        if (   $object instanceof org_openpsa_contacts_person_dba
84
+        if ($object instanceof org_openpsa_contacts_person_dba
85 85
             || $object instanceof midcom_db_person) {
86 86
             return "person/{$object->guid}/";
87 87
         }
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
             // We have a feed URL, but we should check if it is GeoRSS as well
111 111
             $items = net_nemein_rss_fetch::raw_fetch($data['rss_url'])->get_items();
112 112
 
113
-            if (   !empty($items)
114
-                && (   $items[0]->get_latitude()
113
+            if (!empty($items)
114
+                && ($items[0]->get_latitude()
115 115
                     || $items[0]->get_longitude())) {
116 116
                 // This is a GeoRSS feed
117 117
                 $data['georss_url'] = $data['rss_url'];
Please login to merge, or discard this patch.
lib/org/openpsa/reports/handler/sales/report.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,8 @@
 block discarded – undo
71 71
             $owner = org_openpsa_contacts_person_dba::get_cached($salesproject->owner);
72 72
             $row['index_owner'] = $owner->name;
73 73
             $row['owner'] = org_openpsa_widgets_contact::get($owner->guid)->show_inline();
74
-        } catch (midcom_error $e) {
74
+        }
75
+        catch (midcom_error $e) {
75 76
             $e->log();
76 77
         }
77 78
         $row['amount'] = $object->pricePerUnit * $object->units;
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/campaign/member.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
             return;
152 152
         }
153 153
         foreach ($parameters as $param_data) {
154
-            if (   empty($param_data['domain'])
154
+            if (empty($param_data['domain'])
155 155
                 || empty($param_data['name'])
156 156
                 || empty($param_data['value'])) {
157 157
                 // TODO: Log warning
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/importer.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -300,7 +300,8 @@
 block discarded – undo
300 300
                     $organization = $this->_import_subscribers_organization($subscriber);
301 301
                     $this->_import_subscribers_organization_member($subscriber, $person, $organization);
302 302
                 }
303
-            } catch (midcom_error $e) {
303
+            }
304
+            catch (midcom_error $e) {
304 305
                 $e->log();
305 306
                 // Clean up possibly created data
306 307
                 $this->_clean_new_objects();
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
             // User is or has been subscriber earlier, update status
134 134
             $member = $members[0];
135 135
 
136
-            if (   $member->orgOpenpsaObtype == org_openpsa_directmarketing_campaign_member_dba::UNSUBSCRIBED
136
+            if ($member->orgOpenpsaObtype == org_openpsa_directmarketing_campaign_member_dba::UNSUBSCRIBED
137 137
                 || $member->orgOpenpsaObtype == org_openpsa_directmarketing_campaign_member_dba::NORMAL) {
138 138
                 $this->_import_status['already_subscribed']++;
139 139
                 return;
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
 
174 174
             $qb = org_openpsa_contacts_group_dba::new_query_builder();
175 175
             $schema = $this->_schemadbs['organization']->get('default');
176
-            if (   $schema->has_field('company_id')
176
+            if ($schema->has_field('company_id')
177 177
                 && !empty($subscriber['organization']['company_id'])) {
178 178
                 // Imported data has a company id, we use that instead of name
179 179
                 $qb->add_constraint($schema->get_field('company_id')['storage']['location'], '=', $subscriber['organization']['company_id']);
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                 // Seek by official name
182 182
                 $qb->add_constraint('official', '=', $subscriber['organization']['official']);
183 183
 
184
-                if (   $schema->has_field('city')
184
+                if ($schema->has_field('city')
185 185
                     && !empty($subscriber['organization']['city'])) {
186 186
                     // Imported data has a city, we use also that for matching
187 187
                     $qb->add_constraint($schema->get_field('city')['storage']['location'], '=', $subscriber['organization']['city']);
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/exec/cleanup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     echo "            <th>{$type}</th>\n";
35 35
     echo "            <td style=\"text-align: right;\">" . number_format($count) . "</td>\n";
36 36
     if (isset($cleanups_kept[$type])) {
37
-        echo "            <td style=\"text-align: right;\">" . number_format($cleanups_kept[$type]) ."</td>\n";
37
+        echo "            <td style=\"text-align: right;\">" . number_format($cleanups_kept[$type]) . "</td>\n";
38 38
     }
39 39
     echo "        </tr>\n";
40 40
 }
Please login to merge, or discard this patch.
src/midcom/workflow/dialog.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
         $button_config[MIDCOM_TOOLBAR_URL] = $url;
74 74
         //The constants are numeric, so array_merge won't work...
75 75
         foreach ($options as $key => $value) {
76
-            if (   is_array($value)
76
+            if (is_array($value)
77 77
                 && !empty($button_config[$key])) {
78 78
                 $value = array_merge($button_config[$key], $value);
79 79
             }
Please login to merge, or discard this patch.