Passed
Pull Request — master (#204)
by
unknown
23:41
created
lib/midgard/admin/asgard/style/midgard_admin_asgard_shell_runner.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,8 @@
 block discarded – undo
61 61
     try {
62 62
         ?>&(data['code']:p);<?php
63 63
 
64
-    } catch (Exception $e) {
64
+    }
65
+    catch (Exception $e) {
65 66
         echo '<div class="shell-error">' . $e->getMessage() . '</div>';
66 67
         echo htmlentities($e->getTraceAsString());
67 68
     }
Please login to merge, or discard this patch.
lib/midcom/helper/search/style/result_item.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,8 @@
 block discarded – undo
4 4
 
5 5
 try {
6 6
     $topic = midcom_db_topic::get_cached($document->topic_guid);
7
-} catch (midcom_error $e) {
7
+}
8
+catch (midcom_error $e) {
8 9
     $e->log();
9 10
 }
10 11
 ?>
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
@@ -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 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -128,7 +128,8 @@  discard block
 block discarded – undo
128 128
             try {
129 129
                 $task = new org_openpsa_projects_task_dba($id);
130 130
                 $task->update_cache();
131
-            } catch (midcom_error $e) {
131
+            }
132
+            catch (midcom_error $e) {
132 133
             }
133 134
         }
134 135
 
@@ -293,14 +294,16 @@  discard block
 block discarded – undo
293 294
         if (!empty($this->customer)) {
294 295
             try {
295 296
                 return org_openpsa_contacts_group_dba::get_cached($this->customer);
296
-            } catch (midcom_error $e) {
297
+            }
298
+            catch (midcom_error $e) {
297 299
                 $e->log();
298 300
             }
299 301
         }
300 302
         if (!empty($this->customerContact)) {
301 303
             try {
302 304
                 return org_openpsa_contacts_person_dba::get_cached($this->customerContact);
303
-            } catch (midcom_error $e) {
305
+            }
306
+            catch (midcom_error $e) {
304 307
                 $e->log();
305 308
             }
306 309
         }
Please login to merge, or discard this patch.
lib/midcom/connection.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
 
133 133
         try {
134 134
             $user = new midgard_user($login_tokens);
135
-        } catch (mgd_exception $e) {
135
+        }
136
+        catch (mgd_exception $e) {
136 137
             return false;
137 138
         }
138 139
         if (!$trusted && !self::verify_password($password, $user->password)) {
Please login to merge, or discard this patch.
lib/midcom/core/user.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -182,7 +182,8 @@  discard block
 block discarded – undo
182 182
             }
183 183
             try {
184 184
                 $this->_storage = new $person_class($id);
185
-            } catch (mgd_exception $e) {
185
+            }
186
+            catch (mgd_exception $e) {
186 187
                 debug_add("Failed to retrieve the person ID {$id}: " . $e->getMessage(), MIDCOM_LOG_INFO);
187 188
                 throw new midcom_error_midgard($e, $id);
188 189
             }
@@ -230,7 +231,8 @@  discard block
 block discarded – undo
230 231
         if (mgd_is_guid($id)) {
231 232
             try {
232 233
                 return new $person_class($id);
233
-            } catch (mgd_exception $e) {
234
+            }
235
+            catch (mgd_exception $e) {
234 236
                 debug_add("Failed to retrieve the person GUID {$id}: " . $e->getMessage(), MIDCOM_LOG_INFO);
235 237
                 throw new midcom_error_midgard($e, $id);
236 238
             }
Please login to merge, or discard this patch.
lib/midcom/core/dbaobject.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,8 @@
 block discarded – undo
93 93
             try {
94 94
                 $mgdschemaclass = $this->__mgdschema_class_name__;
95 95
                 $this->__object = new $mgdschemaclass($id);
96
-            } catch (mgd_exception $e) {
96
+            }
97
+            catch (mgd_exception $e) {
97 98
                 debug_add('Constructing ' . $this->__mgdschema_class_name__ . ' object ' . $id . ' failed, reason: ' . $e->getMessage(), MIDCOM_LOG_WARN);
98 99
                 throw new midcom_error_midgard($e, $id);
99 100
             }
Please login to merge, or discard this patch.
lib/midcom/helper/_dbfactory.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,8 @@  discard block
 block discarded – undo
44 44
     {
45 45
         try {
46 46
             $tmp = midgard_object_class::get_object_by_guid($guid);
47
-        } catch (mgd_exception $e) {
47
+        }
48
+        catch (mgd_exception $e) {
48 49
             debug_add('Loading object by GUID ' . $guid . ' failed, reason: ' . $e->getMessage(), MIDCOM_LOG_INFO);
49 50
 
50 51
             throw new midcom_error_midgard($e, $guid);
@@ -237,7 +238,8 @@  discard block
 block discarded – undo
237 238
                 $parent_data = [
238 239
                     $parent->__midcom_class_name__ => $parent_guid
239 240
                 ];
240
-            } catch (midcom_error $e) {
241
+            }
242
+            catch (midcom_error $e) {
241 243
                 $parent_data = [
242 244
                     '' => null
243 245
                 ];
@@ -251,7 +253,8 @@  discard block
 block discarded – undo
251 253
 
252 254
         try {
253 255
             return $this->get_cached($classname, $parent_guid);
254
-        } catch (midcom_error $e) {
256
+        }
257
+        catch (midcom_error $e) {
255 258
             return null;
256 259
         }
257 260
     }
@@ -310,7 +313,8 @@  discard block
 block discarded – undo
310 313
                 if ($the_object === null) {
311 314
                     try {
312 315
                         $the_object = $this->get_object_by_guid($object_guid);
313
-                    } catch (midcom_error $e) {
316
+                    }
317
+                    catch (midcom_error $e) {
314 318
                         return ['' => null];
315 319
                     }
316 320
                 }
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.