Passed
Push — master ( fb1a59...c5195a )
by Andreas
09:51
created
lib/org/openpsa/directmarketing/viewer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      */
21 21
     private function _populate_node_toolbar()
22 22
     {
23
-        if (   $this->_topic->can_do('midgard:update')
23
+        if ($this->_topic->can_do('midgard:update')
24 24
             && $this->_topic->can_do('midcom:component_config')) {
25 25
             $workflow = $this->get_workflow('datamanager');
26 26
             $this->_node_toolbar->add_item($workflow->get_button($this->router->generate('config'), [
Please login to merge, or discard this patch.
lib/org/openpsa/documents/style/show-search-form-simple.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 $search_config = org_openpsa_widgets_ui::get_search_providers();
3
-if (   array_key_exists('org.openpsa.documents', $search_config)
3
+if (array_key_exists('org.openpsa.documents', $search_config)
4 4
     && midcom::get()->indexer->enabled()) {
5 5
     $url = $data['router']->generate('search'); ?>
6 6
 <div class="area" id="document_search">
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/handler/frontpage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
         }
59 59
         $this->_view_toolbar->add_items($buttons);
60 60
 
61
-        if (   $this->_topic->can_do('midgard:update')
61
+        if ($this->_topic->can_do('midgard:update')
62 62
             && $this->_topic->can_do('midcom:component_config')) {
63 63
             $this->_node_toolbar->add_item($workflow->get_button($this->router->generate('config'), [
64 64
                 MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('component configuration'),
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/handler/group/view.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
             ];
49 49
         }
50 50
 
51
-        if (   midcom::get()->auth->can_user_do('midgard:create', null, org_openpsa_contacts_person_dba::class)
51
+        if (midcom::get()->auth->can_user_do('midgard:create', null, org_openpsa_contacts_person_dba::class)
52 52
             && $this->group->can_do('midgard:create')) {
53 53
                 $buttons[] = $workflow->get_button($this->router->generate('person_new_group', ['guid' => $this->group->guid]), [
54 54
                 MIDCOM_TOOLBAR_LABEL => $this->_l10n->get('create person'),
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
         $siteconfig = org_openpsa_core_siteconfig::get_instance();
60 60
         $user_url = $siteconfig->get_node_full_url('org.openpsa.user');
61
-        if (   $user_url
61
+        if ($user_url
62 62
             && midcom::get()->auth->can_user_do('org.openpsa.user:access', null, org_openpsa_user_interface::class)) {
63 63
             $buttons[] = [
64 64
                 MIDCOM_TOOLBAR_URL => $user_url . "group/{$this->group->guid}/",
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/handler/list.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@
 block discarded – undo
171 171
     {
172 172
         $this->prepare_toolbar(false);
173 173
 
174
-        if (   $this->_topic->can_do('midgard:update')
174
+        if ($this->_topic->can_do('midgard:update')
175 175
             && $this->_topic->can_do('midcom:component_config')) {
176 176
             $workflow = $this->get_workflow('datamanager');
177 177
             $this->_node_toolbar->add_item($workflow->get_button($this->router->generate('config'), [
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -96,7 +96,8 @@  discard block
 block discarded – undo
96 96
                 $customer = org_openpsa_contacts_group_dba::get_cached($invoice->customer);
97 97
                 $entry['customer'] = "<a href=\"{$this->router->generate('list_customer_all', ['guid' => $customer->guid])}\">" . $customer->get_label() . "</a>";
98 98
                 $entry['index_customer'] = $customer->get_label();
99
-            } catch (midcom_error $e) {
99
+            }
100
+            catch (midcom_error $e) {
100 101
                 $entry['customer'] = '';
101 102
                 $entry['index_customer'] = '';
102 103
             }
@@ -110,7 +111,8 @@  discard block
 block discarded – undo
110 111
                 $entry['contact'] = "<a href=\"{$this->router->generate('list_customer_all', ['guid' => $contact->guid])}\">" . $contact->get_label() . "</a>";
111 112
                 $entry['contact'] = $contact_widget->show_inline();
112 113
                 $entry['index_contact'] = $contact->get_label();
113
-            } catch (midcom_error $e) {
114
+            }
115
+            catch (midcom_error $e) {
114 116
                 $entry['contact'] = '';
115 117
                 $entry['index_contact'] = '';
116 118
             }
@@ -257,7 +259,8 @@  discard block
 block discarded – undo
257 259
     {
258 260
         try {
259 261
             $this->_customer = new org_openpsa_contacts_group_dba($guid);
260
-        } catch (midcom_error $e) {
262
+        }
263
+        catch (midcom_error $e) {
261 264
             $this->_customer = new org_openpsa_contacts_person_dba($guid);
262 265
         }
263 266
         $data['customer'] = $this->_customer;
Please login to merge, or discard this patch.
lib/org/openpsa/projects/handler/task/list.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@
 block discarded – undo
169 169
             case 'proposed':
170 170
                 $html = $this->render_status($task->manager, "from %s");
171 171
                 $task->get_members();
172
-                if (   $task->can_do('midgard:update')
172
+                if ($task->can_do('midgard:update')
173 173
                     && isset($task->resources[midcom_connection::get_user()])) {
174 174
                     $html .= '<form method="post" action="' . $this->router->generate('workflow', ['guid' => $task->guid]) . '">';
175 175
                     //TODO: If we need all resources to accept task hide tools when we have accepted and replace with "pending acceptance from..."
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -291,7 +291,8 @@  discard block
 block discarded – undo
291 291
             $url = $this->router->generate('project', ['guid' => $project->guid]);
292 292
             $ret['project'] = '<a href="' . $url . '">' . $project->title . '</a>';
293 293
             $ret['index_project'] = $project->title;
294
-        } catch (midcom_error $e) {
294
+        }
295
+        catch (midcom_error $e) {
295 296
             $e->log();
296 297
         }
297 298
 
@@ -303,7 +304,8 @@  discard block
 block discarded – undo
303 304
                 $customer_url = "{$contacts_url}group/{$customer->guid}/";
304 305
                 $ret['customer'] = "<a href='{$customer_url}' title='{$customer->official}'>{$customer->get_label()}</a>";
305 306
                 $ret['index_customer'] = $customer->name;
306
-            } catch (midcom_error $e) {
307
+            }
308
+            catch (midcom_error $e) {
307 309
                 $ret['customer'] = '';
308 310
                 $ret['index_customer'] = '';
309 311
             }
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/handler/scheduled.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,8 @@  discard block
 block discarded – undo
61 61
         try {
62 62
             $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($at_entry->arguments['deliverable']);
63 63
             $salesproject = org_openpsa_sales_salesproject_dba::get_cached($deliverable->salesproject);
64
-        } catch (midcom_error $e) {
64
+        }
65
+        catch (midcom_error $e) {
65 66
             $e->log();
66 67
             return $invoice;
67 68
         }
@@ -103,7 +104,8 @@  discard block
 block discarded – undo
103 104
                     $invoice[$fieldname] = '<a href="' . $sales_url . 'list/customer/' . $object->guid . '/">' . $invoice[$fieldname] . '</a>';
104 105
                 }
105 106
                 $invoice['index_' . $fieldname] = $object->get_label();
106
-            } catch (midcom_error $e) {
107
+            }
108
+            catch (midcom_error $e) {
107 109
                 $e->log();
108 110
             }
109 111
         }
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/handler/invoice/items.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,8 @@  discard block
 block discarded – undo
48 48
                 if ($sales_url) {
49 49
                     $entry['deliverable'] = '<a href="' . $sales_url . 'deliverable/' . $deliverable->guid . '/">' . $entry['deliverable'] . '</a>';
50 50
                 }
51
-            } catch (midcom_error $e) {
51
+            }
52
+            catch (midcom_error $e) {
52 53
                 $entry['deliverable'] = '';
53 54
             }
54 55
             try {
@@ -57,7 +58,8 @@  discard block
 block discarded – undo
57 58
                 if ($projects_url) {
58 59
                     $entry['task'] = '<a href="' . $projects_url . 'task/' . $task->guid . '/">' . $entry['task'] . '</a>';
59 60
                 }
60
-            } catch (midcom_error $e) {
61
+            }
62
+            catch (midcom_error $e) {
61 63
                 $entry['task'] = '';
62 64
             }
63 65
 
Please login to merge, or discard this patch.
lib/org/openpsa/calendar/conflictmanager.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -195,7 +195,8 @@  discard block
 block discarded – undo
195 195
             try {
196 196
                 $event = new org_openpsa_calendar_event_dba($member->event);
197 197
                 $set_as_modified = true;
198
-            } catch (midcom_error $e) {
198
+            }
199
+            catch (midcom_error $e) {
199 200
                 debug_add("event_resource #{$member->id} links to bogus event #{$member->event}, skipping and removing", MIDCOM_LOG_WARN);
200 201
                 $member->delete();
201 202
                 return;
@@ -223,7 +224,8 @@  discard block
 block discarded – undo
223 224
 
224 225
         try {
225 226
             $event = new org_openpsa_calendar_event_dba($member->eid);
226
-        } catch (midcom_error $e) {
227
+        }
228
+        catch (midcom_error $e) {
227 229
             debug_add("eventmember #{$member->id} links to bogus event #{$member->eid}, skipping and removing", MIDCOM_LOG_WARN);
228 230
             $member->delete();
229 231
             return;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         }
126 126
         // TODO: Shared tasks need a separate check (different member object)
127 127
 
128
-        if (   !empty($this->busy_members)
128
+        if (!empty($this->busy_members)
129 129
             || !empty($this->busy_resources)) {
130 130
             //Unresolved conflicts (note return value is for conflicts not lack of them)
131 131
             midcom::get()->auth->drop_sudo();
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         }
189 189
 
190 190
         if (array_key_exists($member->event, $modified_events)) {
191
-            $event =& $modified_events[$member->event];
191
+            $event = & $modified_events[$member->event];
192 192
             $set_as_modified = false;
193 193
         } else {
194 194
             try {
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         }
203 203
         debug_add("overlap found in event {$event->title} (#{$event->id})");
204 204
 
205
-        if (   $event->tentative
205
+        if ($event->tentative
206 206
             && $rob_tentative) {
207 207
             debug_add('event is tentative, robbing resources');
208 208
             $event->resources = array_diff_key($event->resources, $this->_event->resources);
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
         }
230 230
         debug_add("overlap found in event {$event->title} (#{$event->id})");
231 231
 
232
-        if (   $event->tentative
232
+        if ($event->tentative
233 233
             && $rob_tentative) {
234 234
             debug_add('event is tentative, robbing participants');
235 235
             $event->participants = array_diff_key($event->participants, $this->_event->participants);
Please login to merge, or discard this patch.