Completed
Push — 4.0 ( a1234e...3b08f9 )
by Marco
03:21
created
src/Comodojo/Dispatcher/Response/Model.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,9 @@
 block discarded – undo
79 79
         if ( $request->method->get() == 'HEAD' && !in_array($status, array(100,101,102,204,304)) ) {
80 80
             $length = $this->content->length();
81 81
             $this->content->set(null);
82
-            if ($length) $this->headers->set('Content-Length', $length);
82
+            if ($length) {
83
+                $this->headers->set('Content-Length', $length);
84
+            }
83 85
         }
84 86
 
85 87
         if ($this->headers->get('Transfer-Encoding') != null) {
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Response/Status.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,9 @@
 block discarded – undo
62 62
 
63 63
     public function description($code=null) {
64 64
 
65
-        if ( is_null($code) ) return $this->codes->getMessage($this->status_code);
65
+        if ( is_null($code) ) {
66
+            return $this->codes->getMessage($this->status_code);
67
+        }
66 68
         
67 69
         return $this->codes->getMessage($code);
68 70
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Response/Preprocessor/Status201.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,9 @@
 block discarded – undo
30 30
 
31 31
         $location = $this->response->location->get();
32 32
 
33
-        if ( $location != null ) $this->response->headers->set("Location: ".$location);
33
+        if ( $location != null ) {
34
+            $this->response->headers->set("Location: ".$location);
35
+        }
34 36
 
35 37
         parent::consolidate();
36 38
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Dispatcher.php 1 patch
Braces   +11 added lines, -4 removed lines patch added patch discarded remove patch
@@ -183,7 +183,9 @@  discard block
 block discarded – undo
183 183
 
184 184
         $cache = $this->cache->setNamespace('dispatcherservice')->get($name);
185 185
 
186
-        if ( is_null($cache) ) return false;
186
+        if ( is_null($cache) ) {
187
+            return false;
188
+        }
187 189
 
188 190
         $this->response->import($cache);
189 191
 
@@ -220,7 +222,9 @@  discard block
 block discarded – undo
220 222
 
221 223
         if ( !empty($params) && is_array($params) ) {
222 224
 
223
-            foreach($params as $name=>$value) $this->response->headers->set($name, $value);
225
+            foreach($params as $name=>$value) {
226
+                $this->response->headers->set($name, $value);
227
+            }
224 228
         }
225 229
 
226 230
     }
@@ -272,8 +276,11 @@  discard block
 block discarded – undo
272 276
 
273 277
         $this->logger->debug("Dispatcher run-cycle ends.");
274 278
 
275
-        if ( function_exists('fastcgi_finish_request') ) fastcgi_finish_request();
276
-        else ob_end_clean();
279
+        if ( function_exists('fastcgi_finish_request') ) {
280
+            fastcgi_finish_request();
281
+        } else {
282
+            ob_end_clean();
283
+        }
277 284
 
278 285
         return $return;
279 286
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Output/Processor.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,9 @@
 block discarded – undo
61 61
 
62 62
         $status = $this->response->status->get();
63 63
 
64
-        if ( !$this->codes->exists($status) ) throw new Exception("Invalid HTTP status code in response");
64
+        if ( !$this->codes->exists($status) ) {
65
+            throw new Exception("Invalid HTTP status code in response");
66
+        }
65 67
 
66 68
         $message = $this->codes->getMessage($status);
67 69
 
Please login to merge, or discard this patch.
src/Comodojo/Dispatcher/Components/HttpStatusCodes.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,9 @@
 block discarded – undo
102 102
     
103 103
     public function getMessage($code) {
104 104
         
105
-        if ( $this->exists($code) ) return $this->code[$code];
105
+        if ( $this->exists($code) ) {
106
+            return $this->code[$code];
107
+        }
106 108
         
107 109
         throw new Exception("Invalid HTTP status code $code");
108 110
         
Please login to merge, or discard this patch.