Passed
Push — master ( a11f30...6bea5b )
by Andreas
37:19 queued 11:48
created
lib/org/openpsa/widgets/contact.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -159,12 +159,12 @@  discard block
 block discarded – undo
159 159
             }
160 160
         }
161 161
 
162
-        if (   $this->_config->get('jabber_enable_presence')
162
+        if ($this->_config->get('jabber_enable_presence')
163 163
             && $person->get_parameter('org.openpsa.jabber', 'jid')) {
164 164
             $this->contact_details['jid'] = $person->get_parameter('org.openpsa.jabber', 'jid');
165 165
         }
166 166
 
167
-        if (   $this->_config->get('skype_enable_presence')
167
+        if ($this->_config->get('skype_enable_presence')
168 168
             && $person->get_parameter('org.openpsa.skype', 'name')) {
169 169
             $this->contact_details['skype'] = $person->get_parameter('org.openpsa.skype', 'name');
170 170
         }
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         if (!empty($attachments[$type])) {
202 202
             return '<img class="photo" src="' . midcom_db_attachment::get_url($attachments[$type]) . '">';
203 203
         }
204
-        if (   $this->_config->get('gravatar_enable')
204
+        if ($this->_config->get('gravatar_enable')
205 205
             && !empty($this->contact_details['email'])) {
206 206
             $size = ($type == 'view') ? 500 : 32;
207 207
             $gravatar_url = "https://www.gravatar.com/avatar/" . md5(strtolower(trim($this->contact_details['email']))) . "?s=" . $size . '&d=identicon';
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 
314 314
     private function _show_groups()
315 315
     {
316
-        if (   !$this->show_groups
316
+        if (!$this->show_groups
317 317
             || empty($this->contact_details['id'])) {
318 318
             return;
319 319
         }
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
                     $default_shown = true;
378 378
                     $cards_to_show[] = $cardname;
379 379
                 }
380
-            } elseif (    $customer->$property
380
+            } elseif ($customer->$property
381 381
                       || ($customer->street && !$inherited_cards_only && !$default_shown)) {
382 382
                 $inherited_cards_only = false;
383 383
                 $multiple_addresses = true;
@@ -398,8 +398,8 @@  discard block
 block discarded – undo
398 398
 
399 399
         foreach ($cards_to_show as $cardname) {
400 400
             echo '<div class="vcard">';
401
-            if (   $multiple_addresses
402
-                || (   $cardname != 'visiting'
401
+            if ($multiple_addresses
402
+                || ($cardname != 'visiting'
403 403
                     && !$inherited_cards_only)) {
404 404
                 echo '<div style="text-align:center"><em>' . midcom::get()->i18n->get_string($cardname . ' address', 'org.openpsa.contacts') . "</em></div>\n";
405 405
             }
Please login to merge, or discard this patch.
lib/midcom/services/rcs/handler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $this->object = midcom::get()->dbfactory->get_object_by_guid($guid);
50 50
 
51
-        if (   !midcom::get()->config->get('midcom_services_rcs_enable')
51
+        if (!midcom::get()->config->get('midcom_services_rcs_enable')
52 52
             || !$this->object->_use_rcs) {
53 53
             throw new midcom_error_notfound("Revision control not supported for " . get_class($this->object) . ".");
54 54
         }
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
             throw new midcom_error_notfound("Revision {$args[1]} does not exist.");
263 263
         }
264 264
 
265
-        $data['preview'] = array_filter($this->backend->get_revision($revision), function ($value, $key) {
265
+        $data['preview'] = array_filter($this->backend->get_revision($revision), function($value, $key) {
266 266
             return !is_array($value)
267 267
                 && !in_array($value, ['', '0000-00-00'])
268 268
                 && midcom_services_rcs::is_field_showable($key);
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
         $this->object->require_do('midgard:update');
293 293
         // TODO: set another privilege for restoring?
294 294
 
295
-        if (   $this->backend->get_history()->version_exists($args[1])
295
+        if ($this->backend->get_history()->version_exists($args[1])
296 296
             && $this->backend->restore_to_revision($args[1])) {
297 297
             midcom::get()->uimessages->add($this->_l10n->get('midcom.admin.rcs'), sprintf($this->_l10n->get('restore to version %s successful'), $args[1]));
298 298
             return new midcom_response_relocate($this->get_object_url());
Please login to merge, or discard this patch.
lib/midcom/admin/rcs/style/midcom-admin-rcs-history.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
         echo "                    <td><a href='" . $data['router']->generate('preview', ['guid' => $guid, 'revision' => $number]) . "'>{$revision['version']}</a></td>\n";
33 33
         echo "                    <td>" . $formatter->datetime($revision['date']) . "</td>\n";
34 34
 
35
-        if (   $revision['user']
35
+        if ($revision['user']
36 36
             && $user = midcom::get()->auth->get_user($revision['user'])) {
37 37
             $person_label = $user->get_storage()->name;
38 38
             echo "                    <td>{$person_label}</td>\n";
Please login to merge, or discard this patch.
src/midcom/datamanager/template/plaintext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 
18 18
     public function form_widget_simple(FormView $view, array $data)
19 19
     {
20
-        if (   !empty($data['value'])
20
+        if (!empty($data['value'])
21 21
             || is_numeric($data['value'])) {
22 22
             return $data['value'];
23 23
         }
Please login to merge, or discard this patch.
src/midcom/datamanager/template/view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@
 block discarded – undo
143 143
 
144 144
     public function form_widget_simple(FormView $view, array $data)
145 145
     {
146
-        if (   !empty($data['value'])
146
+        if (!empty($data['value'])
147 147
             || is_numeric($data['value'])) {
148 148
             return $this->escape($data['value']);
149 149
         }
Please login to merge, or discard this patch.
lib/midcom/helper/toolbar/node.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         }
58 58
         $buttons = [];
59 59
         $workflow = new midcom\workflow\datamanager;
60
-        if (   $this->topic->can_do('midgard:update')
60
+        if ($this->topic->can_do('midgard:update')
61 61
             && $this->topic->can_do('midcom.admin.folder:topic_management')) {
62 62
             $buttons[] = $workflow->get_button("__ais/folder/edit/", [
63 63
                 MIDCOM_TOOLBAR_LABEL => midcom::get()->i18n->get_string('edit folder', 'midcom.admin.folder'),
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             ];
92 92
         }
93 93
         $buttons = array_merge($buttons, $this->get_approval_controls($this->topic, false));
94
-        if (   $this->topic->can_do('midcom.admin.folder:template_management')
94
+        if ($this->topic->can_do('midcom.admin.folder:template_management')
95 95
             && midcom::get()->auth->can_user_do('midgard.admin.asgard:manage_objects', null, 'midgard_admin_asgard_plugin')) {
96 96
             $enabled = false;
97 97
             $styleeditor_url = '';
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                     MIDCOM_TOOLBAR_ACCESSKEY => 'f',
125 125
                 ]);
126 126
             }
127
-            if (   $this->topic->guid !== midcom::get()->config->get('midcom_root_topic_guid')
127
+            if ($this->topic->guid !== midcom::get()->config->get('midcom_root_topic_guid')
128 128
                 && $this->topic->can_do('midgard:delete')) {
129 129
                 $workflow = new midcom\workflow\delete(['object' => $this->topic, 'recursive' => true]);
130 130
                 $buttons[] = $workflow->get_button("__ais/folder/delete/", [
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/sender/backend/email.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@
 block discarded – undo
166 166
         $address = addslashes($address);
167 167
         return preg_replace_callback(
168 168
             '/href="(http:\/\/.*?)"/i',
169
-            function ($match) use ($address) {
169
+            function($match) use ($address) {
170 170
                 return 'href="' . str_replace("URL", rawurlencode($match[1]), $address) . '"';
171 171
             },
172 172
             $html);
Please login to merge, or discard this patch.
lib/org/openpsa/sales/salesproject/deliverable.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     {
82 82
         $this->calculate_price(false);
83 83
 
84
-        if (   $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION
84
+        if ($this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION
85 85
             && $this->continuous) {
86 86
             $this->end = 0;
87 87
         } elseif ($this->end < $this->start) {
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         $calculator->run($this);
170 170
         $cost = $calculator->get_cost();
171 171
         $price = $calculator->get_price();
172
-        if (   $price != $this->price
172
+        if ($price != $this->price
173 173
             || $cost != $this->cost) {
174 174
             $this->price = $price;
175 175
             $this->cost = $cost;
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         $units = $agreement_hours['invoiceable'];
217 217
         $uninvoiceableUnits = $agreement_hours['reported'] - ($agreement_hours['invoiceable'] + $agreement_hours['invoiced']);
218 218
 
219
-        if (   $units != $this->units
219
+        if ($units != $this->units
220 220
             || $uninvoiceableUnits != $this->uninvoiceableUnits) {
221 221
             debug_add("agreement values have changed, setting units to " . $units . ", uninvoiceable: " . $uninvoiceableUnits);
222 222
             $this->units = $units;
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 
271 271
     public function invoice() : bool
272 272
     {
273
-        if (   $this->state >= self::STATE_INVOICED
273
+        if ($this->state >= self::STATE_INVOICED
274 274
             || $this->orgOpenpsaObtype == org_openpsa_products_product_dba::DELIVERY_SUBSCRIPTION) {
275 275
             return false;
276 276
         }
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
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
         $parent = $object->get_parent();
166 166
 
167
-        if (   is_a($object, midcom_db_parameter::class)
167
+        if (is_a($object, midcom_db_parameter::class)
168 168
             && !empty($parent->guid)) {
169 169
             // Add "parameters" list to breadcrumb if we're in a param
170 170
             $breadcrumb[] = [
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         }
175 175
 
176 176
         $i = 0;
177
-        while (   !empty($parent->guid)
177
+        while (!empty($parent->guid)
178 178
                && $i < 10) {
179 179
             $i++;
180 180
             $parent_reflector = midcom_helper_reflector::get($parent);
Please login to merge, or discard this patch.