Passed
Push — master ( dc3f28...9cb9a1 )
by Andreas
16:51
created
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/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/dbaobject.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,8 @@
 block discarded – undo
93 93
             try {
94 94
                 $mgdschemaclass = $this->__mgdschema_class_name__;
95 95
                 $this->__object = new $mgdschemaclass($id);
96
-            } catch (mgd_exception $e) {
96
+            }
97
+            catch (mgd_exception $e) {
97 98
                 debug_add('Constructing ' . $this->__mgdschema_class_name__ . ' object ' . $id . ' failed, reason: ' . $e->getMessage(), MIDCOM_LOG_WARN);
98 99
                 throw new midcom_error_midgard($e, $id);
99 100
             }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             }
72 72
             $this->__object = $id;
73 73
         } else {
74
-            if (   is_int($id)
74
+            if (is_int($id)
75 75
                 && $id < 1) {
76 76
                 throw new midcom_error($id . ' is not a valid database ID');
77 77
             }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
             }
86 86
 
87 87
             //Some useful information for performance tuning
88
-            if (   midcom::get()->config->get('log_level') >= MIDCOM_LOG_DEBUG
88
+            if (midcom::get()->config->get('log_level') >= MIDCOM_LOG_DEBUG
89 89
                 && $this->__object->guid) {
90 90
                 static $guids = [];
91 91
                 static $total = 0;
Please login to merge, or discard this patch.
lib/net/nehmer/blog/midcom/interfaces.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,8 @@
 block discarded – undo
32 32
             foreach ($qb->execute() as $article) {
33 33
                 try {
34 34
                     $dm->set_storage($article);
35
-                } catch (midcom_error $e) {
35
+                }
36
+                catch (midcom_error $e) {
36 37
                     $e->log(MIDCOM_LOG_WARN);
37 38
                     continue;
38 39
                 }
Please login to merge, or discard this patch.
lib/org/openpsa/documents/handler/search.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,8 @@
 block discarded – undo
93 93
                     // ->source will always contain the document GUID
94 94
                     $data['document'] = new org_openpsa_documents_document_dba($document->source);
95 95
                     $this->datamanager->set_storage($data['document']);
96
-                } catch (midcom_error $e) {
96
+                }
97
+                catch (midcom_error $e) {
97 98
                     $e->log();
98 99
                     continue;
99 100
                 }
Please login to merge, or discard this patch.
lib/org/openpsa/core/siteconfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@
 block discarded – undo
174 174
         }
175 175
         if (!midcom::get()->auth->admin) {
176 176
             $user_id = midcom::get()->auth->acl->get_user_id();
177
-            if (   !$this->data[$type . '_guid']
177
+            if (!$this->data[$type . '_guid']
178 178
                 || !midcom::get()->auth->acl->can_do_byguid('midgard:read', $this->data[$type . '_guid'], midcom_db_topic::class, $user_id)) {
179 179
                 return null;
180 180
             }
Please login to merge, or discard this patch.
lib/org/openpsa/widgets/ui.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
             $config = array_merge($defaults, $config);
40 40
 
41 41
             $node_url = $siteconfig->get_node_full_url($component);
42
-            if (   $node_url
43
-                && (   !$user_id
42
+            if ($node_url
43
+                && (!$user_id
44 44
                     || midcom::get()->auth->acl->can_do_byguid('midgard:read', $siteconfig->get_node_guid($component), midcom_db_topic::class, $user_id))) {
45 45
                 $providers[] = [
46 46
                     'placeholder' => midcom::get()->i18n->get_string('search title', $component),
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         echo '<div id="tabs">';
116 116
         echo "\n<ul>\n";
117 117
         foreach ($tabdata as $key => $tab) {
118
-            echo "<li><a id='key_" . $key ."' class='tabs_link' href='" . $prefix . $tab['url'] . "' ><span> " . $tab['title'] . "</span></a></li>";
118
+            echo "<li><a id='key_" . $key . "' class='tabs_link' href='" . $prefix . $tab['url'] . "' ><span> " . $tab['title'] . "</span></a></li>";
119 119
         }
120 120
         echo "\n</ul>\n";
121 121
         echo "</div>\n";
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,12 +103,12 @@
 block discarded – undo
103 103
         if (!empty($guid)) {
104 104
             //pass the urls & titles for the tabs
105 105
             $tabdata[] = [
106
-               'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/',
107
-               'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'),
106
+                'url' => '__mfa/org.openpsa.relatedto/journalentry/' . $guid . '/',
107
+                'title' => midcom::get()->i18n->get_string('journal entries', 'org.openpsa.relatedto'),
108 108
             ];
109 109
             $tabdata[] = [
110
-               'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/',
111
-               'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'),
110
+                'url' => '__mfa/org.openpsa.relatedto/render/' . $guid . '/both/',
111
+                'title' => midcom::get()->i18n->get_string('related objects', 'org.openpsa.relatedto'),
112 112
             ];
113 113
         }
114 114
 
Please login to merge, or discard this patch.