Passed
Push — master ( 7191a0...e75385 )
by Andreas
25:41
created
lib/org/openpsa/invoices/handler/projects.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,8 @@  discard block
 block discarded – undo
51 51
             try {
52 52
                 $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($task->get_agreement());
53 53
                 $item->deliverable = $deliverable->id;
54
-            } catch (midcom_error $e) {
54
+            }
55
+            catch (midcom_error $e) {
55 56
                 $e->log();
56 57
             }
57 58
             $item->invoice = $invoice->id;
@@ -133,7 +134,8 @@  discard block
 block discarded – undo
133 134
                 $customer = org_openpsa_contacts_group_dba::get_cached($customer_id);
134 135
                 $data['customer_label'] = $customer->official;
135 136
                 $data['disabled'] = '';
136
-            } catch (midcom_error $e) {
137
+            }
138
+            catch (midcom_error $e) {
137 139
                 $data['customer_label'] = $this->_l10n->get('no customer');
138 140
                 $data['disabled'] = ' disabled="disabled"';
139 141
             }
@@ -156,7 +158,8 @@  discard block
 block discarded – undo
156 158
                     } else {
157 159
                         $data['invoiceable_units'] = $task->plannedHours;
158 160
                     }
159
-                } catch (midcom_error $e) {
161
+                }
162
+                catch (midcom_error $e) {
160 163
                     $e->log();
161 164
                     if ($this->_config->get('default_hourly_price')) {
162 165
                         $data['default_price'] = $this->_config->get('default_hourly_price');
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/invoice.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -237,7 +237,7 @@
 block discarded – undo
237 237
                 $invoice_item->pricePerUnit = $deliverable->pricePerUnit;
238 238
                 $invoice_item->deliverable = $deliverable->id;
239 239
                 //calculate price
240
-                if (   $deliverable->invoiceByActualUnits
240
+                if ($deliverable->invoiceByActualUnits
241 241
                     || $deliverable->plannedUnits == 0) {
242 242
                     $invoice_item->units = $hours;
243 243
                 } else {
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,14 +120,16 @@
 block discarded – undo
120 120
         if (!empty($this->customer)) {
121 121
             try {
122 122
                 return org_openpsa_contacts_group_dba::get_cached($this->customer);
123
-            } catch (midcom_error $e) {
123
+            }
124
+            catch (midcom_error $e) {
124 125
                 $e->log();
125 126
             }
126 127
         }
127 128
         if (!empty($this->customerContact)) {
128 129
             try {
129 130
                 return org_openpsa_contacts_person_dba::get_cached($this->customerContact);
130
-            } catch (midcom_error $e) {
131
+            }
132
+            catch (midcom_error $e) {
131 133
                 $e->log();
132 134
             }
133 135
         }
Please login to merge, or discard this patch.
lib/midcom/core/group.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,8 @@
 block discarded – undo
94 94
             }
95 95
             try {
96 96
                 $this->_storage = new midgard_group($id);
97
-            } catch (Exception $e) {
97
+            }
98
+            catch (Exception $e) {
98 99
                 debug_add('Tried to load a midcom_core_group, but got error ' . $e->getMessage(), MIDCOM_LOG_ERROR);
99 100
                 debug_print_r('Passed argument was:', $id);
100 101
                 throw new midcom_error($e->getMessage());
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
@@ -27,7 +27,8 @@
 block discarded – undo
27 27
     try {
28 28
         midcom::get()->dbfactory->get_object_by_guid($result->fromGuid);
29 29
         midcom::get()->dbfactory->get_object_by_guid($result->toGuid);
30
-    } catch (midcom_error $e) {
30
+    }
31
+    catch (midcom_error $e) {
31 32
         echo $i . "/" . $total . ": Deleting relatedto #" . $result->id . "\n";
32 33
         $result->delete();
33 34
     }
Please login to merge, or discard this patch.
lib/net/nemein/rss/cron/fetchfeeds.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@
 block discarded – undo
28 28
         foreach ($qb->execute() as $feed) {
29 29
             try {
30 30
                 midcom_db_topic::get_cached($feed->node);
31
-            } catch (midcom_error $e) {
31
+            }
32
+            catch (midcom_error $e) {
32 33
                 debug_add("Node #{$feed->node} does not exist, skipping feed #{$feed->id}", MIDCOM_LOG_ERROR);
33 34
                 continue;
34 35
             }
Please login to merge, or discard this patch.
lib/net/nehmer/blog/midcom/interfaces.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,8 @@
 block discarded – undo
32 32
             foreach ($qb->execute() as $article) {
33 33
                 try {
34 34
                     $dm->set_storage($article);
35
-                } catch (midcom_error $e) {
35
+                }
36
+                catch (midcom_error $e) {
36 37
                     $e->log(MIDCOM_LOG_WARN);
37 38
                     continue;
38 39
                 }
Please login to merge, or discard this patch.
lib/net/nehmer/static/handler/autoindex.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,8 @@
 block discarded – undo
112 112
         foreach ($qb->execute() as $article) {
113 113
             try {
114 114
                 $datamanager->set_storage($article);
115
-            } catch (midcom_error $e) {
115
+            }
116
+            catch (midcom_error $e) {
116 117
                 $e->log();
117 118
                 continue;
118 119
             }
Please login to merge, or discard this patch.
src/midcom/dba/parameters.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
         if (   !$this->can_do('midgard:update')
219 219
             || !$this->can_do('midgard:parameters')) {
220 220
             debug_add("Failed to set parameters, midgard:update or midgard:parameters on the " . get_class($this) . " {$this->guid} not granted for the current user.",
221
-                      MIDCOM_LOG_ERROR);
221
+                        MIDCOM_LOG_ERROR);
222 222
             midcom_connection::set_error(MGD_ERR_ACCESS_DENIED);
223 223
             return false;
224 224
         }
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
         if (   !$this->can_do('midgard:update')
272 272
             || !$this->can_do('midgard:parameters')) {
273 273
             debug_add("Failed to delete parameters, midgard:update or midgard:parameters on the " . get_class($this) . " {$this->guid} not granted for the current user.",
274
-                      MIDCOM_LOG_ERROR);
274
+                        MIDCOM_LOG_ERROR);
275 275
             midcom_connection::set_error(MGD_ERR_ACCESS_DENIED);
276 276
             return false;
277 277
         }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             return false;
207 207
         }
208 208
 
209
-        if (   !$this->can_do('midgard:update')
209
+        if (!$this->can_do('midgard:update')
210 210
             || !$this->can_do('midgard:parameters')) {
211 211
             debug_add("Failed to set parameters, midgard:update or midgard:parameters on the " . get_class($this) . " {$this->guid} not granted for the current user.",
212 212
                       MIDCOM_LOG_ERROR);
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
             return false;
255 255
         }
256 256
 
257
-        if (   !$this->can_do('midgard:update')
257
+        if (!$this->can_do('midgard:update')
258 258
             || !$this->can_do('midgard:parameters')) {
259 259
             debug_add("Failed to delete parameters, midgard:update or midgard:parameters on the " . get_class($this) . " {$this->guid} not granted for the current user.",
260 260
                       MIDCOM_LOG_ERROR);
Please login to merge, or discard this patch.
lib/midcom/core/account.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@
 block discarded – undo
194 194
             return false;
195 195
         }
196 196
 
197
-        if (   !empty($this->_old_username)
197
+        if (!empty($this->_old_username)
198 198
             && $this->_old_username !== $new_username) {
199 199
             if (!$history = @unserialize($this->_person->get_parameter('midcom', 'username_history'))) {
200 200
                 $history = [];
Please login to merge, or discard this patch.