Passed
Push — master ( 936202...c84ff9 )
by Andreas
09:27
created
lib/midgard/admin/user/handler/list.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -185,7 +185,8 @@
 block discarded – undo
185 185
 
186 186
         try {
187 187
             $account = new midcom_core_account($person);
188
-        } catch (midcom_error) {
188
+        }
189
+        catch (midcom_error) {
189 190
             midcom::get()->uimessages->add($this->_l10n->get('midgard.admin.user'), sprintf($this->_l10n->get('failed to get the user with id %s'), $person->id), 'error');
190 191
             return;
191 192
         }
Please login to merge, or discard this patch.
lib/midcom/db/member.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,8 @@  discard block
 block discarded – undo
26 26
         try {
27 27
             $person = new midcom_db_person($this->uid);
28 28
             $grp = new midcom_db_group($this->gid);
29
-        } catch (midcom_error $e) {
29
+        }
30
+        catch (midcom_error $e) {
30 31
             $e->log();
31 32
             return 'Invalid membership record';
32 33
         }
@@ -43,7 +44,8 @@  discard block
 block discarded – undo
43 44
         }
44 45
         try {
45 46
             $person = new midcom_db_person($this->uid);
46
-        } catch (midcom_error) {
47
+        }
48
+        catch (midcom_error) {
47 49
             return;
48 50
         }
49 51
         midcom::get()->cache->invalidate($person->guid);
Please login to merge, or discard this patch.
lib/midcom/db/style.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,8 @@
 block discarded – undo
43 43
                     break;
44 44
                 }
45 45
             }
46
-        } catch (midcom_error) {
46
+        }
47
+        catch (midcom_error) {
47 48
         }
48 49
 
49 50
         $path_parts = array_reverse($path_parts);
Please login to merge, or discard this patch.
lib/midcom/admin/folder/handler/order.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,8 @@
 block discarded – undo
68 68
         // Use the DB Factory to resolve the class and to get the object
69 69
         try {
70 70
             $object = midcom::get()->dbfactory->get_object_by_guid($identifier);
71
-        } catch (midcom_error) {
71
+        }
72
+        catch (midcom_error) {
72 73
             // This is probably a pseudo leaf, store the score to the current node
73 74
             $this->_topic->set_parameter('midcom.helper.nav.score', $identifier, $score);
74 75
             return true;
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
@@ -423,7 +423,8 @@
 block discarded – undo
423 423
          */
424 424
         try {
425 425
             return $object->get_by_id($object->id);
426
-        } catch (Exception) {
426
+        }
427
+        catch (Exception) {
427 428
             return false;
428 429
         }
429 430
     }
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
@@ -93,7 +93,8 @@  discard block
 block discarded – undo
93 93
         try {
94 94
             $this->_backend->index($documents);
95 95
             return true;
96
-        } catch (Exception $e) {
96
+        }
97
+        catch (Exception $e) {
97 98
             if ($batch) {
98 99
                 throw $e;
99 100
             }
@@ -122,7 +123,8 @@  discard block
 block discarded – undo
122 123
         try {
123 124
             $this->_backend->delete($RIs);
124 125
             return true;
125
-        } catch (Exception $e) {
126
+        }
127
+        catch (Exception $e) {
126 128
             debug_add("Deleting error: " . $e->getMessage(), MIDCOM_LOG_ERROR);
127 129
             return false;
128 130
         }
@@ -142,7 +144,8 @@  discard block
 block discarded – undo
142 144
         try {
143 145
             $this->_backend->delete_all($constraint);
144 146
             return true;
145
-        } catch (Exception $e) {
147
+        }
148
+        catch (Exception $e) {
146 149
             debug_add("Deleting error: " . $e->getMessage(), MIDCOM_LOG_ERROR);
147 150
             return false;
148 151
         }
@@ -175,7 +178,8 @@  discard block
 block discarded – undo
175 178
 
176 179
         try {
177 180
             $result_raw = $this->_backend->query($query, $filter, $options);
178
-        } catch (Exception $e) {
181
+        }
182
+        catch (Exception $e) {
179 183
             debug_add("Query error: " . $e->getMessage(), MIDCOM_LOG_ERROR);
180 184
             return $result;
181 185
         }
@@ -196,7 +200,8 @@  discard block
 block discarded – undo
196 200
             if (!empty($document->topic_guid)) {
197 201
                 try {
198 202
                     midcom_db_topic::get_cached($document->topic_guid);
199
-                } catch (midcom_error) {
203
+                }
204
+                catch (midcom_error) {
200 205
                     // Skip document, the object is hidden.
201 206
                     debug_add("Skipping the generic document {$document->title}, its topic seems to be invisible, we cannot proceed.");
202 207
                     continue;
@@ -209,7 +214,8 @@  discard block
 block discarded – undo
209 214
                 // Strip language code from end of RI if it looks like "<GUID>_<LANG>"
210 215
                 try {
211 216
                     midcom::get()->dbfactory->get_object_by_guid(preg_replace('/^([0-9a-f]{32,80})_[a-z]{2}$/', '\\1', $document->RI));
212
-                } catch (midcom_error) {
217
+                }
218
+                catch (midcom_error) {
213 219
                     // Skip document, the object is hidden, deleted or otherwise unavailable.
214 220
                     //@todo Maybe nonexistent objects should be removed from index?
215 221
                     continue;
Please login to merge, or discard this patch.
lib/midcom/services/indexer/document.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -510,7 +510,8 @@
 block discarded – undo
510 510
     {
511 511
         try {
512 512
             return midcom_db_person::get_cached($guid);
513
-        } catch (midcom_error) {
513
+        }
514
+        catch (midcom_error) {
514 515
             return null;
515 516
         }
516 517
     }
Please login to merge, or discard this patch.
lib/midcom/services/auth/backend.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,8 @@
 block discarded – undo
77 77
         if (!array_key_exists($id, $this->_user_cache)) {
78 78
             try {
79 79
                 $this->_user_cache[$id] = new midcom_core_user($param);
80
-            } catch (midcom_error) {
80
+            }
81
+            catch (midcom_error) {
81 82
                 // Keep it silent while missing user object can mess here
82 83
                 $this->_user_cache[$id] = null;
83 84
             }
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
@@ -84,7 +84,8 @@
 block discarded – undo
84 84
 
85 85
         try {
86 86
             $user = new midgard_user($login_tokens);
87
-        } catch (mgd_exception) {
87
+        }
88
+        catch (mgd_exception) {
88 89
             return null;
89 90
         }
90 91
         if (!$trusted && !self::verify_password($password, $user->password)) {
Please login to merge, or discard this patch.