Passed
Push — master ( 05b81b...989dc8 )
by Andreas
12:34
created
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.
lib/midcom/services/rcs/main.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,8 @@
 block discarded – undo
65 65
         $backend = $this->load_backend($object);
66 66
         try {
67 67
             $backend->update(midcom::get()->auth->user->id ?? 'NOBODY', $object->get_rcs_message());
68
-        } catch (midcom_error $e) {
68
+        }
69
+        catch (midcom_error $e) {
69 70
             debug_add('RCS: Could not save file!');
70 71
             $e->log();
71 72
         }
Please login to merge, or discard this patch.
lib/midcom/helper/reflector/copy.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
             $target->$name = $value;
139 139
         }
140 140
 
141
-        if (   $this->recursive
141
+        if ($this->recursive
142 142
             && $parent_property = self::get_parent_property($source)) {
143 143
 
144 144
             // Copy the link to parent
Please login to merge, or discard this patch.
src/midcom/datamanager/validation/phpValidator.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
         // enable them everywhere with -e and mask them instead
33 33
         $input = str_replace(
34 34
             ['\a', '\b', '\c', '\e', '\f', '\n', '\r', '\t', '\v'],
35
-            [ '\\\a', '\\\b', '\\\c', '\\\e', '\\\f', '\\\n', '\\\r', '\\\t', '\\\v'],
35
+            ['\\\a', '\\\b', '\\\c', '\\\e', '\\\f', '\\\n', '\\\r', '\\\t', '\\\v'],
36 36
             $input
37 37
         );
38 38
         exec(sprintf('echo -e %s | php -l', escapeshellarg($input)) . " 2>&1", $parse_results, $return_status);
Please login to merge, or discard this patch.