Passed
Branch master (7a7694)
by Andreas
18:25
created
lib/midcom/response/relocate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
      */
28 28
     public function setTargetUrl($url)
29 29
     {
30
-        if (   !str_starts_with($url, "/")
30
+        if (!str_starts_with($url, "/")
31 31
             && !preg_match('|^https?://|', $url)) {
32 32
             $prefix = midcom_core_context::get()->get_key(MIDCOM_CONTEXT_ANCHORPREFIX);
33 33
             if ($prefix == '') {
Please login to merge, or discard this patch.
lib/midcom/config/main.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
         // show_unapproved_objects). Disabled by default. Unsafe to Link Prefetching!
428 428
         'metadata_approval' => false,
429 429
         'metadata_scheduling' => false,
430
-        'metadata_lock_timeout' => 60,    // Time in minutes
430
+        'metadata_lock_timeout' => 60, // Time in minutes
431 431
         'staging2live_staging' => false,
432 432
 
433 433
         // Set the datamanager schema used by the Metadata Service
@@ -518,12 +518,12 @@  discard block
 block discarded – undo
518 518
             return $default;
519 519
         }
520 520
 
521
-        if (   $key === 'auth_type'
521
+        if ($key === 'auth_type'
522 522
             && !in_array($this->_merged_config[$key], ['Plaintext', 'Legacy', 'SHA256'])) {
523 523
             throw new midcom_error('Unsupported authentication type');
524 524
         }
525 525
         // Check the midcom_config site prefix for absolute local urls
526
-        if (   $key === 'midcom_site_url'
526
+        if ($key === 'midcom_site_url'
527 527
             && str_starts_with($this->_merged_config[$key], '/')) {
528 528
             $this->_merged_config[$key] = midcom::get()->get_page_prefix() . substr($this->_merged_config[$key], 1);
529 529
         }
Please login to merge, or discard this patch.
lib/org/openpsa/contacts/handler/search.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
 
83 83
         // Handle automatic wildcards
84 84
         $auto_wildcards = $this->_config->get('auto_wildcards');
85
-        if (   $auto_wildcards
85
+        if ($auto_wildcards
86 86
             && !str_contains($this->_query_string_processed, '%')) {
87 87
             switch ($auto_wildcards) {
88 88
                 case 'both':
Please login to merge, or discard this patch.
lib/org/openpsa/directmarketing/support/bounce_detector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 }
46 46
 $recipient = $_ENV["RECIPIENT"];
47 47
 $token_length = strlen($recipient) - strlen($prefix) - strlen($suffix);
48
-if (   $token_length <= 0
48
+if ($token_length <= 0
49 49
     || !str_starts_with($recipient, $prefix)
50 50
     || !str_ends_with($recipient, $suffix)) {
51 51
     error_log("Recipient address does not match address template: $recipient");
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         fclose($fh);
62 62
         exit(0);
63 63
     }
64
-} elseif (   str_starts_with($BOUNCE_LOGGER, "http://")
64
+} elseif (str_starts_with($BOUNCE_LOGGER, "http://")
65 65
           || str_starts_with($BOUNCE_LOGGER, "https://")) {
66 66
     $client = new org_openpsa_httplib();
67 67
     $client->post($BOUNCE_LOGGER, ["token" => $token]);
Please login to merge, or discard this patch.
src/midcom/routing/parser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         $url = $this->context->get_key(MIDCOM_CONTEXT_URI);
47 47
 
48 48
         $prefix_length = strlen(midcom_connection::get_url('prefix'));
49
-        if (   $prefix_length > 1
49
+        if ($prefix_length > 1
50 50
             && str_starts_with($url, midcom_connection::get_url('prefix'))) {
51 51
             $url = substr($url, $prefix_length);
52 52
         }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function find_urlmethod() : ?string
73 73
     {
74
-        if (   empty($this->argv)
74
+        if (empty($this->argv)
75 75
             || !str_starts_with($this->argv[0], 'midcom-')) {
76 76
             return null;
77 77
         }
Please login to merge, or discard this patch.
src/midcom/datamanager/extension/transformer/imageTransformer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         }
48 48
 
49 49
         $result = [];
50
-        if (   !empty($array['file'])
50
+        if (!empty($array['file'])
51 51
             || !empty($array['identifier']) && str_starts_with($array['identifier'], 'tmpfile-')) {
52 52
             $result['file'] = parent::reverseTransform($array);
53 53
         } elseif (!empty($array['objects'])) {
Please login to merge, or discard this patch.
lib/net/nemein/tag/handler.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -371,7 +371,8 @@  discard block
 block discarded – undo
371 371
                 $tag = new net_nemein_tag_tag_dba($link->tag);
372 372
 
373 373
                 $tags[$tag->tag] = $link->value;
374
-            } catch (midcom_error $e) {
374
+            }
375
+            catch (midcom_error $e) {
375 376
                 $e->log();
376 377
             }
377 378
         }
@@ -427,7 +428,8 @@  discard block
 block discarded – undo
427 428
             try {
428 429
                 $tag = net_nemein_tag_tag_dba::get_cached($link->tag);
429 430
                 $link_object_map[$link->fromGuid][$tag->tag] = $link;
430
-            } catch (midcom_error $e) {
431
+            }
432
+            catch (midcom_error $e) {
431 433
                 $e->log();
432 434
             }
433 435
         }
@@ -456,7 +458,8 @@  discard block
 block discarded – undo
456 458
                     $tmpobject = midcom::get()->dbfactory->convert_midgard_to_midcom($tmpobject);
457 459
                 }
458 460
                 $return[] = $tmpobject;
459
-            } catch (midcom_error $e) {
461
+            }
462
+            catch (midcom_error $e) {
460 463
                 $e->log();
461 464
             }
462 465
         }
Please login to merge, or discard this patch.
lib/midgard/admin/user/style/midgard-admin-user-group-folders.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,8 @@
 block discarded – undo
17 17
         foreach ($data['objects'] as $guid => $privs) {
18 18
             try {
19 19
                 $object = new midcom_db_topic($guid);
20
-            } catch (midcom_error $e) {
20
+            }
21
+            catch (midcom_error $e) {
21 22
                 continue;
22 23
             }
23 24
             echo "<tr>\n";
Please login to merge, or discard this patch.
lib/org/openpsa/calendar/event/member.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
             $event = new org_openpsa_calendar_event_dba($this->eid);
69 69
         }
70 70
 
71
-        if (    $recipient->id == midcom_connection::get_user()
71
+        if ($recipient->id == midcom_connection::get_user()
72 72
              && !$event->send_notify_me) {
73 73
             //Do not send notification to current user
74 74
             debug_add('event->send_notify_me is false and recipient is current user, aborting notify');
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 
195 195
             if (isset($events_by_date[$ymd])) {
196 196
                 foreach ($events_by_date[$ymd] as $event) {
197
-                    if (   $event->end <= $workday_starts_ts
197
+                    if ($event->end <= $workday_starts_ts
198 198
                         || $event->start >= $workday_ends_ts) {
199 199
                         // We need not consider this event, it is outside the defined workday
200 200
                         continue;
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                 }
213 213
             }
214 214
             // End of day slot
215
-            if (   $last_end_time < $workday_ends_ts
215
+            if ($last_end_time < $workday_ends_ts
216 216
                 && (($workday_ends_ts - $last_end_time) >= $amount)) {
217 217
                 $slots[] = self::_create_slot($last_end_time, $workday_ends_ts, $last_event);
218 218
             }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -143,7 +143,8 @@
 block discarded – undo
143 143
                 debug_add('person #' . $person->id . 'has no email address, aborting');
144 144
                 return null;
145 145
             }
146
-        } catch (midcom_error $e) {
146
+        }
147
+        catch (midcom_error $e) {
147 148
             return null;
148 149
         }
149 150
 
Please login to merge, or discard this patch.