Passed
Push — master ( 60b08e...c7a1b0 )
by Andreas
38:07 queued 12:24
created
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/sales/handler/edit.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,8 @@  discard block
 block discarded – undo
68 68
                 $field['type_config']['options'] = [0 => '', $customer->id => $customer->official];
69 69
 
70 70
                 $defaults['customer'] = $customer->id;
71
-            } catch (midcom_error $e) {
71
+            }
72
+            catch (midcom_error $e) {
72 73
                 $customer = new org_openpsa_contacts_person_dba($guid);
73 74
                 $defaults['customerContact'] = $customer->id;
74 75
                 $field['type_config']['options'] = $this->list_groups(new org_openpsa_sales_salesproject_dba, [$customer->id => true]);
@@ -142,7 +143,8 @@  discard block
 block discarded – undo
142 143
             try {
143 144
                 $company = org_openpsa_contacts_group_dba::get_cached($company_id);
144 145
                 $ret[$company->id] = $company->get_label();
145
-            } catch (midcom_error $e) {
146
+            }
147
+            catch (midcom_error $e) {
146 148
                 $e->log();
147 149
             }
148 150
         }
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.
lib/midcom/core/context.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -165,7 +165,8 @@
 block discarded – undo
165 165
                 try {
166 166
                     self::$root_topic = midcom_db_topic::get_cached($guid);
167 167
                     return self::$root_topic;
168
-                } catch (midcom_error $e) {
168
+                }
169
+                catch (midcom_error $e) {
169 170
                     if ($e instanceof midcom_error_forbidden) {
170 171
                         throw $e;
171 172
                     }
Please login to merge, or discard this patch.
lib/midcom/baseclasses/core/dbobject.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -673,7 +673,8 @@
 block discarded – undo
673 673
          */
674 674
         try {
675 675
             return $object->get_by_id($object->id);
676
-        } catch (Exception $e) {
676
+        }
677
+        catch (Exception $e) {
677 678
             return false;
678 679
         }
679 680
     }
Please login to merge, or discard this patch.