Passed
Push — master ( 4109ae...d9c7de )
by Fran
03:26
created
src/base/types/traits/OutputTrait.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         ResponseHelper::setStatusHeader($this->getStatusCode());
133 133
         ResponseHelper::setAuthHeaders($this->isPublicZone());
134 134
         ResponseHelper::setCookieHeaders($cookies);
135
-        header('Content-type: ' . $contentType);
135
+        header('Content-type: '.$contentType);
136 136
 
137 137
     }
138 138
 
@@ -148,15 +148,15 @@  discard block
 block discarded – undo
148 148
         Logger::log('Start output response');
149 149
         ob_start();
150 150
         $this->setReponseHeaders($contentType, $cookies);
151
-        header('Content-length: ' . strlen($output));
151
+        header('Content-length: '.strlen($output));
152 152
 
153 153
         $needCache = Cache::needCache();
154 154
         if (false !== $needCache && $this->getStatusCode() === Template::STATUS_OK) {
155 155
             $cache = Cache::getInstance();
156 156
             Logger::log('Saving output response into cache');
157 157
             list($path, $cacheDataName) = $cache->getRequestCacheHash();
158
-            $cache->storeData("json" . DIRECTORY_SEPARATOR . $path . $cacheDataName, $output);
159
-            $cache->storeData("json" . DIRECTORY_SEPARATOR . $path . $cacheDataName . ".headers", headers_list(), Cache::JSON);
158
+            $cache->storeData("json".DIRECTORY_SEPARATOR.$path.$cacheDataName, $output);
159
+            $cache->storeData("json".DIRECTORY_SEPARATOR.$path.$cacheDataName.".headers", headers_list(), Cache::JSON);
160 160
         }
161 161
         echo $output;
162 162
 
@@ -174,11 +174,11 @@  discard block
 block discarded – undo
174 174
         Logger::log('Close template render');
175 175
         $uri = Request::requestUri();
176 176
         Security::getInstance()->setSessionKey("lastRequest", array(
177
-            "url" => Request::getInstance()->getRootUrl() . $uri,
177
+            "url" => Request::getInstance()->getRootUrl().$uri,
178 178
             "ts" => microtime(true),
179 179
         ));
180 180
         Security::getInstance()->updateSession();
181
-        Logger::log('End request: ' . $uri, LOG_INFO);
181
+        Logger::log('End request: '.$uri, LOG_INFO);
182 182
         exit;
183 183
     }
184 184
 
@@ -216,15 +216,15 @@  discard block
 block discarded – undo
216 216
         /////////////////////////////////////////////////////////////
217 217
         // Date in the past sets the value to already have been expired.
218 218
         header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
219
-        header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
219
+        header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
220 220
         header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
221 221
         header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
222 222
         header("Pragma: no-cache");
223 223
         header("Expires: 0");
224 224
         header('Content-Transfer-Encoding: none');
225
-        header("Content-type: " . $content);
226
-        header("Content-length: " . strlen($data));
227
-        header('Content-Disposition: attachment; filename="' . $filename . '"');
225
+        header("Content-type: ".$content);
226
+        header("Content-length: ".strlen($data));
227
+        header('Content-Disposition: attachment; filename="'.$filename.'"');
228 228
         echo $data;
229 229
         ob_flush();
230 230
         ob_end_clean();
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@
 block discarded – undo
202 202
 
203 203
     /**
204 204
      * Método que fuerza la descarga de un fichero
205
-     * @param $data
205
+     * @param string $data
206 206
      * @param string $content
207 207
      * @param string $filename
208 208
      * @return mixed
Please login to merge, or discard this patch.
src/controller/DocumentorController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         $download = $this->getRequest()->get('download') ?: false;
34 34
 
35 35
         $module = $this->srv->getModules($domain);
36
-        if(empty($module)) {
36
+        if (empty($module)) {
37 37
             return Router::getInstance()->httpNotFound(null, true);
38 38
         }
39 39
         switch (strtolower($type)) {
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
         ini_restore('max_execution_time');
54 54
         ini_restore('memory_limit');
55 55
 
56
-        if($download && $type === ApiController::SWAGGER_DOC) {
56
+        if ($download && $type === ApiController::SWAGGER_DOC) {
57 57
             return $this->download(\GuzzleHttp\json_encode($doc), 'application/json', 'swagger.json');
58
-        } elseif($type === ApiController::HTML_DOC) {
58
+        } elseif ($type === ApiController::HTML_DOC) {
59 59
             return $this->render('documentation.html.twig', ["data" => json_encode($doc)]);
60
-        } else {
60
+        }else {
61 61
             return $this->json($doc, 200);
62 62
         }
63 63
     }
Please login to merge, or discard this patch.