Passed
Push — master ( cf00ea...cda971 )
by Andreas
09:47
created
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.
lib/org/openpsa/relatedto/style/show_entries_html.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
             $row['creator_index'] = $creator->rname;
26 26
             $creator_card = org_openpsa_widgets_contact::get($entry->metadata->creator);
27 27
             $row['creator'] = $creator_card->show_inline();
28
-        } catch (midcom_error) {
28
+        }
29
+        catch (midcom_error) {
29 30
             $row['creator_index'] = '';
30 31
             $row['creator'] = '';
31 32
         }
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.
lib/org/openpsa/relatedto/handler/relatedto.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -107,7 +107,8 @@  discard block
 block discarded – undo
107 107
             //TODO: check for duplicates ?
108 108
             try {
109 109
                 $result = ['other_obj' => midcom::get()->dbfactory->get_object_by_guid($link[$other . 'Guid'])];
110
-            } catch (midcom_error) {
110
+            }
111
+            catch (midcom_error) {
111 112
                 continue;
112 113
             }
113 114
             $result['link'] = [
@@ -378,7 +379,8 @@  discard block
 block discarded – undo
378 379
             if (!($this->_object instanceof org_openpsa_relatedto_dba)) {
379 380
                 $response['status'] = "method requires guid of a link object as an argument";
380 381
             }
381
-        } catch (midcom_error $e) {
382
+        }
383
+        catch (midcom_error $e) {
382 384
             $response['status'] = "error: " . $e->getMessage();
383 385
         }
384 386
 
@@ -399,7 +401,8 @@  discard block
 block discarded – undo
399 401
             $relation = new org_openpsa_relatedto_dba($guid);
400 402
             $result = $relation->delete();
401 403
             $status = 'Last message: ' . midcom_connection::get_error_string();
402
-        } catch (midcom_error $e) {
404
+        }
405
+        catch (midcom_error $e) {
403 406
             $result = false;
404 407
             $status = "Object '{$guid}' could not be loaded, error:" . $e->getMessage();
405 408
         }
Please login to merge, or discard this patch.
lib/org/openpsa/user/midcom/interfaces.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,8 @@  discard block
 block discarded – undo
23 23
         midcom::get()->auth->request_sudo($this->_component);
24 24
         try {
25 25
             $person = new midcom_db_person($args['guid']);
26
-        } catch (midcom_error) {
26
+        }
27
+        catch (midcom_error) {
27 28
             $handler->print_error('Person with guid #' . $args['guid'] . ' does not exist');
28 29
             midcom::get()->auth->drop_sudo();
29 30
             return false;
@@ -31,7 +32,8 @@  discard block
 block discarded – undo
31 32
         $accounthelper = new org_openpsa_user_accounthelper($person);
32 33
         try {
33 34
             $accounthelper->reopen_account();
34
-        } catch (midcom_error $e) {
35
+        }
36
+        catch (midcom_error $e) {
35 37
             $handler->print_error($e->getMessage());
36 38
             midcom::get()->auth->drop_sudo();
37 39
             return false;
Please login to merge, or discard this patch.