Passed
Push — master ( b22f9f...a1c8c9 )
by Andreas
09:45
created
lib/midcom/application.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -159,7 +159,8 @@  discard block
 block discarded – undo
159 159
             $response = $this->handle($request);
160 160
             $response->send();
161 161
             $this->terminate($request, $response);
162
-        } catch (Error $e) {
162
+        }
163
+        catch (Error $e) {
163 164
             $this->getHttpKernel()->terminateWithException($e);
164 165
         }
165 166
     }
@@ -210,9 +211,11 @@  discard block
 block discarded – undo
210 211
         try {
211 212
             $response = $this->handle($request, HttpKernelInterface::SUB_REQUEST, false);
212 213
             echo $response->getContent();
213
-        } catch (midcom_error_notfound | midcom_error_forbidden $e) {
214
+        }
215
+        catch (midcom_error_notfound | midcom_error_forbidden $e) {
214 216
             $e->log();
215
-        } finally {
217
+        }
218
+        finally {
216 219
             $this->skip_page_style = $backup;
217 220
             midcom_core_context::leave();
218 221
         }
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.