Passed
Push — master ( dc3f28...9cb9a1 )
by Andreas
16:51
created
lib/org/openpsa/projects/handler/task/view.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
             MIDCOM_TOOLBAR_ACCESSKEY => 'e',
68 68
         ]);
69 69
 
70
-        if (   $this->task->reportedHours == 0
70
+        if ($this->task->reportedHours == 0
71 71
             && $this->task->can_do('midgard:delete')) {
72 72
             $delete_workflow = $this->get_workflow('delete', ['object' => $this->task]);
73 73
             $buttons[] = $delete_workflow->get_button($this->router->generate('task_delete', ['guid' => $this->task->guid]));
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,8 @@
 block discarded – undo
109 109
                         MIDCOM_TOOLBAR_GLYPHICON => 'money',
110 110
                     ];
111 111
                 }
112
-            } catch (midcom_error) {
112
+            }
113
+            catch (midcom_error) {
113 114
             }
114 115
         }
115 116
 
Please login to merge, or discard this patch.
lib/org/openpsa/projects/handler/task/list.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@
 block discarded – undo
169 169
             case 'proposed':
170 170
                 $html = $this->render_status($task->manager, "from %s");
171 171
                 $task->get_members();
172
-                if (   $task->can_do('midgard:update')
172
+                if ($task->can_do('midgard:update')
173 173
                     && isset($task->resources[midcom_connection::get_user()])) {
174 174
                     $html .= '<form method="post" action="' . $this->router->generate('workflow', ['guid' => $task->guid]) . '">';
175 175
                     //TODO: If we need all resources to accept task hide tools when we have accepted and replace with "pending acceptance from..."
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -255,7 +255,8 @@  discard block
 block discarded – undo
255 255
             $url = $this->router->generate('project', ['guid' => $project->guid]);
256 256
             $ret['project'] = '<a href="' . $url . '">' . $project->title . '</a>';
257 257
             $ret['index_project'] = $project->title;
258
-        } catch (midcom_error $e) {
258
+        }
259
+        catch (midcom_error $e) {
259 260
             $e->log();
260 261
         }
261 262
 
@@ -267,7 +268,8 @@  discard block
 block discarded – undo
267 268
                 $customer_url = "{$contacts_url}group/{$customer->guid}/";
268 269
                 $ret['customer'] = "<a href='{$customer_url}' title='{$customer->official}'>{$customer->get_label()}</a>";
269 270
                 $ret['index_customer'] = $customer->name;
270
-            } catch (midcom_error) {
271
+            }
272
+            catch (midcom_error) {
271 273
                 $ret['customer'] = '';
272 274
                 $ret['index_customer'] = '';
273 275
             }
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/handler/scheduled.php 1 patch
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,8 @@  discard block
 block discarded – undo
61 61
         try {
62 62
             $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($at_entry->arguments['deliverable']);
63 63
             $salesproject = org_openpsa_sales_salesproject_dba::get_cached($deliverable->salesproject);
64
-        } catch (midcom_error $e) {
64
+        }
65
+        catch (midcom_error $e) {
65 66
             $e->log();
66 67
             return $invoice;
67 68
         }
@@ -103,7 +104,8 @@  discard block
 block discarded – undo
103 104
                     $invoice[$fieldname] = '<a href="' . $sales_url . 'list/customer/' . $object->guid . '/">' . $invoice[$fieldname] . '</a>';
104 105
                 }
105 106
                 $invoice['index_' . $fieldname] = $object->get_label();
106
-            } catch (midcom_error $e) {
107
+            }
108
+            catch (midcom_error $e) {
107 109
                 $e->log();
108 110
             }
109 111
         }
Please login to merge, or discard this patch.
lib/midcom/core/privilege.php 3 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,6 @@
 block discarded – undo
37 37
                 - 1: MIDCOM_PRIVILEGE_ALLOW
38 38
                 - 2: MIDCOM_PRIVILEGE_DENY
39 39
                 - 3: MIDCOM_PRIVILEGE_INHERIT
40
-
41 40
  * @property string $guid
42 41
  * @package midcom
43 42
  */
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,8 @@
 block discarded – undo
112 112
         if ($this->__cached_object === null) {
113 113
             try {
114 114
                 $this->__cached_object = midcom::get()->dbfactory->get_object_by_guid($this->objectguid);
115
-            } catch (midcom_error) {
115
+            }
116
+            catch (midcom_error) {
116 117
                 return null;
117 118
             }
118 119
         }
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      * The Default constructor creates an empty privilege, if you specify
76 76
      * another privilege object in the constructor, a copy is constructed.
77 77
      */
78
-    public function __construct(midcom_core_privilege_db|array|string $src = null)
78
+    public function __construct(midcom_core_privilege_db | array | string $src = null)
79 79
     {
80 80
         if (is_array($src)) {
81 81
             // Store given values to our privilege array
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
      * - Any midcom_core_user or midcom_core_group object or subtype thereof.
211 211
      * - Any string identifier which can be resolved using midcom_services_auth::get_assignee().
212 212
      */
213
-    public function set_assignee(midcom_core_group|midcom_core_user|string $assignee) : bool
213
+    public function set_assignee(midcom_core_group | midcom_core_user | string $assignee) : bool
214 214
     {
215 215
         if (is_string($assignee)) {
216 216
             if ($this->is_magic_assignee($assignee)) {
@@ -266,12 +266,12 @@  discard block
 block discarded – undo
266 266
             }
267 267
         }
268 268
 
269
-        if (   !$this->is_magic_assignee()
269
+        if (!$this->is_magic_assignee()
270 270
             && !$this->get_assignee()) {
271 271
             debug_add("The assignee identifier '{$this->assignee}' is invalid.", MIDCOM_LOG_INFO);
272 272
             return false;
273 273
         }
274
-        if (   $this->assignee == 'OWNER'
274
+        if ($this->assignee == 'OWNER'
275 275
             && $this->privilegename == 'midgard:owner') {
276 276
             debug_add("Tried to assign midgard:owner to the OWNER magic assignee, this is invalid.", MIDCOM_LOG_INFO);
277 277
             return false;
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
                 MIDCOM_LOG_INFO);
284 284
             return false;
285 285
         }
286
-        if (   !$object->can_do('midgard:update')
286
+        if (!$object->can_do('midgard:update')
287 287
             || !$object->can_do('midgard:privileges')) {
288 288
             debug_add("Insufficient privileges on the content object with the GUID '{$this->__guid}', midgard:update and midgard:privileges required.",
289 289
                 MIDCOM_LOG_INFO);
@@ -444,7 +444,7 @@  discard block
 block discarded – undo
444 444
         return new midcom_core_privilege($result[0]);
445 445
     }
446 446
 
447
-    private function _load(midcom_core_privilege_db|string $src = null)
447
+    private function _load(midcom_core_privilege_db | string $src = null)
448 448
     {
449 449
         if ($src instanceof midcom_core_privilege_db) {
450 450
             // Got a privilege object as argument, use that
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/subscriber/purifySubscriber.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,8 @@
 block discarded – undo
72 72
         $data = $event->getData();
73 73
         try {
74 74
             $data = $purifier->purify($data);
75
-        } catch (\Exception $e) {
75
+        }
76
+        catch (\Exception $e) {
76 77
             debug_add("HTML Purifier failed: " . $e->getMessage(), MIDCOM_LOG_WARN);
77 78
         }
78 79
         $event->setData($data);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
     public function purify_content(FormEvent $event)
36 36
     {
37
-        if (   isset($this->config['Cache']['SerializerPath'])
37
+        if (isset($this->config['Cache']['SerializerPath'])
38 38
             && !file_exists($this->config['Cache']['SerializerPath'])) {
39 39
             mkdir($this->config['Cache']['SerializerPath']);
40 40
         }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
         // Load custom element/attribute definitions
50 50
         $definitions = $this->get_from_global_config('html_purify_HTMLDefinition');
51
-        if (   !empty($definitions)
51
+        if (!empty($definitions)
52 52
             && $def = $purifier_config->maybeGetRawHTMLDefinition()) {
53 53
             if (!empty($definitions['addAttribute'])) {
54 54
                 foreach (array_filter((array) $definitions['addAttribute'], is_array(...)) as $attrdef) {
Please login to merge, or discard this patch.
lib/net/nemein/wiki/wikipage.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -193,7 +193,8 @@
 block discarded – undo
193 193
 
194 194
         try {
195 195
             $diff_fields = $rcs_handler->get_diff($prev_version, $this_version);
196
-        } catch (midcom_error $e) {
196
+        }
197
+        catch (midcom_error $e) {
197 198
             $e->log();
198 199
             return '';
199 200
         }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
     public function _on_creating() : bool
30 30
     {
31
-        if (   $this->title == ''
31
+        if ($this->title == ''
32 32
             || !$this->topic) {
33 33
             // We must have wikiword and topic at this stage
34 34
             return false;
Please login to merge, or discard this patch.
lib/org/openpsa/reports/style/projects_report-basic-header.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
                         <th><?php echo $data['l10n']->get('type'); ?></th>
24 24
 <?php
25 25
         }   ?>
26
-<?php   if (   array_key_exists('invoiceable_filter', $query_data)) {
26
+<?php   if (array_key_exists('invoiceable_filter', $query_data)) {
27 27
             ?>
28 28
                         <th><?php echo midcom::get()->i18n->get_string('invoiceable', 'org.openpsa.projects'); ?></th>
29 29
 <?php
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/transformer/attachmentTransformer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
             return null;
31 31
         }
32 32
 
33
-        if (! $input instanceof midcom_db_attachment) {
33
+        if (!$input instanceof midcom_db_attachment) {
34 34
             throw new UnexpectedTypeException($input, midcom_db_attachment::class);
35 35
         }
36 36
 
Please login to merge, or discard this patch.
src/midcom/datamanager/schema.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
             'customdata' => []
161 161
         ], $config));
162 162
 
163
-        $normalize_widget = function (Options $options, $value) {
163
+        $normalize_widget = function(Options $options, $value) {
164 164
             if ($value == 'text') {
165 165
                 if (!empty($options['widget_config']['hideinput'])) {
166 166
                     return PasswordType::class;
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
             return $value;
186 186
         };
187 187
 
188
-        $normalize_storage = function (Options $options, $value) use ($name) {
188
+        $normalize_storage = function(Options $options, $value) use ($name) {
189 189
             $default = [
190 190
                 'location' => 'parameter',
191 191
                 'domain' => 'midcom.helper.datamanager2',
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             return $value;
228 228
         };
229 229
 
230
-        $normalize_validation = function (Options $options, $value) {
230
+        $normalize_validation = function(Options $options, $value) {
231 231
             $validation = [];
232 232
 
233 233
             foreach ((array) $value as $key => $rule) {
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
                     $rule = ['type' => $rule];
240 240
                 } elseif (!array_key_exists('type', $rule)) {
241 241
                     throw new midcom_error("Missing validation rule type for rule {$key} on field {$options['name']}, this is a required option.");
242
-                } elseif (   $rule['type'] == 'compare'
242
+                } elseif ($rule['type'] == 'compare'
243 243
                           && !array_key_exists('compare_with', $rule)) {
244 244
                     throw new midcom_error("Missing compare_with option for compare type rule {$key} on field {$options['name']}, this is a required option.");
245 245
                 }
Please login to merge, or discard this patch.