Passed
Push — master ( 27021d...955e1e )
by Fran
04:20
created
src/base/types/traits/OutputTrait.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 $this->setStatusCode(Template::STATUS_OK);
121 121
                 break;
122 122
             default:
123
-                $this->setStatusCode('HTTP/1.0 ' . $status ?: 200);
123
+                $this->setStatusCode('HTTP/1.0 '.$status ?: 200);
124 124
                 break;
125 125
         }
126 126
         return $this;
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         ResponseHelper::setStatusHeader($this->getStatusCode());
139 139
         ResponseHelper::setAuthHeaders($this->isPublicZone());
140 140
         ResponseHelper::setCookieHeaders($cookies);
141
-        header('Content-type: ' . $contentType);
141
+        header('Content-type: '.$contentType);
142 142
 
143 143
     }
144 144
 
@@ -154,15 +154,15 @@  discard block
 block discarded – undo
154 154
         Logger::log('Start output response');
155 155
         ob_start();
156 156
         $this->setReponseHeaders($contentType, $cookies);
157
-        header('Content-length: ' . strlen($output));
157
+        header('Content-length: '.strlen($output));
158 158
 
159 159
         $needCache = Cache::needCache();
160 160
         if (false !== $needCache && $this->getStatusCode() === Template::STATUS_OK) {
161 161
             $cache = Cache::getInstance();
162 162
             Logger::log('Saving output response into cache');
163 163
             list($path, $cacheDataName) = $cache->getRequestCacheHash();
164
-            $cache->storeData("json" . DIRECTORY_SEPARATOR . $path . $cacheDataName, $output);
165
-            $cache->storeData("json" . DIRECTORY_SEPARATOR . $path . $cacheDataName . ".headers", headers_list(), Cache::JSON);
164
+            $cache->storeData("json".DIRECTORY_SEPARATOR.$path.$cacheDataName, $output);
165
+            $cache->storeData("json".DIRECTORY_SEPARATOR.$path.$cacheDataName.".headers", headers_list(), Cache::JSON);
166 166
         }
167 167
         echo $output;
168 168
 
@@ -180,11 +180,11 @@  discard block
 block discarded – undo
180 180
         Logger::log('Close template render');
181 181
         $uri = Request::requestUri();
182 182
         Security::getInstance()->setSessionKey("lastRequest", array(
183
-            "url" => Request::getInstance()->getRootUrl() . $uri,
183
+            "url" => Request::getInstance()->getRootUrl().$uri,
184 184
             "ts" => microtime(true),
185 185
         ));
186 186
         Security::getInstance()->updateSession();
187
-        Logger::log('End request: ' . $uri, LOG_INFO);
187
+        Logger::log('End request: '.$uri, LOG_INFO);
188 188
         exit;
189 189
     }
190 190
 
@@ -222,15 +222,15 @@  discard block
 block discarded – undo
222 222
         /////////////////////////////////////////////////////////////
223 223
         // Date in the past sets the value to already have been expired.
224 224
         header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
225
-        header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
225
+        header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
226 226
         header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
227 227
         header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
228 228
         header("Pragma: no-cache");
229 229
         header("Expires: 0");
230 230
         header('Content-Transfer-Encoding: none');
231
-        header("Content-type: " . $content);
232
-        header("Content-length: " . strlen($data));
233
-        header('Content-Disposition: attachment; filename="' . $filename . '"');
231
+        header("Content-type: ".$content);
232
+        header("Content-length: ".strlen($data));
233
+        header('Content-Disposition: attachment; filename="'.$filename.'"');
234 234
         echo $data;
235 235
         ob_flush();
236 236
         ob_end_clean();
Please login to merge, or discard this patch.