Passed
Push — master ( 9da2d4...b22c21 )
by Andreas
09:56
created
lib/midcom/services/cache/module/nap.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             // Get parent from DB and compare to catch moves
55 55
             if ($parent = $napobject[MIDCOM_NAV_OBJECT]->get_parent()) {
56 56
                 $parent_entry = $this->get_guid($parent->guid);
57
-                if (   $parent_entry
57
+                if ($parent_entry
58 58
                     && $parent_entry[MIDCOM_NAV_ID] != $cached_node_id) {
59 59
                     $this->backend->deleteItem($parent_entry[MIDCOM_NAV_ID] . '-leaves');
60 60
                 }
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             $parent_id = $napobject[MIDCOM_NAV_NODEID];
70 70
             $parent_entry = $this->get_node($parent_id);
71 71
 
72
-            if (   $parent_entry
72
+            if ($parent_entry
73 73
                 && array_key_exists(MIDCOM_NAV_SUBNODES, $parent_entry)) {
74 74
                 unset($parent_entry[MIDCOM_NAV_SUBNODES]);
75 75
                 $this->put_node($parent_id, $parent_entry);
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             if ($parent = $napobject[MIDCOM_NAV_OBJECT]->get_parent()) {
80 80
                 $parent_entry_from_object = $this->get_guid($parent->guid);
81 81
 
82
-                if (    !empty($parent_entry_from_object[MIDCOM_NAV_ID])
82
+                if (!empty($parent_entry_from_object[MIDCOM_NAV_ID])
83 83
                      && !empty($parent_entry[MIDCOM_NAV_ID])
84 84
                      && $parent_entry_from_object[MIDCOM_NAV_ID] != $parent_entry[MIDCOM_NAV_ID]) {
85 85
                     unset($parent_entry_from_object[MIDCOM_NAV_SUBNODES]);
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
             if ($object instanceof midcom_db_topic) {
104 104
                 return $nav->get_node($object->id);
105 105
             }
106
-            if (   ($node = $nav->find_closest_topic($object))
106
+            if (($node = $nav->find_closest_topic($object))
107 107
                 && $nodeobject = $nav->get_node($node->id)) {
108 108
                 return $nav->get_leaf($nodeobject[MIDCOM_NAV_ID] . '-' . $object->id);
109 109
             }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,8 @@
 block discarded – undo
107 107
                 && $nodeobject = $nav->get_node($node->id)) {
108 108
                 return $nav->get_leaf($nodeobject[MIDCOM_NAV_ID] . '-' . $object->id);
109 109
             }
110
-        } catch (midcom_error $e) {
110
+        }
111
+        catch (midcom_error $e) {
111 112
             $e->log();
112 113
         }
113 114
         return null;
Please login to merge, or discard this patch.
lib/org/openpsa/user/style/show-group.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@
 block discarded – undo
1 1
 <div class="content-with-sidebar">
2 2
     <div class="main">
3 3
 	    <?php
4
-	    $data['view']->display_view(true);
4
+        $data['view']->display_view(true);
5 5
         $prefix = midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ANCHORPREFIX);
6 6
         midcom::get()->dynamic_load($prefix . 'members/' . $data['group']->guid . '/');
7 7
         ?>
Please login to merge, or discard this patch.
lib/org/openpsa/user/handler/group/privileges.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@
 block discarded – undo
23 23
         $schemadb = schemadb::from_path($this->_config->get('schemadb_acl'));
24 24
 
25 25
         // Get the calendar root event
26
-        if (   class_exists('org_openpsa_calendar_interface')
26
+        if (class_exists('org_openpsa_calendar_interface')
27 27
             && $root_event = org_openpsa_calendar_interface::find_root_event()) {
28
-            $field =& $schemadb->get('default')->get_field('calendar');
28
+            $field = & $schemadb->get('default')->get_field('calendar');
29 29
             $field['type_config']['privilege_object'] = $root_event;
30 30
             $field['type_config']['assignee'] = 'group:' . $group->guid;
31 31
         }
Please login to merge, or discard this patch.
src/midcom/workflow/delete.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
             ])
88 88
             ->setRequired('object')
89 89
             ->setAllowedTypes('object', midcom_core_dbaobject::class)
90
-            ->setNormalizer('label', function ($options, $value) {
90
+            ->setNormalizer('label', function($options, $value) {
91 91
                 return $value ?? midcom_helper_reflector::get_object_title($options['object']);
92 92
             });
93 93
     }
Please login to merge, or discard this patch.
lib/midcom/core/nullcomponent/handler/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
         midcom::get()->metadata->set_request_metadata($this->_topic->metadata->revised, $this->_topic->guid);
25 25
         $data['node'] = $this->_topic;
26 26
 
27
-        if (   $this->_topic->id == midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ROOTTOPIC)->id
27
+        if ($this->_topic->id == midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ROOTTOPIC)->id
28 28
             && !midcom::get()->config->get('midcom_root_component')) {
29 29
             // if we have an ad hoc root topic, give user some options to do the initial setup
30 30
             return new midcom_response_relocate($this->router->generate('wizard'));
Please login to merge, or discard this patch.
src/midcom/httpkernel/subscriber.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     public function on_request(RequestEvent $event)
65 65
     {
66 66
         $request = $event->getRequest();
67
-        if (   $event->isMainRequest()
67
+        if ($event->isMainRequest()
68 68
             && $response = $this->initialize($request)) {
69 69
             $event->setResponse($response);
70 70
             return;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         $i = array_search('__request_data__', $arguments, true);
99 99
         if ($i !== false) {
100 100
             $context = $event->getRequest()->attributes->get('context');
101
-            $arguments[$i] =& $context->get_custom_key('request_data');
101
+            $arguments[$i] = & $context->get_custom_key('request_data');
102 102
             $event->setArguments($arguments);
103 103
         }
104 104
     }
Please login to merge, or discard this patch.
lib/midcom/core/account.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@
 block discarded – undo
192 192
             return false;
193 193
         }
194 194
 
195
-        if (   !empty($this->_old_username)
195
+        if (!empty($this->_old_username)
196 196
             && $this->_old_username !== $new_username) {
197 197
             $history = @unserialize($this->_person->get_parameter('midcom', 'username_history')) ?: [];
198 198
             $history[time()] = ['old' => $this->_old_username, 'new' => $new_username];
Please login to merge, or discard this patch.
lib/midcom/services/auth/frontend/form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
             }
47 47
         }
48 48
 
49
-        if (   !$request->request->has('midcom_services_auth_frontend_form_submit')
49
+        if (!$request->request->has('midcom_services_auth_frontend_form_submit')
50 50
             || !$request->request->has('username')
51 51
             || !$request->request->has('password')) {
52 52
             return null;
Please login to merge, or discard this patch.
lib/midcom/baseclasses/components/handler/rest.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,8 @@
 block discarded – undo
181 181
             if ($this->_response === null) {
182 182
                 $this->_stop('Could not handle request, unknown method', Response::HTTP_METHOD_NOT_ALLOWED);
183 183
             }
184
-        } catch (midcom_error $e) {
184
+        }
185
+        catch (midcom_error $e) {
185 186
             $this->_responseStatus = $e->getCode();
186 187
             return $this->_send_response($e->getMessage());
187 188
         }
Please login to merge, or discard this patch.