Passed
Pull Request — master (#204)
by
unknown
23:41
created
lib/midcom/core/account.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@
 block discarded – undo
194 194
             return false;
195 195
         }
196 196
 
197
-        if (   !empty($this->_old_username)
197
+        if (!empty($this->_old_username)
198 198
             && $this->_old_username !== $new_username) {
199 199
             if (!$history = @unserialize($this->_person->get_parameter('midcom', 'username_history'))) {
200 200
                 $history = [];
Please login to merge, or discard this patch.
lib/midcom/services/auth/backend.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
             return false;
85 85
         }
86 86
 
87
-        if (   midcom::get()->config->get('auth_check_client_ip')
87
+        if (midcom::get()->config->get('auth_check_client_ip')
88 88
             && $data['clientip'] != $request->getClientIp()) {
89 89
             debug_add("The session had mismatching client IP.", MIDCOM_LOG_INFO);
90 90
             debug_add("Expected {$data['clientip']}, got {$request->getClientIp()}.");
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             return false;
99 99
         }
100 100
 
101
-        if (   !$this->check_timestamp($data['timestamp'], $user)
101
+        if (!$this->check_timestamp($data['timestamp'], $user)
102 102
             || !$this->authenticate($user->username, '', true)) {
103 103
             $this->logout($user);
104 104
             return false;
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         $user = midcom_connection::login($username, $password, $trusted);
146 146
 
147 147
         if (!$user) {
148
-            debug_add("Failed to authenticate the given user: ". midcom_connection::get_error_string(),
148
+            debug_add("Failed to authenticate the given user: " . midcom_connection::get_error_string(),
149 149
                     MIDCOM_LOG_INFO);
150 150
             return false;
151 151
         }
Please login to merge, or discard this patch.
lib/org/openpsa/expenses/hour/report.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
     {
91 91
         if ($this->invoiceable) {
92 92
             $task = new org_openpsa_projects_task_dba($this->task);
93
-            $time_slot = (float)$task->get_parameter('org.openpsa.projects.projectbroker', 'minimum_slot');
93
+            $time_slot = (float) $task->get_parameter('org.openpsa.projects.projectbroker', 'minimum_slot');
94 94
             if (empty($time_slot)) {
95 95
                 $time_slot = (float) midcom_baseclasses_components_configuration::get('org.openpsa.projects', 'config')->get('default_minimum_time_slot');
96 96
                 if (empty($time_slot)) {
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 1 patch
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.
lib/midgard/admin/asgard/plugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         }
147 147
         $data['default_mode'] = 'view';
148 148
 
149
-        if (   !self::get_preference('edit_mode')
149
+        if (!self::get_preference('edit_mode')
150 150
             && midcom_baseclasses_components_configuration::get('midgard.admin.asgard', 'config')->get('edit_mode') == 1) {
151 151
             $data['default_mode'] = 'edit';
152 152
         } elseif (self::get_preference('edit_mode') == 1) {
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 
186 186
         $parent = $object->get_parent();
187 187
 
188
-        if (   is_a($object, midcom_db_parameter::class)
188
+        if (is_a($object, midcom_db_parameter::class)
189 189
             && !empty($parent->guid)) {
190 190
             // Add "parameters" list to breadcrumb if we're in a param
191 191
             $breadcrumb[] = [
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
         }
196 196
 
197 197
         $i = 0;
198
-        while (   !empty($parent->guid)
198
+        while (!empty($parent->guid)
199 199
                && $i < 10) {
200 200
             $i++;
201 201
             $parent_reflector = midcom_helper_reflector::get($parent);
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/midcom/interfaces.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
     public function _on_watched_dba_delete(midcom_core_dbaobject $object)
18 18
     {
19 19
         $qb = org_openpsa_directmarketing_campaign_member_dba::new_query_builder();
20
-        if (   $object instanceof midcom_db_person
20
+        if ($object instanceof midcom_db_person
21 21
             || $object instanceof org_openpsa_contacts_person_dba) {
22 22
             $qb->add_constraint('person', '=', $object->id);
23 23
         } elseif ($object instanceof org_openpsa_directmarketing_campaign_dba) {
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function background_send_message(array $args, midcom_baseclasses_components_cron_handler $handler)
44 44
     {
45
-        if (   !isset($args['url_base'])
45
+        if (!isset($args['url_base'])
46 46
             || !isset($args['batch'])) {
47 47
             $handler->print_error('url_base or batch number not set, aborting');
48 48
             return false;
Please login to merge, or discard this patch.
lib/org/openpsa/products/viewer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
         $object = $dm->get_storage()->get_value();
33 33
 
34 34
         $document = $indexer->new_document($dm);
35
-        if (   $config->get('enable_scheduling')
35
+        if ($config->get('enable_scheduling')
36 36
             && is_a($object, org_openpsa_products_product_dba::class)) {
37 37
             // Check start/end for products
38
-            if (   $object->start > time()
39
-                || (   $object->end != 0
38
+            if ($object->start > time()
39
+                || ($object->end != 0
40 40
                     && $object->end < time())) {
41 41
                 // Not in market, remove from index
42 42
                 $indexer->delete($document->RI);
Please login to merge, or discard this patch.
lib/midcom/services/permalinks/main.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
         if ($object instanceof midcom_db_attachment) {
94 94
             // Faster linking to attachments
95 95
             $parent = $object->get_parent();
96
-            if (   is_a($parent, midcom_db_topic::class)
96
+            if (is_a($parent, midcom_db_topic::class)
97 97
                 && $nav->is_node_in_tree($parent->id, $nav->get_root_node())) {
98 98
                 $napobj = $nav->get_node($parent->id);
99 99
                 return $napobj[MIDCOM_NAV_FULLURL] . $object->name;
Please login to merge, or discard this patch.