Passed
Push — master ( be6fbd...8a140a )
by Andreas
24:16
created
lib/midcom/services/cache/module/content.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
         $this->_uncached = $config->get('cache_module_content_uncached');
164 164
         $this->_headers_strategy = $this->get_strategy('cache_module_content_headers_strategy');
165 165
         $this->_headers_strategy_authenticated = $this->get_strategy('cache_module_content_headers_strategy_authenticated');
166
-        $this->_default_lifetime = (int)$config->get('cache_module_content_default_lifetime');
167
-        $this->_default_lifetime_authenticated = (int)$config->get('cache_module_content_default_lifetime_authenticated');
166
+        $this->_default_lifetime = (int) $config->get('cache_module_content_default_lifetime');
167
+        $this->_default_lifetime_authenticated = (int) $config->get('cache_module_content_default_lifetime_authenticated');
168 168
 
169 169
         if ($this->_headers_strategy == 'no-cache') {
170 170
             // we can't call no_cache() here, because it would try to call back to this class via the global getter
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
      */
532 532
     public function write_meta_cache(string $content_id, Request $request, Response $response)
533 533
     {
534
-        if (   $this->_uncached
534
+        if ($this->_uncached
535 535
             || $this->_no_cache) {
536 536
             return;
537 537
         }
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
 
594 594
     public function store_dl_content(int $context, string $dl_cache_data, Request $request)
595 595
     {
596
-        if (   $this->_no_cache
596
+        if ($this->_no_cache
597 597
             || $this->_uncached) {
598 598
             return;
599 599
         }
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
 
628 628
         /* TODO: Doublecheck the way this is handled, now we just don't send it
629 629
          * if headers_strategy implies caching */
630
-        if (   !$response->headers->has('Content-Length')
630
+        if (!$response->headers->has('Content-Length')
631 631
             && !in_array($this->_headers_strategy, ['public', 'private'])) {
632 632
             $response->headers->set("Content-Length", strlen($response->getContent()));
633 633
         }
Please login to merge, or discard this patch.
lib/midcom/core/collector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -142,7 +142,7 @@
 block discarded – undo
142 142
             if ($counter <= $this->_offset) {
143 143
                 continue;
144 144
             }
145
-            if (   $this->_limit
145
+            if ($this->_limit
146 146
                 && $counter > ($this->_offset + $this->_limit)) {
147 147
                 break;
148 148
             }
Please login to merge, or discard this patch.