Passed
Push — master ( 65f4f0...af4b87 )
by Andreas
12:07
created
lib/org/openpsa/invoices/handler/invoice/crud.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
             // We're creating invoice for chosen customer
49 49
             try {
50 50
                 $this->customer = new org_openpsa_contacts_group_dba($company);
51
-            } catch (midcom_error $e) {
51
+            }
52
+            catch (midcom_error $e) {
52 53
                 $contact = new org_openpsa_contacts_person_dba($company);
53 54
                 $this->contact_id = $contact->id;
54 55
             }
@@ -155,7 +156,8 @@  discard block
 block discarded – undo
155 156
             if (!empty($this->invoice->customer)) {
156 157
                 try {
157 158
                     $this->customer = org_openpsa_contacts_group_dba::get_cached($this->invoice->customer);
158
-                } catch (midcom_error $e) {
159
+                }
160
+                catch (midcom_error $e) {
159 161
                     $customer_field['hidden'] = true;
160 162
                     $e->log();
161 163
                 }
Please login to merge, or discard this patch.
lib/org/openpsa/products/handler/product/create.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,8 @@
 block discarded – undo
89 89
         } elseif ((int) $group > 0) {
90 90
             try {
91 91
                 $this->parent = new org_openpsa_products_product_group_dba((int) $group);
92
-            } catch (midcom_error $e) {
92
+            }
93
+            catch (midcom_error $e) {
93 94
                 $e->log();
94 95
             }
95 96
         }
Please login to merge, or discard this patch.
lib/org/openpsa/expenses/handler/hours/admin.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,8 @@
 block discarded – undo
100 100
         try {
101 101
             $task = org_openpsa_projects_task_dba::get_cached($hour_report->task);
102 102
             $options['success_url'] = $this->router->generate('list_hours_task', ['guid' => $task->guid]);
103
-        } catch (midcom_error $e) {
103
+        }
104
+        catch (midcom_error $e) {
104 105
             $e->log();
105 106
         }
106 107
         return $this->get_workflow('delete', $options)->run($request);
Please login to merge, or discard this patch.
lib/org/openpsa/products/handler/product/view.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,8 @@
 block discarded – undo
83 83
                 $productgroup = new org_openpsa_products_product_group_dba($this->_product->productGroup);
84 84
                 $replacements['<PRODUCTGROUP_TITLE>'] = $productgroup->title;
85 85
                 $replacements['<PRODUCTGROUP_CODE>'] = $productgroup->code;
86
-            } catch (midcom_error $e) {
86
+            }
87
+            catch (midcom_error $e) {
87 88
                 $replacements['<PRODUCTGROUP_TITLE>'] = '';
88 89
                 $replacements['<PRODUCTGROUP_CODE>'] = '';
89 90
             }
Please login to merge, or discard this patch.
lib/org/openpsa/user/accounthelper.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
         $password_length = mb_strlen($password);
320 320
 
321 321
         if ($password_length < $this->_config->get('min_password_length')) {
322
-            if ($show_ui_message){
322
+            if ($show_ui_message) {
323 323
                 midcom::get()->uimessages->add($this->_l10n->get('org.openpsa.user'), $this->_l10n->get('password too short'), 'error');
324 324
             }
325 325
             return false;
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
         }
338 338
 
339 339
         if ($score < $this->_config->get('min_password_score')) {
340
-            if ($show_ui_message){
340
+            if ($show_ui_message) {
341 341
                 midcom::get()->uimessages->add($this->_l10n->get('org.openpsa.user'), $this->_l10n->get('password weak'), 'error');
342 342
             }
343 343
             return false;
Please login to merge, or discard this patch.
lib/midcom/services/indexer/main.php 1 patch
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -131,7 +131,8 @@  discard block
 block discarded – undo
131 131
         try {
132 132
             $this->_backend->index($documents);
133 133
             return true;
134
-        } catch (Exception $e) {
134
+        }
135
+        catch (Exception $e) {
135 136
             if ($batch) {
136 137
                 throw $e;
137 138
             }
@@ -160,7 +161,8 @@  discard block
 block discarded – undo
160 161
         try {
161 162
             $this->_backend->delete($RIs);
162 163
             return true;
163
-        } catch (Exception $e) {
164
+        }
165
+        catch (Exception $e) {
164 166
             debug_add("Deleting error: " . $e->getMessage(), MIDCOM_LOG_ERROR);
165 167
             return false;
166 168
         }
@@ -182,7 +184,8 @@  discard block
 block discarded – undo
182 184
         try {
183 185
             $this->_backend->delete_all($constraint);
184 186
             return true;
185
-        } catch (Exception $e) {
187
+        }
188
+        catch (Exception $e) {
186 189
             debug_add("Deleting error: " . $e->getMessage(), MIDCOM_LOG_ERROR);
187 190
             return false;
188 191
         }
@@ -216,7 +219,8 @@  discard block
 block discarded – undo
216 219
 
217 220
         try {
218 221
             $result_raw = $this->_backend->query($query, $filter, $options);
219
-        } catch (Exception $e) {
222
+        }
223
+        catch (Exception $e) {
220 224
             debug_add("Query error: " . $e->getMessage(), MIDCOM_LOG_ERROR);
221 225
             return $result;
222 226
         }
@@ -237,7 +241,8 @@  discard block
 block discarded – undo
237 241
             if (!empty($document->topic_guid)) {
238 242
                 try {
239 243
                     midcom_db_topic::get_cached($document->topic_guid);
240
-                } catch (midcom_error $e) {
244
+                }
245
+                catch (midcom_error $e) {
241 246
                     // Skip document, the object is hidden.
242 247
                     debug_add("Skipping the generic document {$document->title}, its topic seems to be invisible, we cannot proceed.");
243 248
                     continue;
@@ -250,7 +255,8 @@  discard block
 block discarded – undo
250 255
                 // Strip language code from end of RI if it looks like "<GUID>_<LANG>"
251 256
                 try {
252 257
                     midcom::get()->dbfactory->get_object_by_guid(preg_replace('/^([0-9a-f]{32,80})_[a-z]{2}$/', '\\1', $document->RI));
253
-                } catch (midcom_error $e) {
258
+                }
259
+                catch (midcom_error $e) {
254 260
                     // Skip document, the object is hidden, deleted or otherwise unavailable.
255 261
                     //@todo Maybe nonexistent objects should be removed from index?
256 262
                     continue;
Please login to merge, or discard this patch.
lib/net/nehmer/comments/comment.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -409,7 +409,8 @@
 block discarded – undo
409 409
         //Get the parent object
410 410
         try {
411 411
             $parent = midcom::get()->dbfactory->get_object_by_guid($this->objectguid);
412
-        } catch (midcom_error $e) {
412
+        }
413
+        catch (midcom_error $e) {
413 414
             $e->log();
414 415
             return;
415 416
         }
Please login to merge, or discard this patch.
lib/org/openpsa/projects/task/status.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
                     org_openpsa_projects_workflow::accept($task, 0, $this->comment);
96 96
                     return;
97 97
                 }
98
-            } catch (midcom_error $e) {
98
+            }
99
+            catch (midcom_error $e) {
99 100
                 $e->log();
100 101
             }
101 102
         }
Please login to merge, or discard this patch.
lib/midcom/baseclasses/components/handler/rest.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -197,7 +197,8 @@
 block discarded – undo
197 197
             if ($this->_response === null) {
198 198
                 $this->_stop('Could not handle request, unknown method', 405);
199 199
             }
200
-        } catch (midcom_error $e) {
200
+        }
201
+        catch (midcom_error $e) {
201 202
             $this->_responseStatus = $e->getCode();
202 203
             return $this->_send_response($e->getMessage());
203 204
         }
Please login to merge, or discard this patch.