Passed
Push — master ( 936202...c84ff9 )
by Andreas
09:27
created
lib/org/openpsa/invoices/billing/data.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -86,7 +86,8 @@  discard block
 block discarded – undo
86 86
             // if the property useContactAddress is set
87 87
             $billing_data[0]->set_address();
88 88
             return $billing_data[0];
89
-        } catch (midcom_error $e) {
89
+        }
90
+        catch (midcom_error $e) {
90 91
             $e->log();
91 92
             return null;
92 93
         }
@@ -131,10 +132,12 @@  discard block
 block discarded – undo
131 132
     {
132 133
         try {
133 134
             return new org_openpsa_contacts_person_dba($this->linkGuid);
134
-        } catch (midcom_error) {
135
+        }
136
+        catch (midcom_error) {
135 137
             try {
136 138
                 return new org_openpsa_contacts_group_dba($this->linkGuid);
137
-            } catch (midcom_error $e) {
139
+            }
140
+            catch (midcom_error $e) {
138 141
                 debug_add("Failed to load contact with GUID: " . $this->linkGuid . " - last error:" . $e->getMessage(), MIDCOM_LOG_ERROR);
139 142
                 return false;
140 143
             }
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
@@ -40,7 +40,8 @@  discard block
 block discarded – undo
40 40
                 if ($sales_url) {
41 41
                     $entry['deliverable'] = '<a href="' . $sales_url . 'deliverable/' . $deliverable->guid . '/">' . $entry['deliverable'] . '</a>';
42 42
                 }
43
-            } catch (midcom_error) {
43
+            }
44
+            catch (midcom_error) {
44 45
                 $entry['deliverable'] = '';
45 46
             }
46 47
             try {
@@ -49,7 +50,8 @@  discard block
 block discarded – undo
49 50
                 if ($projects_url) {
50 51
                     $entry['task'] = '<a href="' . $projects_url . 'task/' . $task->guid . '/">' . $entry['task'] . '</a>';
51 52
                 }
52
-            } catch (midcom_error) {
53
+            }
54
+            catch (midcom_error) {
53 55
                 $entry['task'] = '';
54 56
             }
55 57
 
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/handler/invoice/crud.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,8 @@  discard block
 block discarded – undo
42 42
             // We're creating invoice for chosen customer
43 43
             try {
44 44
                 $this->customer = new org_openpsa_contacts_group_dba($company);
45
-            } catch (midcom_error) {
45
+            }
46
+            catch (midcom_error) {
46 47
                 $contact = new org_openpsa_contacts_person_dba($company);
47 48
                 $this->contact_id = $contact->id;
48 49
             }
@@ -143,7 +144,8 @@  discard block
 block discarded – undo
143 144
             if (!empty($this->invoice->customer)) {
144 145
                 try {
145 146
                     $this->customer = org_openpsa_contacts_group_dba::get_cached($this->invoice->customer);
146
-                } catch (midcom_error $e) {
147
+                }
148
+                catch (midcom_error $e) {
147 149
                     $customer_field['hidden'] = true;
148 150
                     $e->log();
149 151
                 }
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/handler/projects.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,8 @@  discard block
 block discarded – undo
49 49
             try {
50 50
                 $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($task->get_agreement());
51 51
                 $item->deliverable = $deliverable->id;
52
-            } catch (midcom_error $e) {
52
+            }
53
+            catch (midcom_error $e) {
53 54
                 $e->log();
54 55
             }
55 56
             $item->invoice = $invoice->id;
@@ -121,7 +122,8 @@  discard block
 block discarded – undo
121 122
                 $customer = org_openpsa_contacts_group_dba::get_cached($customer_id);
122 123
                 $data['customer_label'] = $customer->official;
123 124
                 $data['disabled'] = '';
124
-            } catch (midcom_error) {
125
+            }
126
+            catch (midcom_error) {
125 127
                 $data['customer_label'] = $this->_l10n->get('no customer');
126 128
                 $data['disabled'] = ' disabled="disabled"';
127 129
             }
@@ -144,7 +146,8 @@  discard block
 block discarded – undo
144 146
                     } else {
145 147
                         $data['invoiceable_units'] = $task->plannedHours;
146 148
                     }
147
-                } catch (midcom_error $e) {
149
+                }
150
+                catch (midcom_error $e) {
148 151
                     $e->log();
149 152
                     if ($this->_config->get('default_hourly_price')) {
150 153
                         $data['default_price'] = $this->_config->get('default_hourly_price');
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/handler/list.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -87,7 +87,8 @@  discard block
 block discarded – undo
87 87
                 $customer = org_openpsa_contacts_group_dba::get_cached($invoice->customer);
88 88
                 $entry['customer'] = "<a href=\"{$this->router->generate('list_customer_all', ['guid' => $customer->guid])}\">" . $customer->get_label() . "</a>";
89 89
                 $entry['index_customer'] = $customer->get_label();
90
-            } catch (midcom_error) {
90
+            }
91
+            catch (midcom_error) {
91 92
                 $entry['customer'] = '';
92 93
                 $entry['index_customer'] = '';
93 94
             }
@@ -101,7 +102,8 @@  discard block
 block discarded – undo
101 102
                 $entry['contact'] = "<a href=\"{$this->router->generate('list_customer_all', ['guid' => $contact->guid])}\">" . $contact->get_label() . "</a>";
102 103
                 $entry['contact'] = $contact_widget->show_inline();
103 104
                 $entry['index_contact'] = $contact->get_label();
104
-            } catch (midcom_error) {
105
+            }
106
+            catch (midcom_error) {
105 107
                 $entry['contact'] = '';
106 108
                 $entry['index_contact'] = '';
107 109
             }
@@ -248,7 +250,8 @@  discard block
 block discarded – undo
248 250
     {
249 251
         try {
250 252
             $this->_customer = new org_openpsa_contacts_group_dba($guid);
251
-        } catch (midcom_error) {
253
+        }
254
+        catch (midcom_error) {
252 255
             $this->_customer = new org_openpsa_contacts_person_dba($guid);
253 256
         }
254 257
         $data['customer'] = $this->_customer;
Please login to merge, or discard this patch.
lib/org/openpsa/slideshow/style/edit.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,8 @@
 block discarded – undo
21 21
         $original = new midcom_db_attachment($image->attachment);
22 22
         $original_url = midcom_db_attachment::get_url($original);
23 23
         $name = $original->name;
24
-    } catch (midcom_error) {
24
+    }
25
+    catch (midcom_error) {
25 26
         $url = MIDCOM_STATIC_URL . '/stock-icons/mime/gnome-text-blank.png';
26 27
         $name = $data['l10n']->get('attachment missing');
27 28
         $original_url = '';
Please login to merge, or discard this patch.
lib/org/openpsa/reports/style/invoices_report-grid.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,8 @@  discard block
 block discarded – undo
70 70
         } else {
71 71
             $entry['customer'] = $customer->official;
72 72
         }
73
-    } catch (midcom_error) {
73
+    }
74
+    catch (midcom_error) {
74 75
     }
75 76
 
76 77
     if ($entry['status'] === 'canceled') {
@@ -82,7 +83,8 @@  discard block
 block discarded – undo
82 83
         $entry['index_contact'] = $contact->rname;
83 84
         $contact_card = org_openpsa_widgets_contact::get($invoice->customerContact);
84 85
         $entry['contact'] = $contact_card->show_inline();
85
-    } catch (midcom_error) {
86
+    }
87
+    catch (midcom_error) {
86 88
     }
87 89
 
88 90
     $entries[] = $entry;
Please login to merge, or discard this patch.
lib/org/openpsa/reports/viewer.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,8 @@
 block discarded – undo
98 98
             $node_guid = $siteconfig->get_node_guid($component);
99 99
             try {
100 100
                 $available_generators[$component] = midcom_db_topic::get_cached($node_guid)->get_label();
101
-            } catch (midcom_error) {
101
+            }
102
+            catch (midcom_error) {
102 103
                 debug_add("topic for component '{$component}' not found or accessible");
103 104
             }
104 105
         }
Please login to merge, or discard this patch.
lib/org/openpsa/reports/handler/invoices/report.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,8 @@
 block discarded – undo
132 132
                         && $deliverable->end > $this->_request_data['start'])) {
133 133
                     $invoices = array_merge($invoices, $this->_get_invoices_for_subscription($deliverable, $at_entry));
134 134
                 }
135
-            } catch (midcom_error) {
135
+            }
136
+            catch (midcom_error) {
136 137
             }
137 138
         }
138 139
         $invoices = array_merge($invoices, $this->_get_deliverable_invoices());
Please login to merge, or discard this patch.