Passed
Pull Request — master (#204)
by
unknown
23:41
created
lib/net/nehmer/static/style/autoindex-start.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -3,10 +3,10 @@
 block discarded – undo
3 3
 <table cellpadding='3'>
4 4
   <thead>
5 5
     <tr>
6
-      <td><?php $data['l10n']->show('filename');?></td>
7
-      <td><?php $data['l10n']->show('filedescription');?></td>
8
-      <td><?php $data['l10n']->show('filetype');?></td>
9
-      <td><?php $data['l10n']->show('filesize');?></td>
10
-      <td><?php $data['l10n']->show('file lastmodified');?></td>
6
+      <td><?php $data['l10n']->show('filename'); ?></td>
7
+      <td><?php $data['l10n']->show('filedescription'); ?></td>
8
+      <td><?php $data['l10n']->show('filetype'); ?></td>
9
+      <td><?php $data['l10n']->show('filesize'); ?></td>
10
+      <td><?php $data['l10n']->show('file lastmodified'); ?></td>
11 11
     </tr>
12 12
   </thead>
Please login to merge, or discard this patch.
lib/midcom/style/midcom_services_auth_access_denied.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 $title = $this->data['midcom_services_auth_access_denied_title'];
4 4
 $login_warning = $this->data['midcom_services_auth_access_denied_login_warning'];
5 5
 
6
-midcom::get()->head->add_stylesheet(MIDCOM_STATIC_URL.'/midcom.services.auth/style.css');
6
+midcom::get()->head->add_stylesheet(MIDCOM_STATIC_URL . '/midcom.services.auth/style.css');
7 7
 ?>
8 8
 <!DOCTYPE html>
9 9
 <html lang="<?php echo midcom::get()->i18n->get_current_language(); ?>">
Please login to merge, or discard this patch.
lib/midcom/style/midcom_services_auth_login_page.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 $title = $this->data['midcom_services_auth_show_login_page_title'];
3 3
 $login_warning = $this->data['midcom_services_auth_show_login_page_login_warning'];
4 4
 
5
-midcom::get()->head->add_stylesheet(MIDCOM_STATIC_URL.'/midcom.services.auth/style.css');
5
+midcom::get()->head->add_stylesheet(MIDCOM_STATIC_URL . '/midcom.services.auth/style.css');
6 6
 ?>
7 7
 <!DOCTYPE html>
8 8
 <html lang="<?php echo midcom::get()->i18n->get_current_language(); ?>">
Please login to merge, or discard this patch.
lib/midcom/services/i18n/l10n.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -474,7 +474,7 @@
 block discarded – undo
474 474
     {
475 475
         return
476 476
         (
477
-               $this->string_exists($string, $this->_language)
477
+                $this->string_exists($string, $this->_language)
478 478
             || $this->string_exists($string, $this->_fallback_language)
479 479
         );
480 480
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             self::$_localedb[$this->_library] = [];
135 135
         }
136 136
 
137
-        $this->_stringdb =& self::$_localedb[$this->_library];
137
+        $this->_stringdb = & self::$_localedb[$this->_library];
138 138
 
139 139
         $this->set_language(midcom::get()->i18n->get_current_language());
140 140
     }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $data = $this->parse_data(file($filename), $lang, $filename);
170 170
 
171 171
         // get site-specific l10n
172
-        $component_locale = midcom_helper_misc::get_snippet_content_graceful("conf:/" . $this->_component_name . '/l10n/'. $this->database . '.' . $lang . '.txt');
172
+        $component_locale = midcom_helper_misc::get_snippet_content_graceful("conf:/" . $this->_component_name . '/l10n/' . $this->database . '.' . $lang . '.txt');
173 173
         if (!empty($component_locale)) {
174 174
             $data = array_merge($data, $this->parse_data(explode("\n", $component_locale), $lang, $component_locale));
175 175
         }
@@ -264,7 +264,7 @@  discard block
 block discarded – undo
264 264
     private function error(string $message, string $filename, int $line) : midcom_error
265 265
     {
266 266
         $line++; // Array is 0-indexed
267
-        return new midcom_error('L10n DB SYNTAX ERROR: ' .  $message . ' at ' . $filename . ' ' . $line);
267
+        return new midcom_error('L10n DB SYNTAX ERROR: ' . $message . ' at ' . $filename . ' ' . $line);
268 268
     }
269 269
 
270 270
     /**
Please login to merge, or discard this patch.
lib/midcom/core/user.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -407,7 +407,7 @@
 block discarded – undo
407 407
 
408 408
                 $parent = $parent->get_parent_group();
409 409
             }
410
-            */
410
+             */
411 411
             $this->_inheritance_chains[$id] = $inheritance_chain;
412 412
         }
413 413
     }
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -182,7 +182,8 @@  discard block
 block discarded – undo
182 182
             }
183 183
             try {
184 184
                 $this->_storage = new $person_class($id);
185
-            } catch (mgd_exception $e) {
185
+            }
186
+            catch (mgd_exception $e) {
186 187
                 debug_add("Failed to retrieve the person ID {$id}: " . $e->getMessage(), MIDCOM_LOG_INFO);
187 188
                 throw new midcom_error_midgard($e, $id);
188 189
             }
@@ -230,7 +231,8 @@  discard block
 block discarded – undo
230 231
         if (mgd_is_guid($id)) {
231 232
             try {
232 233
                 return new $person_class($id);
233
-            } catch (mgd_exception $e) {
234
+            }
235
+            catch (mgd_exception $e) {
234 236
                 debug_add("Failed to retrieve the person GUID {$id}: " . $e->getMessage(), MIDCOM_LOG_INFO);
235 237
                 throw new midcom_error_midgard($e, $id);
236 238
             }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
         $this->_inheritance_chains = [];
359 359
 
360 360
         foreach ($this->_direct_groups as $id => $group) {
361
-            $this->_all_groups[$id] =& $this->_direct_groups[$id];
361
+            $this->_all_groups[$id] = & $this->_direct_groups[$id];
362 362
             $inheritance_chain = [$group->id];
363 363
             /**
364 364
              * FIXME: Parent group members should inherit permissions from
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
 
533 533
         $timeout = midcom::get()->config->get('auth_login_session_timeout', 0);
534 534
         $last_seen = $person->get_parameter('midcom', 'online');
535
-        if (   !$last_seen
535
+        if (!$last_seen
536 536
             || ($timeout > 0 && time() - $timeout > $last_seen)) {
537 537
             return 'offline';
538 538
         }
Please login to merge, or discard this patch.
lib/errors.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
     private function send($httpcode, $message)
250 250
     {
251 251
         $error_actions = midcom::get()->config->get('error_actions');
252
-        if (   !isset($error_actions[$httpcode])
252
+        if (!isset($error_actions[$httpcode])
253 253
             || !isset($error_actions[$httpcode]['action'])) {
254 254
             // No action specified for this error code, skip
255 255
             return;
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
             return;
280 280
         }
281 281
 
282
-        if (   !is_writable($config['filename'])
282
+        if (!is_writable($config['filename'])
283 283
             && !is_writable(dirname($config['filename']))) {
284 284
             debug_add("Error logging file {$config['filename']} is not writable", MIDCOM_LOG_WARN);
285 285
             return;
Please login to merge, or discard this patch.
lib/org/openpsa/calendar/event/resource.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,8 @@
 block discarded – undo
42 42
         }
43 43
         try {
44 44
             $resource = org_openpsa_calendar_resource_dba::get_cached($this->resource);
45
-        } catch (midcom_error $e) {
45
+        }
46
+        catch (midcom_error $e) {
46 47
             debug_add("Cannot fetch resource #{$this->resource} returning false", MIDCOM_LOG_INFO);
47 48
             return false;
48 49
         }
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/invoice/item.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
     public function _on_creating()
20 20
     {
21
-        if (   $this->invoice
21
+        if ($this->invoice
22 22
             && $this->position == 0) {
23 23
             $invoice = org_openpsa_invoices_invoice_dba::get_cached($this->invoice);
24 24
             $this->position = count($invoice->get_invoice_items()) + 1;
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             } catch (midcom_error $e) {
70 70
             }
71 71
         }
72
-        if (   $url == ''
72
+        if ($url == ''
73 73
             && $sales_url) {
74 74
             try {
75 75
                 $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($this->deliverable);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                 $invoice = new org_openpsa_invoices_invoice_dba($this->invoice);
92 92
                 $old_sum = $invoice->sum;
93 93
                 self::update_invoice($invoice);
94
-                if (   $old_sum != $invoice->sum
94
+                if ($old_sum != $invoice->sum
95 95
                     && !empty($this->deliverable)) {
96 96
                     $deliverable = new org_openpsa_sales_salesproject_deliverable_dba($this->deliverable);
97 97
                     self::update_deliverable($deliverable);
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
         if ($invoiced != $deliverable->invoiced) {
133 133
             $deliverable->invoiced = $invoiced;
134
-            if (   $deliverable->orgOpenpsaObtype !== org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION
134
+            if ($deliverable->orgOpenpsaObtype !== org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION
135 135
                 && $deliverable->state < org_openpsa_sales_salesproject_deliverable_dba::STATE_INVOICED) {
136 136
                 $deliverable->state = org_openpsa_sales_salesproject_deliverable_dba::STATE_INVOICED;
137 137
             }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,8 @@  discard block
 block discarded – undo
66 66
             try {
67 67
                 $task = org_openpsa_projects_task_dba::get_cached($this->task);
68 68
                 $url = $projects_url . 'task/' . $task->guid . '/';
69
-            } catch (midcom_error $e) {
69
+            }
70
+            catch (midcom_error $e) {
70 71
             }
71 72
         }
72 73
         if (   $url == ''
@@ -74,7 +75,8 @@  discard block
 block discarded – undo
74 75
             try {
75 76
                 $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($this->deliverable);
76 77
                 $url = $sales_url . 'deliverable/' . $deliverable->guid . '/';
77
-            } catch (midcom_error $e) {
78
+            }
79
+            catch (midcom_error $e) {
78 80
             }
79 81
         }
80 82
         if ($url != '') {
@@ -96,7 +98,8 @@  discard block
 block discarded – undo
96 98
                     $deliverable = new org_openpsa_sales_salesproject_deliverable_dba($this->deliverable);
97 99
                     self::update_deliverable($deliverable);
98 100
                 }
99
-            } catch (midcom_error $e) {
101
+            }
102
+            catch (midcom_error $e) {
100 103
                 $e->log();
101 104
             }
102 105
         }
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.