Passed
Push — master ( 7fae15...7a46b9 )
by Andreas
18:45
created
lib/midcom/admin/folder/handler/move.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         $this->_object = midcom::get()->dbfactory->get_object_by_guid($guid);
37 37
 
38
-        if (   !is_a($this->_object, midcom_db_topic::class)
38
+        if (!is_a($this->_object, midcom_db_topic::class)
39 39
             && !is_a($this->_object, midcom_db_article::class)) {
40 40
             throw new midcom_error_notfound("Moving only topics and articles is supported.");
41 41
         }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             $folder = midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ROOTTOPIC);
77 77
         }
78 78
 
79
-        if (   is_a($this->_object, midcom_db_topic::class)
79
+        if (is_a($this->_object, midcom_db_topic::class)
80 80
             && $folder->up == $this->_object->id) {
81 81
             $tree_disabled = true;
82 82
         }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             $selected = ' checked="checked"';
90 90
         }
91 91
 
92
-        if (   !is_a($this->_object, midcom_db_topic::class)
92
+        if (!is_a($this->_object, midcom_db_topic::class)
93 93
             && $folder->component !== $this->current_folder->component) {
94 94
             // Non-topic objects may only be moved under folders of same component
95 95
             $class = 'wrong_component';
Please login to merge, or discard this patch.
lib/midcom/helper/search/handler/search.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     private function search_nodes(array $node, midcom_helper_nav $nap, string $prefix)
52 52
     {
53
-        if (   !array_key_exists($node[MIDCOM_NAV_COMPONENT], $this->_request_data['components'])
53
+        if (!array_key_exists($node[MIDCOM_NAV_COMPONENT], $this->_request_data['components'])
54 54
             && $node[MIDCOM_NAV_COMPONENT] != 'midcom.helper.search') {
55 55
             $l10n = $this->_i18n->get_l10n($node[MIDCOM_NAV_COMPONENT]);
56 56
             $this->_request_data['components'][$node[MIDCOM_NAV_COMPONENT]] = $l10n->get($node[MIDCOM_NAV_COMPONENT]);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         }
99 99
         $this->prepare_formdata($_REQUEST['type']);
100 100
 
101
-        if (   count(explode(' ', $data['query'])) == 1
101
+        if (count(explode(' ', $data['query'])) == 1
102 102
             && !str_contains($data['query'], '*')
103 103
             && $this->_config->get('single_term_auto_wildcard')) {
104 104
             //If there is only one search term append * to the query if auto_wildcard is enabled
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
             // Register GUIDs for cache engine
168 168
             foreach ($this->_request_data['result'] as $doc) {
169
-                if (   !isset($doc->source)
169
+                if (!isset($doc->source)
170 170
                     || !mgd_is_guid($doc->source)) {
171 171
                     // Non-Midgard results don't need to go through cache registration
172 172
                     continue;
Please login to merge, or discard this patch.
lib/net/nemein/wiki/handler/view.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -202,9 +202,9 @@
 block discarded – undo
202 202
         $toc .= "\n<ol class=\"midcom_helper_toc_formatter level_{$current_list_level}\">\n";
203 203
         foreach ($headings[4] as $key => $heading) {
204 204
             $anchor = 'heading-' . md5($heading);
205
-            $tag_level =& $headings[3][$key];
206
-            $heading_code =& $headings[0][$key];
207
-            $heading_tag =& $headings[2][$key];
205
+            $tag_level = & $headings[3][$key];
206
+            $heading_code = & $headings[0][$key];
207
+            $heading_tag = & $headings[2][$key];
208 208
             $heading_new_code = "<a id='{$anchor}'></a>{$heading_code}";
209 209
             $content = str_replace($heading_code, $heading_new_code, $content);
210 210
             if ($current_tag_level === false) {
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/handler/duplicates/person.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
     private function load_next()
43 43
     {
44
-        $i =& $this->_request_data['loop_i'];
44
+        $i = & $this->_request_data['loop_i'];
45 45
         while ($i < 100) {
46 46
             debug_add("Loop iteration {$i}");
47 47
             $qb = new midgard_query_builder('midgard_parameter');
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                 continue;
70 70
             }
71 71
             // Make sure we actually have enough rights to do this
72
-            if (   !$person1->can_do('midgard:update')
72
+            if (!$person1->can_do('midgard:update')
73 73
                 || !$person1->can_do('midgard:delete')
74 74
                 || !$person2->can_do('midgard:update')
75 75
                 || !$person2->can_do('midgard:delete')) {
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                 continue;
79 79
             }
80 80
             // Extra sanity check (in case of semi-successful not-duplicate mark)
81
-            if (   $person1->get_parameter('org.openpsa.contacts.duplicates:not_duplicate', $person2->guid)
81
+            if ($person1->get_parameter('org.openpsa.contacts.duplicates:not_duplicate', $person2->guid)
82 82
                 || $person2->get_parameter('org.openpsa.contacts.duplicates:not_duplicate', $person1->guid)) {
83 83
                 debug_add("It seems these two (#{$person1->id} and #{$person2->id}) have also marked as not duplicates, some cleanup might be a good thing", MIDCOM_LOG_WARN);
84 84
                 $i++;
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
             if ($keep == 'both') {
103 103
                 $option1->require_do('midgard:update');
104 104
                 $option2->require_do('midgard:update');
105
-                if (   $option1->set_parameter('org.openpsa.contacts.duplicates:not_duplicate', $option2->guid, time())
105
+                if ($option1->set_parameter('org.openpsa.contacts.duplicates:not_duplicate', $option2->guid, time())
106 106
                     && $option2->set_parameter('org.openpsa.contacts.duplicates:not_duplicate', $option1->guid, time())) {
107 107
                     // Clear the possible duplicate parameters
108 108
                     $option1->delete_parameter('org.openpsa.contacts.duplicates:possible_duplicate', $option2->guid);
@@ -120,11 +120,11 @@  discard block
 block discarded – undo
120 120
                 }
121 121
             } else {
122 122
                 if ($keep == $option1->guid) {
123
-                    $person1 =& $option1;
124
-                    $person2 =& $option2;
123
+                    $person1 = & $option1;
124
+                    $person2 = & $option2;
125 125
                 } elseif ($keep == $option2->guid) {
126
-                    $person1 =& $option2;
127
-                    $person2 =& $option1;
126
+                    $person1 = & $option2;
127
+                    $person2 = & $option1;
128 128
                 } else {
129 129
                     throw new midcom_error('Something weird happened (basically we got bogus data)');
130 130
                 }
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/handler/message/send.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
     {
115 115
         $nap = new midcom_helper_nav();
116 116
         $node = $nap->get_node($nap->get_current_node());
117
-        $compose_url = $node[MIDCOM_NAV_RELATIVEURL] . 'message/compose/' . $data['message']->guid .'/';
117
+        $compose_url = $node[MIDCOM_NAV_RELATIVEURL] . 'message/compose/' . $data['message']->guid . '/';
118 118
         $this->batch_url_base_full = $node[MIDCOM_NAV_RELATIVEURL] . 'message/send_bg/' . $data['message']->guid . '/';
119 119
         debug_add("compose_url: {$compose_url}");
120 120
         debug_add("batch_url base: {$this->batch_url_base_full}");
Please login to merge, or discard this patch.
lib/org/openpsa/products/handler/product/csv.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
 
51 51
     public function _load_data(string $handler_id, array &$args, array &$data) : array
52 52
     {
53
-        if (   empty($_POST)
53
+        if (empty($_POST)
54 54
             && $this->session->exists('POST_data')) {
55 55
             $_POST = $this->session->get('POST_data');
56 56
             $this->session->remove('POST_data');
Please login to merge, or discard this patch.
lib/midcom/helper/reflector/tree.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     private static function _check_permissions(bool $deleted) : bool
93 93
     {
94 94
         // PONDER: Check for some generic user privilege instead  ??
95
-        if (   $deleted
95
+        if ($deleted
96 96
             && !midcom_connection::is_admin()
97 97
             && !midcom::get()->auth->is_component_sudo()) {
98 98
             debug_add('Non-admins are not allowed to list deleted objects', MIDCOM_LOG_ERROR);
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             $field_type = $field_data['type'];
222 222
             $field = $field_data['name'];
223 223
 
224
-            if (   !$field_target
224
+            if (!$field_target
225 225
                 || !isset($for_object->$field_target)) {
226 226
                 // Why return false ???
227 227
                 return false;
Please login to merge, or discard this patch.
lib/midgard/admin/asgard/handler/object/manage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -223,10 +223,10 @@
 block discarded – undo
223 223
             $new_type_reflector = midcom_helper_reflector::get($new_type);
224 224
             $link_properties = $new_type_reflector->get_link_properties();
225 225
             foreach ($link_properties as $property => $link) {
226
-                if (   ($link['class'] && midcom_helper_reflector::is_same_class($link['class'], $this->_object->__mgdschema_class_name__))
226
+                if (($link['class'] && midcom_helper_reflector::is_same_class($link['class'], $this->_object->__mgdschema_class_name__))
227 227
                     || $link['type'] == MGD_TYPE_GUID) {
228 228
                     $defaults[$property] = $this->_object->{$link['target']};
229
-                } elseif (   $property == $parent_property
229
+                } elseif ($property == $parent_property
230 230
                           && midcom_helper_reflector::is_same_class($new_type, $this->_object->__mgdschema_class_name__)) {
231 231
                     $defaults[$property] = $this->_object->$parent_property;
232 232
                 }
Please login to merge, or discard this patch.
lib/midcom/services/auth/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@
 block discarded – undo
221 221
             return true;
222 222
         }
223 223
         if ($user === null) {
224
-            $user =& $this->user;
224
+            $user = & $this->user;
225 225
         }
226 226
 
227 227
         if ($user == 'EVERYONE') {
Please login to merge, or discard this patch.