Passed
Push — master ( a1c8c9...768d56 )
by Andreas
09:44
created
src/midcom/console/command/cleanup/privileges.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,8 @@
 block discarded – undo
62 62
                 try {
63 63
                     \midgard_object_class::get_object_by_guid($priv->objectguid);
64 64
                     $seen_parents[$priv->objectguid] = true;
65
-                } catch (\Throwable) {
65
+                }
66
+                catch (\Throwable) {
66 67
                     $seen_parents[$priv->objectguid] = false;
67 68
                 }
68 69
             }
Please login to merge, or discard this patch.
src/midcom/console/command/cleanup/blobdir.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,8 @@
 block discarded – undo
104 104
         $qb->add_constraint("location", "=", $location);
105 105
         try {
106 106
             $attachments = $qb->execute();
107
-        } catch (\Exception) {
107
+        }
108
+        catch (\Exception) {
108 109
             return null;
109 110
         }
110 111
         if (empty($attachments)) {
Please login to merge, or discard this patch.
lib/midcom/services/i18n/formatter.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
         $this->language = $language;
24 24
     }
25 25
 
26
-    public function number(int|float $value, int $precision = 2)
26
+    public function number(int | float $value, int $precision = 2)
27 27
     {
28 28
         // The fallback implementation in Intl only supports DECIMAL, so we hardcode the style here..
29 29
         $formatter = new NumberFormatter($this->get_locale(), NumberFormatter::DECIMAL);
@@ -31,24 +31,24 @@  discard block
 block discarded – undo
31 31
         return $formatter->format($value);
32 32
     }
33 33
 
34
-    public function date(int|string|null|DateTimeInterface $value = null, int|string $dateformat = 'medium')
34
+    public function date(int | string | null | DateTimeInterface $value = null, int | string $dateformat = 'medium')
35 35
     {
36 36
         return $this->datetime($value, $dateformat, IntlDateFormatter::NONE);
37 37
     }
38 38
 
39
-    public function time(int|string|null|DateTimeInterface $value = null, int|string $timeformat = 'short')
39
+    public function time(int | string | null | DateTimeInterface $value = null, int | string $timeformat = 'short')
40 40
     {
41 41
         return $this->datetime($value, IntlDateFormatter::NONE, $timeformat);
42 42
     }
43 43
 
44
-    public function datetime(int|string|null|DateTimeInterface $value = null, int|string $dateformat = 'medium', int|string $timeformat = 'short')
44
+    public function datetime(int | string | null | DateTimeInterface $value = null, int | string $dateformat = 'medium', int | string $timeformat = 'short')
45 45
     {
46 46
         $value ??= time();
47 47
         $formatter = new IntlDateFormatter($this->get_locale(), $this->constant($dateformat), $this->constant($timeformat));
48 48
         return $formatter->format($value);
49 49
     }
50 50
 
51
-    public function customdate(int|string|DateTimeInterface $value, string $pattern)
51
+    public function customdate(int | string | DateTimeInterface $value, string $pattern)
52 52
     {
53 53
         $formatter = new IntlDateFormatter($this->get_locale(), IntlDateFormatter::FULL, IntlDateFormatter::FULL);
54 54
         $formatter->setPattern($pattern);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         return $ranger->format($start, $end);
71 71
     }
72 72
 
73
-    private function constant(int|string $input) : int
73
+    private function constant(int | string $input) : int
74 74
     {
75 75
         if (is_int($input)) {
76 76
             return $input;
Please login to merge, or discard this patch.
lib/midcom/services/cache/module/content.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
         $this->_uncached = $config->get('cache_module_content_uncached');
143 143
         $this->_headers_strategy = $this->get_strategy('cache_module_content_headers_strategy');
144 144
         $this->_headers_strategy_authenticated = $this->get_strategy('cache_module_content_headers_strategy_authenticated');
145
-        $this->_default_lifetime = (int)$config->get('cache_module_content_default_lifetime');
146
-        $this->_default_lifetime_authenticated = (int)$config->get('cache_module_content_default_lifetime_authenticated');
145
+        $this->_default_lifetime = (int) $config->get('cache_module_content_default_lifetime');
146
+        $this->_default_lifetime_authenticated = (int) $config->get('cache_module_content_default_lifetime_authenticated');
147 147
 
148 148
         if ($this->_headers_strategy == 'no-cache') {
149 149
             // we can't call no_cache() here, because it would try to call back to this class via the global getter
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
      */
509 509
     private function write_meta_cache(string $content_id, Request $request, Response $response)
510 510
     {
511
-        if (   $this->_uncached
511
+        if ($this->_uncached
512 512
             || $this->_no_cache) {
513 513
             return;
514 514
         }
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 
574 574
     private function store_dl_content(Request $request, Response $response)
575 575
     {
576
-        if (   $this->_no_cache
576
+        if ($this->_no_cache
577 577
             || $this->_uncached) {
578 578
             return;
579 579
         }
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
 
616 616
         /* TODO: Doublecheck the way this is handled, now we just don't send it
617 617
          * if headers_strategy implies caching */
618
-        if (   !$response->headers->has('Content-Length')
618
+        if (!$response->headers->has('Content-Length')
619 619
             && !in_array($this->_headers_strategy, ['public', 'private'])) {
620 620
             $response->headers->set("Content-Length", strlen($response->getContent()));
621 621
         }
Please login to merge, or discard this patch.