Passed
Push — master ( 9f04e9...9c2d83 )
by Andreas
20:35
created
lib/org/openpsa/user/handler/person/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'] = 'user:' . $person->guid;
31 31
         }
Please login to merge, or discard this patch.
lib/midgard/admin/asgard/style/midgard_admin_asgard_rcs_history.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
                 echo "                    <td>" . $formatter->datetime($revision['date'], IntlDateFormatter::MEDIUM, IntlDateFormatter::LONG) . "</td>\n";
34 34
                 echo "                    <td>";
35 35
 
36
-                if (   $revision['user']
36
+                if ($revision['user']
37 37
                     && $user = midcom::get()->auth->get_user($revision['user'])) {
38 38
                     echo $user->get_storage()->name;
39 39
                 } elseif ($revision['ip']) {
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/handler/message/compose.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
         }
65 65
 
66 66
         //Substyle handling
67
-        if (   !empty($data['message_array']['substyle'])
67
+        if (!empty($data['message_array']['substyle'])
68 68
             && !str_starts_with($data['message_array']['substyle'], 'builtin:')) {
69 69
             debug_add("Appending substyle {$data['message_array']['substyle']}");
70 70
             midcom::get()->style->append_substyle($data['message_array']['substyle']);
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     private function _real_show_compose(array $data)
114 114
     {
115 115
         $prefix = '';
116
-        if (   !empty($data['message_array']['substyle'])
116
+        if (!empty($data['message_array']['substyle'])
117 117
             && preg_match('/^builtin:(.*)/', $data['message_array']['substyle'], $matches_style)) {
118 118
             $prefix = $matches_style[1] . '-';
119 119
         }
Please login to merge, or discard this patch.
lib/org/openpsa/slideshow/handler/edit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $images = $qb->execute();
62 62
         $failed = 0;
63 63
         foreach ($images as $image) {
64
-            if (   !$image->generate_image('thumbnail', $this->_config->get('thumbnail_filter'))
64
+            if (!$image->generate_image('thumbnail', $this->_config->get('thumbnail_filter'))
65 65
                 || !$image->generate_image('image', $this->_config->get('image_filter'))) {
66 66
                 $failed++;
67 67
             }
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         $attachment->title = $title;
242 242
         $attachment->mimetype = $file->getMimeType();
243 243
         $attachment->parentguid = $image->guid;
244
-        if (   !$attachment->create()
244
+        if (!$attachment->create()
245 245
             || !$attachment->copy_from_file($file->getRealPath())) {
246 246
             throw new midcom_error('Failed to create attachment: ' . midcom_connection::get_error_string());
247 247
         }
Please login to merge, or discard this patch.
lib/org/openpsa/user/handler/person/account.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
         $workflow = $this->get_workflow('datamanager', ['controller' => $data['controller']]);
51 51
         $response = $workflow->run($request);
52 52
 
53
-        if (   $workflow->get_state() == 'save'
53
+        if ($workflow->get_state() == 'save'
54 54
             && $this->create_account($this->person, $data["controller"]->get_form_values())) {
55 55
             midcom::get()->uimessages->add($this->_l10n->get('org.openpsa.user'), sprintf($this->_l10n->get('person %s created'), $this->person->name));
56 56
         }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $person = new midcom_db_person($guid);
84 84
         $accounthelper = new org_openpsa_user_accounthelper($person);
85 85
         if ($accounthelper->welcome_email()) {
86
-            midcom::get()->uimessages->add($this->_l10n->get($this->_component), sprintf($this->_l10n->get('password reset and mail to %s sent'), $person->email ));
86
+            midcom::get()->uimessages->add($this->_l10n->get($this->_component), sprintf($this->_l10n->get('password reset and mail to %s sent'), $person->email));
87 87
         } else {
88 88
             midcom::get()->uimessages->add($this->_l10n->get($this->_component), $accounthelper->errstr, 'error'); 
89 89
         }
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         $accounthelper = new org_openpsa_user_accounthelper($this->person);
140 140
 
141 141
         // Update account
142
-        if (   !$accounthelper->set_account($controller->get_form_values()["username"], $password)
142
+        if (!$accounthelper->set_account($controller->get_form_values()["username"], $password)
143 143
             && midcom_connection::get_error() != MGD_ERR_OK) {
144 144
             // Failure, give a message
145 145
             midcom::get()->uimessages->add($this->_l10n->get('org.openpsa.user'), $this->_l10n->get("failed to update the user account, reason") . ': ' . midcom_connection::get_error_string(), 'error');
Please login to merge, or discard this patch.
lib/midcom/helper/nav/main.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
         while ($parent = $object->get_parent()) {
341 341
             // Verify that this topic is within the current sites tree, if it is not,
342 342
             // we ignore it.
343
-            if (   $parent instanceof midcom_db_topic
343
+            if ($parent instanceof midcom_db_topic
344 344
                 && $this->is_node_in_tree($parent->id, $this->get_root_node())) {
345 345
                 return $parent;
346 346
             }
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
                     $entry = "<span class=\"{$current_class}\">{$entry}</span>";
395 395
                 }
396 396
             } else {
397
-                if (   !empty($data['napobject'][MIDCOM_NAV_GUID])
397
+                if (!empty($data['napobject'][MIDCOM_NAV_GUID])
398 398
                     && in_array($data['napobject'][MIDCOM_NAV_GUID], $skip_guids)) {
399 399
                     continue;
400 400
                 }
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
                     $id = "custom-{$key}";
509 509
 
510 510
                     $url = "{$prefix}{$entry[MIDCOM_NAV_URL]}";
511
-                    if (   str_starts_with($entry[MIDCOM_NAV_URL], '/')
511
+                    if (str_starts_with($entry[MIDCOM_NAV_URL], '/')
512 512
                         || preg_match('|^https?://|', $entry[MIDCOM_NAV_URL])) {
513 513
                         $url = $entry[MIDCOM_NAV_URL];
514 514
                     }
Please login to merge, or discard this patch.
lib/midcom/admin/folder/handler/move.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $this->_object = midcom::get()->dbfactory->get_object_by_guid($guid);
35 35
 
36
-        if (   !($this->_object instanceof midcom_db_topic)
36
+        if (!($this->_object instanceof midcom_db_topic)
37 37
             && !($this->_object instanceof midcom_db_article)) {
38 38
             throw new midcom_error_notfound("Moving only topics and articles is supported.");
39 39
         }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             $folder = midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ROOTTOPIC);
75 75
         }
76 76
 
77
-        if (   $this->_object instanceof midcom_db_topic
77
+        if ($this->_object instanceof midcom_db_topic
78 78
             && $folder->up == $this->_object->id) {
79 79
             $tree_disabled = true;
80 80
         }
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
             $selected = ' checked="checked"';
88 88
         }
89 89
 
90
-        if (   !($this->_object instanceof midcom_db_topic)
90
+        if (!($this->_object instanceof midcom_db_topic)
91 91
             && $folder->component !== $this->current_folder->component) {
92 92
             // Non-topic objects may only be moved under folders of same component
93 93
             $class = 'wrong_component';
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
@@ -30,11 +30,11 @@
 block discarded – undo
30 30
         $object = $dm->get_storage()->get_value();
31 31
 
32 32
         $document = $indexer->new_document($dm);
33
-        if (   $config->get('enable_scheduling')
33
+        if ($config->get('enable_scheduling')
34 34
             && $object instanceof org_openpsa_products_product_dba) {
35 35
             // Check start/end for products
36
-            if (   $object->start > time()
37
-                || (   $object->end != 0
36
+            if ($object->start > time()
37
+                || ($object->end != 0
38 38
                     && $object->end < time())) {
39 39
                 // Not in market, remove from index
40 40
                 $indexer->delete($document->RI);
Please login to merge, or discard this patch.
lib/midgard/admin/asgard/plugin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
         $parent = $object->get_parent();
163 163
 
164
-        if (   $object instanceof midcom_db_parameter
164
+        if ($object instanceof midcom_db_parameter
165 165
             && !empty($parent->guid)) {
166 166
             // Add "parameters" list to breadcrumb if we're in a param
167 167
             $breadcrumb[] = [
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
         }
172 172
 
173 173
         $i = 0;
174
-        while (   !empty($parent->guid)
174
+        while (!empty($parent->guid)
175 175
                && $i < 10) {
176 176
             $i++;
177 177
             $parent_reflector = midcom_helper_reflector::get($parent);
Please login to merge, or discard this patch.