Passed
Push — master ( 805652...eccbd5 )
by Andreas
26:13
created
lib/org/openpsa/relatedto/handler/relatedto.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,7 +116,8 @@  discard block
 block discarded – undo
116 116
             //TODO: check for duplicates ?
117 117
             try {
118 118
                 $result = ['other_obj' => midcom::get()->dbfactory->get_object_by_guid($link[$other . 'Guid'])];
119
-            } catch (midcom_error $e) {
119
+            }
120
+            catch (midcom_error $e) {
120 121
                 continue;
121 122
             }
122 123
             $result['link'] = [
@@ -421,7 +422,8 @@  discard block
 block discarded – undo
421 422
             if (!($this->_object instanceof org_openpsa_relatedto_dba)) {
422 423
                 $response->status = "method requires guid of a link object as an argument";
423 424
             }
424
-        } catch (midcom_error $e) {
425
+        }
426
+        catch (midcom_error $e) {
425 427
             $response->status = "error: " . $e->getMessage();
426 428
         }
427 429
 
@@ -444,7 +446,8 @@  discard block
 block discarded – undo
444 446
             $relation = new org_openpsa_relatedto_dba($guid);
445 447
             $response->result = $relation->delete();
446 448
             $response->status = 'Last message: ' . midcom_connection::get_error_string();
447
-        } catch (midcom_error $e) {
449
+        }
450
+        catch (midcom_error $e) {
448 451
             $response->result = false;
449 452
             $response->status = "Object '{$guid}' could not be loaded, error:" . $e->getMessage();
450 453
         }
Please login to merge, or discard this patch.
lib/org/openpsa/mypage/style/weekreview-day-item-task-status.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,8 @@
 block discarded – undo
33 33
                 $task_label = "<a href=\"{$data['projects_url']}task/{$task->guid}/\">{$task_label}</a>";
34 34
             }
35 35
             echo $task_label;
36
-        } catch (midcom_error $e) {}
36
+        }
37
+        catch (midcom_error $e) {}
37 38
         ?>
38 39
     </td>
39 40
     <td class="multivalue">
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 $e) {
28
+        }
29
+        catch (midcom_error $e) {
29 30
             $row['creator_index'] = '';
30 31
             $row['creator'] = '';
31 32
         }
Please login to merge, or discard this patch.
lib/midcom/helper/reflector/main.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -203,7 +203,8 @@
 block discarded – undo
203 203
         if ($object instanceof mgdobject) {
204 204
             try {
205 205
                 $obj = midcom::get()->dbfactory->convert_midgard_to_midcom($object);
206
-            } catch (midcom_error $e) {
206
+            }
207
+            catch (midcom_error $e) {
207 208
                 return null;
208 209
             }
209 210
         } else {
Please login to merge, or discard this patch.
lib/org/openpsa/calendar/event/member.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,8 @@
 block discarded – undo
143 143
                 debug_add('person #' . $person->id . 'has no email address, aborting');
144 144
                 return null;
145 145
             }
146
-        } catch (midcom_error $e) {
146
+        }
147
+        catch (midcom_error $e) {
147 148
             return null;
148 149
         }
149 150
 
Please login to merge, or discard this patch.
lib/org/openpsa/slideshow/image.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,8 @@  discard block
 block discarded – undo
48 48
 
49 49
         try {
50 50
             $folder = midcom_db_topic::get_cached($this->topic);
51
-        } catch (midcom_error $e) {
51
+        }
52
+        catch (midcom_error $e) {
52 53
             $e->log();
53 54
         }
54 55
         $folder->delete_attachment(self::FOLDER_THUMBNAIL);
@@ -58,7 +59,8 @@  discard block
 block discarded – undo
58 59
     {
59 60
         try {
60 61
             return new midcom_db_attachment($this->$type);
61
-        } catch (midcom_error $e) {
62
+        }
63
+        catch (midcom_error $e) {
62 64
             $e->log();
63 65
             return null;
64 66
         }
Please login to merge, or discard this patch.
lib/org/openpsa/relatedto/plugin.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,8 @@
 block discarded – undo
104 104
     {
105 105
         $ret = ['org_openpsa_relatedto' => []];
106 106
         foreach ($array as $rel) {
107
-            if (!midcom::get()->dbfactory->is_a($rel, org_openpsa_relatedto_dba::class)) { //Matches also 'org_openpsa_relatedto'
107
+            if (!midcom::get()->dbfactory->is_a($rel, org_openpsa_relatedto_dba::class)) {
108
+//Matches also 'org_openpsa_relatedto'
108 109
                 //Wrong type of object found in array, cruelly abort the whole procedure
109 110
                 return null;
110 111
             }
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/billing/data.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -96,7 +96,8 @@  discard block
 block discarded – undo
96 96
             // if the property useContactAddress is set
97 97
             $billing_data[0]->set_address();
98 98
             return $billing_data[0];
99
-        } catch (midcom_error $e) {
99
+        }
100
+        catch (midcom_error $e) {
100 101
             $e->log();
101 102
             return null;
102 103
         }
@@ -141,10 +142,12 @@  discard block
 block discarded – undo
141 142
     {
142 143
         try {
143 144
             return new org_openpsa_contacts_person_dba($this->linkGuid);
144
-        } catch (midcom_error $e) {
145
+        }
146
+        catch (midcom_error $e) {
145 147
             try {
146 148
                 return new org_openpsa_contacts_group_dba($this->linkGuid);
147
-            } catch (midcom_error $e) {
149
+            }
150
+            catch (midcom_error $e) {
148 151
                 debug_add("Failed to load contact with GUID: " . $this->linkGuid . " - last error:" . $e->getMessage(), MIDCOM_LOG_ERROR);
149 152
                 return false;
150 153
             }
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
@@ -102,7 +102,8 @@
 block discarded – undo
102 102
             try {
103 103
                 $mgdschemaclass = $this->__mgdschema_class_name__;
104 104
                 $this->set_object(new $mgdschemaclass($id));
105
-            } catch (mgd_exception $e) {
105
+            }
106
+            catch (mgd_exception $e) {
106 107
                 debug_add('Constructing ' . $this->__mgdschema_class_name__ . ' object ' . $id . ' failed, reason: ' . $e->getMessage(), MIDCOM_LOG_WARN);
107 108
                 throw new midcom_error_midgard($e, $id);
108 109
             }
Please login to merge, or discard this patch.