Passed
Push — master ( 805652...eccbd5 )
by Andreas
26:13
created
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/errors.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     private function send(int $httpcode, string $message)
112 112
     {
113 113
         $error_actions = midcom::get()->config->get_array('error_actions');
114
-        if (   !isset($error_actions[$httpcode])
114
+        if (!isset($error_actions[$httpcode])
115 115
             || !isset($error_actions[$httpcode]['action'])) {
116 116
             // No action specified for this error code, skip
117 117
             return;
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             return;
142 142
         }
143 143
 
144
-        if (   !is_writable($config['filename'])
144
+        if (!is_writable($config['filename'])
145 145
             && !is_writable(dirname($config['filename']))) {
146 146
             debug_add("Error logging file {$config['filename']} is not writable", MIDCOM_LOG_WARN);
147 147
             return;
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.
lib/midcom/helper/reflector/main.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 
327 327
         $label_prop = $this->get_label_property();
328 328
 
329
-        if (    $label_prop != 'guid'
329
+        if ($label_prop != 'guid'
330 330
              && $this->_mgd_reflector->property_exists($label_prop)) {
331 331
             $search_properties[$label_prop] = true;
332 332
         }
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
                 continue;
381 381
             }
382 382
 
383
-            if (   !$ref->is_link($property)
383
+            if (!$ref->is_link($property)
384 384
                 && $ref->get_midgard_type($property) != MGD_TYPE_GUID) {
385 385
                 continue;
386 386
             }
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
     protected static function class_rewrite(string $schema_type) : string
416 416
     {
417 417
         $extends = midcom_baseclasses_components_configuration::get('midcom.helper.reflector', 'config')->get_array('class_extends');
418
-        if (   isset($extends[$schema_type])
418
+        if (isset($extends[$schema_type])
419 419
             && class_exists($extends[$schema_type])) {
420 420
             return $extends[$schema_type];
421 421
         }
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
         // Configured properties
486 486
         foreach ($this->_config->get_array($type . '_exceptions') as $class => $property) {
487 487
             if (midcom::get()->dbfactory->is_a($object, $class)) {
488
-                if (   $property !== false
488
+                if ($property !== false
489 489
                     && !$this->_mgd_reflector->property_exists($property)) {
490 490
                     debug_add("Matched class '{$key}' to '{$class}' via is_a but property '{$property}' does not exist", MIDCOM_LOG_ERROR);
491 491
                 } else {
Please login to merge, or discard this patch.