Passed
Push — master ( 43bdc5...7c413a )
by Andreas
11:10
created
lib/midcom/helper/metadata.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
     {
255 255
         if (in_array($key, $this->field_config['timebased'])) {
256 256
             // This is ugly, but seems the only possible way...
257
-            if (   isset($this->__metadata->$key)
257
+            if (isset($this->__metadata->$key)
258 258
                 && (string) $this->__metadata->$key !== "0001-01-01T00:00:00+00:00") {
259 259
                 return (int) $this->__metadata->$key->format('U');
260 260
             }
@@ -315,11 +315,11 @@  discard block
 block discarded – undo
315 315
         }
316 316
 
317 317
         $now = time();
318
-        if (   $this->get('schedulestart')
318
+        if ($this->get('schedulestart')
319 319
             && $this->get('schedulestart') > $now) {
320 320
             return false;
321 321
         }
322
-        if (   $this->get('scheduleend')
322
+        if ($this->get('scheduleend')
323 323
             && $this->get('scheduleend') < $now) {
324 324
             return false;
325 325
         }
@@ -335,9 +335,9 @@  discard block
 block discarded – undo
335 335
     public function is_object_visible_onsite() : bool
336 336
     {
337 337
         return
338
-        (   (   midcom::get()->config->get('show_hidden_objects')
338
+        ((midcom::get()->config->get('show_hidden_objects')
339 339
              || $this->is_visible())
340
-         && (   midcom::get()->config->get('show_unapproved_objects')
340
+         && (midcom::get()->config->get('show_unapproved_objects')
341 341
              || $this->is_approved())
342 342
         );
343 343
     }
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
             $guid = $source;
395 395
         }
396 396
 
397
-        if (   $object === null
397
+        if ($object === null
398 398
             && mgd_is_guid($guid)) {
399 399
             try {
400 400
                 $object = midcom::get()->dbfactory->get_object_by_guid($guid);
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
         }
428 428
 
429 429
         // Lock was created by the user, return "not locked"
430
-        if (   !empty(midcom::get()->auth->user->guid)
430
+        if (!empty(midcom::get()->auth->user->guid)
431 431
             && $this->get('locker') === midcom::get()->auth->user->guid) {
432 432
             return false;
433 433
         }
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
      */
455 455
     public function can_unlock() : bool
456 456
     {
457
-        return (  (midcom::get()->auth->user && midcom::get()->auth->user->guid == $this->__object->metadata->locker)
457
+        return ((midcom::get()->auth->user && midcom::get()->auth->user->guid == $this->__object->metadata->locker)
458 458
                 || $this->__object->can_do('midcom:unlock')
459 459
                 || midcom::get()->auth->can_user_do('midcom:unlock', null, midcom_services_auth::class));
460 460
     }
Please login to merge, or discard this patch.