Passed
Push — master ( 9da2d4...b22c21 )
by Andreas
09:56
created
lib/midcom/helper/search/style/result_item.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,8 @@
 block discarded – undo
4 4
 
5 5
 try {
6 6
     $topic = midcom_db_topic::get_cached($document->topic_guid);
7
-} catch (midcom_error $e) {
7
+}
8
+catch (midcom_error $e) {
8 9
     $e->log();
9 10
 }
10 11
 ?>
Please login to merge, or discard this patch.
lib/midcom/helper/search/style/no_match.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1
-<h1><?php echo $data['topic']->extra;?></h1>
1
+<h1><?php echo $data['topic']->extra; ?></h1>
2 2
 
3 3
 <div class="midcom_helper_search_form">
4 4
   <?php midcom_show_style("{$data['type']}_form"); ?>
5 5
 </div>
6 6
 
7
-<h2><?php echo $data['l10n']->get('search results');?>:</h2>
7
+<h2><?php echo $data['l10n']->get('search results'); ?>:</h2>
8 8
 
9 9
 <div class="midcom_helper_search_results">
10 10
 <p><?php echo $data['l10n']->get('your query returned no results'); ?></p>
11 11
 </div>
12 12
 
13
-<h2><?php echo $data['l10n']->get('search hints');?>:</h2>
13
+<h2><?php echo $data['l10n']->get('search hints'); ?>:</h2>
14 14
 <p><?php
15 15
     $string = 'search hints ' . $data['config']->get('search_help_message');
16 16
     echo $data['l10n']->get($string);
Please login to merge, or discard this patch.
lib/midcom/helper/search/style/search_form.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1
-<h1><?php echo $data['topic']->extra;?></h1>
1
+<h1><?php echo $data['topic']->extra; ?></h1>
2 2
 
3 3
 <?php midcom_show_style("{$data['type']}_form"); ?>
4 4
 
5
-<h2><?php echo $data['l10n']->get('search hints');?>:</h2>
5
+<h2><?php echo $data['l10n']->get('search hints'); ?>:</h2>
6 6
 <p><?php
7 7
     $string = 'search hints ' . $data['config']->get('search_help_message');
8 8
     echo $data['l10n']->get($string);
Please login to merge, or discard this patch.
lib/midcom/helper/search/style/results.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@  discard block
 block discarded – undo
1
-<h1><?php echo $data['topic']->extra;?></h1>
1
+<h1><?php echo $data['topic']->extra; ?></h1>
2 2
 
3 3
 <div class="midcom_helper_search_form">
4 4
   <?php midcom_show_style("{$data['type']}_form"); ?>
5 5
 </div>
6 6
 
7
-<h2><?php echo $data['l10n']->get('search results');?>:</h2>
7
+<h2><?php echo $data['l10n']->get('search results'); ?>:</h2>
8 8
 <?php
9 9
 midcom_show_style('result_summary');
10 10
 midcom_show_style('result_nav');
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 midcom_show_style('result_nav');
20 20
 ?>
21 21
 
22
-<h2><?php echo $data['l10n']->get('search hints');?>:</h2>
22
+<h2><?php echo $data['l10n']->get('search hints'); ?>:</h2>
23 23
 <p><?php
24 24
     $string = 'search hints ' . $data['config']->get('search_help_message');
25 25
     echo $data['l10n']->get($string);
Please login to merge, or discard this patch.
lib/org/openpsa/reports/style/generic_query_form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <div class="wide">
2
-    <?php  $data['controller']->display_form();  ?>
2
+    <?php  $data['controller']->display_form(); ?>
3 3
     <!-- To open the report in new window we need to set the target via JS -->
4 4
     <script type="text/javascript">
5 5
     $('.datamanager2 button[type="submit"].save').attr('formtarget', '_blank');
Please login to merge, or discard this patch.
lib/org/openpsa/sales/validator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         if ($result === true) {
21 21
             $result = [];
22 22
         }
23
-        if (   empty($fields['end'])
23
+        if (empty($fields['end'])
24 24
             && empty($fields['continuous'])) {
25 25
             $result['end'] = midcom::get()->i18n->get_string('select either end date or continuous', 'org.openpsa.sales');
26 26
         }
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function validate_units(array $fields)
34 34
     {
35 35
         $result = [];
36
-        if (   empty($fields['invoiceByActualUnits'])
36
+        if (empty($fields['invoiceByActualUnits'])
37 37
             && empty($fields['plannedUnits'])) {
38 38
             $result['plannedUnits'] = midcom::get()->i18n->get_string('select either planned units or invoice by actual units', 'org.openpsa.sales');
39 39
             return $result;
Please login to merge, or discard this patch.
lib/org/openpsa/invoices/handler/projects.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,7 +51,8 @@  discard block
 block discarded – undo
51 51
             try {
52 52
                 $deliverable = org_openpsa_sales_salesproject_deliverable_dba::get_cached($task->get_agreement());
53 53
                 $item->deliverable = $deliverable->id;
54
-            } catch (midcom_error $e) {
54
+            }
55
+            catch (midcom_error $e) {
55 56
                 $e->log();
56 57
             }
57 58
             $item->invoice = $invoice->id;
@@ -133,7 +134,8 @@  discard block
 block discarded – undo
133 134
                 $customer = org_openpsa_contacts_group_dba::get_cached($customer_id);
134 135
                 $data['customer_label'] = $customer->official;
135 136
                 $data['disabled'] = '';
136
-            } catch (midcom_error $e) {
137
+            }
138
+            catch (midcom_error $e) {
137 139
                 $data['customer_label'] = $this->_l10n->get('no customer');
138 140
                 $data['disabled'] = ' disabled="disabled"';
139 141
             }
@@ -156,7 +158,8 @@  discard block
 block discarded – undo
156 158
                     } else {
157 159
                         $data['invoiceable_units'] = $task->plannedHours;
158 160
                     }
159
-                } catch (midcom_error $e) {
161
+                }
162
+                catch (midcom_error $e) {
160 163
                     $e->log();
161 164
                     if ($this->_config->get('default_hourly_price')) {
162 165
                         $data['default_price'] = $this->_config->get('default_hourly_price');
Please login to merge, or discard this patch.
lib/midcom/core/user.php 2 patches
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
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
      * 2. A group string identifier, matching the regex ^group:
418 418
      * 3. A valid midcom group name
419 419
      */
420
-    public function is_in_group(midcom_core_group|string $group) : bool
420
+    public function is_in_group(midcom_core_group | string $group) : bool
421 421
     {
422 422
         if ($this->_all_groups === null) {
423 423
             $this->_load_all_groups();
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 
476 476
         $timeout = midcom::get()->config->get('auth_login_session_timeout', 0);
477 477
         $last_seen = $person->get_parameter('midcom', 'online');
478
-        if (   !$last_seen
478
+        if (!$last_seen
479 479
             || ($timeout > 0 && time() - $timeout > $last_seen)) {
480 480
             return 'offline';
481 481
         }
Please login to merge, or discard this patch.
lib/midcom/core/group.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,8 @@
 block discarded – undo
94 94
             }
95 95
             try {
96 96
                 $this->_storage = new midgard_group($id);
97
-            } catch (Exception $e) {
97
+            }
98
+            catch (Exception $e) {
98 99
                 debug_add('Tried to load a midcom_core_group, but got error ' . $e->getMessage(), MIDCOM_LOG_ERROR);
99 100
                 debug_print_r('Passed argument was:', $id);
100 101
                 throw new midcom_error($e->getMessage());
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
      *
60 60
      * Any error will trigger midcom_error.
61 61
      */
62
-    public function __construct(string|int|midcom_db_group|midgard_group $id)
62
+    public function __construct(string | int | midcom_db_group | midgard_group $id)
63 63
     {
64 64
         if (is_object($id)) {
65 65
             $this->_storage = $id;
Please login to merge, or discard this patch.