Test Failed
Branch master (8d1702)
by Andreas
11:03
created
lib/org/openpsa/expenses/handler/index.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
             }
126 126
 
127 127
             $date_identifier = date('Y-m-d', $row['date']);
128
-            $row_identifier = $task->id . '-' .  $row['person'];
128
+            $row_identifier = $task->id . '-' . $row['person'];
129 129
 
130 130
             if (!isset($reports[$row_identifier])) {
131 131
                 try {
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,8 @@  discard block
 block discarded – undo
32 32
         }
33 33
         try {
34 34
             $date = new DateTime($requested_time);
35
-        } catch (Exception $e) {
35
+        }
36
+        catch (Exception $e) {
36 37
             return false;
37 38
         }
38 39
         $offset = $date->format('N') - 1;
@@ -119,7 +120,8 @@  discard block
 block discarded – undo
119 120
         foreach ($hours as $guid => $row) {
120 121
             try {
121 122
                 $task = org_openpsa_projects_task_dba::get_cached($row['task']);
122
-            } catch (midcom_error $e) {
123
+            }
124
+            catch (midcom_error $e) {
123 125
                 // Task couldn't be loaded, probably because of ACL
124 126
                 continue;
125 127
             }
@@ -132,7 +134,8 @@  discard block
 block discarded – undo
132 134
                     $person_object = org_openpsa_contacts_person_dba::get_cached($row['person']);
133 135
                     $person_label = $this->_get_list_link($person_object->name, null, null, $row['person']);
134 136
                     $person_name = $person_object->name;
135
-                } catch (midcom_error $e) {
137
+                }
138
+                catch (midcom_error $e) {
136 139
                     $person_label = $this->_l10n->get('no person');
137 140
                     $person_name = '';
138 141
                 }
Please login to merge, or discard this patch.
lib/org/openpsa/mail/backend/bouncer.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,8 @@
 block discarded – undo
23 23
         foreach ($this->_try_backends as $backend) {
24 24
             try {
25 25
                 $this->_backend = org_openpsa_mail_backend::get($backend, $params);
26
-            } catch (midcom_error $e) {
26
+            }
27
+            catch (midcom_error $e) {
27 28
                 debug_add('Failed to load backend ' . $backend . ', message:' . $e->getMessage());
28 29
             }
29 30
         }
Please login to merge, or discard this patch.
lib/org/openpsa/mail/backend.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,8 @@  discard block
 block discarded – undo
42 42
                     $object = self::_load_backend($backend, $params);
43 43
                     debug_add('Using backend ' . $backend);
44 44
                     return $object;
45
-                } catch (midcom_error $e) {
45
+                }
46
+                catch (midcom_error $e) {
46 47
                     debug_add('Failed to load backend ' . $backend . ', message:' . $e->getMessage());
47 48
                 }
48 49
             }
@@ -67,7 +68,8 @@  discard block
 block discarded – undo
67 68
             $ret = $this->mail($message);
68 69
             $this->error = false;
69 70
             return $ret;
70
-        } catch (Exception $e) {
71
+        }
72
+        catch (Exception $e) {
71 73
             $this->error = $e->getMessage();
72 74
             return false;
73 75
         }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
             return false;
80 80
         }
81 81
 
82
-        if (   is_string($this->error)
82
+        if (is_string($this->error)
83 83
             && !empty($this->error)) {
84 84
             return $this->error;
85 85
         }
Please login to merge, or discard this patch.
lib/org/openpsa/mail/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
         $this->html_body = preg_replace("/\n\r|\r\n|\r/", "\n", $this->html_body);
192 192
 
193 193
         //Try to translate HTML-only body to plaintext as well
194
-        if (   strlen($this->body) == 0
194
+        if (strlen($this->body) == 0
195 195
             && strlen($this->html_body) > 0
196 196
             && !$this->allow_only_html) {
197 197
             $this->body = $this->html2text($this->html_body);
Please login to merge, or discard this patch.
lib/org/openpsa/mail/message.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
             if (is_string($value)) {
103 103
                 $this->_headers[$header] = trim($value);
104 104
             }
105
-            if (   strtolower($header) == 'from'
105
+            if (strtolower($header) == 'from'
106 106
                 || strtolower($header) == 'reply-to'
107 107
                 || strtolower($header) == 'to') {
108 108
                 $this->_headers[$header] = $this->_encode_address_field($value);
Please login to merge, or discard this patch.
lib/org/openpsa/slideshow/handler/edit.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -252,9 +252,9 @@
 block discarded – undo
252 252
                 break;
253 253
             case 'delete':
254 254
                  if (empty($_POST['guids'])) {
255
-                     throw new midcom_error('Invalid request');
256
-                 }
257
-                 break;
255
+                        throw new midcom_error('Invalid request');
256
+                    }
257
+                    break;
258 258
             default:
259 259
                 throw new midcom_error('Invalid request');
260 260
         }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $images = $qb->execute();
64 64
         $failed = 0;
65 65
         foreach ($images as $image) {
66
-            if (   !$image->generate_image('thumbnail', $this->_config->get('thumbnail_filter'))
66
+            if (!$image->generate_image('thumbnail', $this->_config->get('thumbnail_filter'))
67 67
                 || !$image->generate_image('image', $this->_config->get('image_filter'))) {
68 68
                 $failed++;
69 69
             }
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
                 }
245 245
                 //Fall-through
246 246
             case 'create':
247
-                if (   !isset($_POST['title'])
247
+                if (!isset($_POST['title'])
248 248
                     || !isset($_POST['description'])
249 249
                     || !isset($_POST['position'])) {
250 250
                     throw new midcom_error('Invalid request');
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
         $attachment->title = $_POST['title'];
268 268
         $attachment->mimetype = $file['type'];
269 269
         $attachment->parentguid = $image->guid;
270
-        if (   !$attachment->create()
270
+        if (!$attachment->create()
271 271
             || !$attachment->copy_from_file($file['tmp_name'])) {
272 272
             throw new midcom_error('Failed to create attachment: ' . midcom_connection::get_error_string());
273 273
         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,8 @@
 block discarded – undo
148 148
         try {
149 149
             $this->$function();
150 150
             $this->_response->success = true;
151
-        } catch (midcom_error $e) {
151
+        }
152
+        catch (midcom_error $e) {
152 153
             $this->_response->success = false;
153 154
             $this->_response->error = $e->getMessage();
154 155
         }
Please login to merge, or discard this patch.
lib/org/openpsa/slideshow/image.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
         $rows = $mc->get_rows(array('id', 'name', 'guid'), 'id');
151 151
 
152 152
         foreach ($images as $image) {
153
-            if (   !isset($rows[$image->attachment])
153
+            if (!isset($rows[$image->attachment])
154 154
                 || !isset($rows[$image->image])
155 155
                 || !isset($rows[$image->thumbnail])) {
156 156
                 continue;
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -41,7 +41,8 @@  discard block
 block discarded – undo
41 41
 
42 42
         try {
43 43
             $folder = midcom_db_topic::get_cached($this->topic);
44
-        } catch (midcom_error $e) {
44
+        }
45
+        catch (midcom_error $e) {
45 46
             $e->log();
46 47
         }
47 48
         $folder->delete_attachment(self::FOLDER_THUMBNAIL);
@@ -51,7 +52,8 @@  discard block
 block discarded – undo
51 52
     {
52 53
         try {
53 54
             return new midcom_db_attachment($this->$type);
54
-        } catch (midcom_error $e) {
55
+        }
56
+        catch (midcom_error $e) {
55 57
             $e->log();
56 58
             return false;
57 59
         }
Please login to merge, or discard this patch.
lib/org/openpsa/core/acl/synchronizer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 {
16 16
     public function write_acls(midcom_core_dbaobject $object, $owner_id, $accesstype)
17 17
     {
18
-        if (   empty($owner_id)
18
+        if (empty($owner_id)
19 19
             || empty($accesstype)) {
20 20
             return false;
21 21
         }
@@ -63,14 +63,14 @@  discard block
 block discarded – undo
63 63
 
64 64
         if ($privileges) {
65 65
             foreach ($privileges as $privilege) {
66
-                if (   !empty($needed_privileges[$privilege->privilegename])
66
+                if (!empty($needed_privileges[$privilege->privilegename])
67 67
                     && $needed_privileges[$privilege->privilegename]['assignee'] == $privilege->assignee
68 68
                     && $needed_privileges[$privilege->privilegename]['value'] == $privilege->value) {
69 69
                     unset($needed_privileges[$privilege->privilegename]);
70 70
                     continue;
71 71
                 }
72 72
                 // Clear old ACLs applying to others than current user or selected owner group
73
-                if (   $privilege->assignee != midcom::get()->auth->user->id
73
+                if ($privilege->assignee != midcom::get()->auth->user->id
74 74
                     && $privilege->assignee != $owner_id) {
75 75
                     if (is_array($privilege->assignee)) {
76 76
                         $assignee_key = $privilege->assignee['identifier'];
Please login to merge, or discard this patch.
lib/org/openpsa/core/filter/select.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
             echo '<select class="filter_input" onchange="document.forms[\'' . $this->name . '_filter\'].submit();" name="' . $this->name . '">';
78 78
 
79 79
             foreach ($options as $option) {
80
-                echo '<option value="' .  $option['id'] . '"';
80
+                echo '<option value="' . $option['id'] . '"';
81 81
                 if ($option['selected'] == true) {
82 82
                     echo " selected=\"selected\"";
83 83
                 }
Please login to merge, or discard this patch.