Passed
Push — master ( d46fa5...b07635 )
by Andreas
11:04
created
lib/org/openpsa/sales/handler/list.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,8 @@
 block discarded – undo
95 95
         try {
96 96
             $this->_request_data['customer'] = new org_openpsa_contacts_group_dba($guid);
97 97
             $qb->add_constraint('customer', '=', $this->_request_data['customer']->id);
98
-        } catch (midcom_error) {
98
+        }
99
+        catch (midcom_error) {
99 100
             $this->_request_data['customer'] = new org_openpsa_contacts_person_dba($guid);
100 101
             $qb->add_constraint('customerContact', '=', $this->_request_data['customer']->id);
101 102
         }
Please login to merge, or discard this patch.
lib/org/openpsa/sales/handler/deliverable/view.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,8 @@
 block discarded – undo
45 45
         }
46 46
         try {
47 47
             $this->_request_data['product'] = org_openpsa_products_product_dba::get_cached($this->_deliverable->product);
48
-        } catch (midcom_error) {
48
+        }
49
+        catch (midcom_error) {
49 50
             $this->_request_data['product'] = false;
50 51
         }
51 52
     }
Please login to merge, or discard this patch.
lib/org/openpsa/calendar/event/resource.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,8 @@
 block discarded – undo
43 43
         }
44 44
         try {
45 45
             $resource = org_openpsa_calendar_resource_dba::get_cached($this->resource);
46
-        } catch (midcom_error) {
46
+        }
47
+        catch (midcom_error) {
47 48
             debug_add("Cannot fetch resource #{$this->resource} returning false", MIDCOM_LOG_INFO);
48 49
             return false;
49 50
         }
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/invoice/item.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
     public function _on_creating() : bool
27 27
     {
28
-        if (   $this->invoice
28
+        if ($this->invoice
29 29
             && $this->position == 0) {
30 30
             $invoice = org_openpsa_invoices_invoice_dba::get_cached($this->invoice);
31 31
             $this->position = count($invoice->get_invoice_items()) + 1;
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             } catch (midcom_error) {
76 76
             }
77 77
         }
78
-        if (   $url == ''
78
+        if ($url == ''
79 79
             && $sales_url) {
80 80
             try {
81 81
                 $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($this->deliverable);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                 $invoice = new org_openpsa_invoices_invoice_dba($this->invoice);
98 98
                 $old_sum = $invoice->sum;
99 99
                 self::update_invoice($invoice);
100
-                if (   $old_sum != $invoice->sum
100
+                if ($old_sum != $invoice->sum
101 101
                     && !empty($this->deliverable)) {
102 102
                     $deliverable = new org_openpsa_sales_salesproject_deliverable_dba($this->deliverable);
103 103
                     self::update_deliverable($deliverable);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
         if ($invoiced != $deliverable->invoiced) {
137 137
             $deliverable->invoiced = $invoiced;
138
-            if (   $deliverable->orgOpenpsaObtype !== org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION
138
+            if ($deliverable->orgOpenpsaObtype !== org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION
139 139
                 && $deliverable->state < org_openpsa_sales_salesproject_deliverable_dba::STATE_INVOICED) {
140 140
                 $deliverable->state = org_openpsa_sales_salesproject_deliverable_dba::STATE_INVOICED;
141 141
             }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,7 +72,8 @@  discard block
 block discarded – undo
72 72
             try {
73 73
                 $task = org_openpsa_projects_task_dba::get_cached($this->task);
74 74
                 $url = $projects_url . 'task/' . $task->guid . '/';
75
-            } catch (midcom_error) {
75
+            }
76
+            catch (midcom_error) {
76 77
             }
77 78
         }
78 79
         if (   $url == ''
@@ -80,7 +81,8 @@  discard block
 block discarded – undo
80 81
             try {
81 82
                 $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($this->deliverable);
82 83
                 $url = $sales_url . 'deliverable/' . $deliverable->guid . '/';
83
-            } catch (midcom_error) {
84
+            }
85
+            catch (midcom_error) {
84 86
             }
85 87
         }
86 88
         if ($url != '') {
@@ -102,7 +104,8 @@  discard block
 block discarded – undo
102 104
                     $deliverable = new org_openpsa_sales_salesproject_deliverable_dba($this->deliverable);
103 105
                     self::update_deliverable($deliverable);
104 106
                 }
105
-            } catch (midcom_error $e) {
107
+            }
108
+            catch (midcom_error $e) {
106 109
                 $e->log();
107 110
             }
108 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
@@ -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/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/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/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/relatedto/exec/delete_dangling_links.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
     try {
26 26
         midcom::get()->dbfactory->get_object_by_guid($result->fromGuid);
27 27
         midcom::get()->dbfactory->get_object_by_guid($result->toGuid);
28
-    } catch (midcom_error) {
28
+    }
29
+    catch (midcom_error) {
29 30
         echo $i . "/" . $total . ": Deleting relatedto #" . $result->id . "\n";
30 31
         $result->delete();
31 32
     }
Please login to merge, or discard this patch.