Passed
Push — master ( 849dc0...25ac3b )
by Fran
03:04
created
src/controller/GeneratorController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function generateModule()
36 36
     {
37
-        Logger::log("Arranque generador de módulos al solicitar " . $this->getRequest()->getRequestUri());
37
+        Logger::log("Arranque generador de módulos al solicitar ".$this->getRequest()->getRequestUri());
38 38
         /* @var $form ConfigForm */
39 39
         $form = new ModuleForm();
40 40
         $form->build();
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
                 $this->gen->createStructureModule($module, false, $type, $apiClass);
66 66
                 Security::getInstance()->setFlash("callback_message", str_replace("%s", $module, t("Módulo %s generado correctamente")));
67 67
                 Security::getInstance()->setFlash("callback_route", $this->getRoute("admin-module", true));
68
-            } catch (Exception $e) {
69
-                Logger::log($e->getMessage() . " [" . $e->getFile() . ":" . $e->getLine() . "]");
68
+            }catch (Exception $e) {
69
+                Logger::log($e->getMessage()." [".$e->getFile().":".$e->getLine()."]");
70 70
                 Security::getInstance()->setFlash("callback_message", htmlentities($e->getMessage()));
71 71
             }
72 72
         }
Please login to merge, or discard this patch.
src/controller/I18nController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
         //Generating the templates translations
45 45
         $translations = $this->tpl->regenerateTemplates();
46 46
 
47
-        $localePath = realpath(BASE_DIR . DIRECTORY_SEPARATOR . 'locale');
48
-        $localePath .= DIRECTORY_SEPARATOR . $locale . DIRECTORY_SEPARATOR . 'LC_MESSAGES' . DIRECTORY_SEPARATOR;
47
+        $localePath = realpath(BASE_DIR.DIRECTORY_SEPARATOR.'locale');
48
+        $localePath .= DIRECTORY_SEPARATOR.$locale.DIRECTORY_SEPARATOR.'LC_MESSAGES'.DIRECTORY_SEPARATOR;
49 49
 
50 50
         //xgettext localizations
51 51
         $translations = array_merge($translations, I18nHelper::findTranslations(SOURCE_DIR, $locale));
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $translations = array_merge($translations, I18nHelper::findTranslations(CACHE_DIR, $locale));
54 54
 
55 55
         $translations[] = "msgfmt {$localePath}translations.po -o {$localePath}translations.mo";
56
-        $translations[] = shell_exec('export PATH=\$PATH:/opt/local/bin:/bin:/sbin; msgfmt ' . $localePath . 'translations.po -o ' . $localePath . 'translations.mo');
56
+        $translations[] = shell_exec('export PATH=\$PATH:/opt/local/bin:/bin:/sbin; msgfmt '.$localePath.'translations.po -o '.$localePath.'translations.mo');
57 57
         return $this->render('translations.html.twig', array(
58 58
             'translations' => $translations,
59 59
         ));
Please login to merge, or discard this patch.
src/services/MigrationService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     public function getConnectionManager(string $module, string $path): array
26 26
     {
27
-        $modulePath = str_replace(CORE_DIR . DIRECTORY_SEPARATOR, '', $path . $module);
27
+        $modulePath = str_replace(CORE_DIR.DIRECTORY_SEPARATOR, '', $path.$module);
28 28
         $generatorConfig = $this->getConfigGenerator($modulePath);
29 29
 
30 30
         $manager = new MigrationManager();
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         $migrationFileName = $manager->getMigrationFileName($timestamp);
116 116
         $migrationClassBody = $manager->getMigrationClassBody($migrationsUp, $migrationsDown, $timestamp);
117 117
 
118
-        $file = $generatorConfig->getSection('paths')['migrationDir'] . DIRECTORY_SEPARATOR . $migrationFileName;
118
+        $file = $generatorConfig->getSection('paths')['migrationDir'].DIRECTORY_SEPARATOR.$migrationFileName;
119 119
         file_put_contents($file, $migrationClassBody);
120 120
 
121 121
         Logger::log(sprintf('"%s" file successfully created.', $file));
Please login to merge, or discard this patch.
src/services/GeneratorService.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function createStructureModule(string $module, bool $force = false, string $type = "", string $apiClass = "", bool $skipMigration = false): void
51 51
     {
52
-        $modPath = CORE_DIR . DIRECTORY_SEPARATOR;
52
+        $modPath = CORE_DIR.DIRECTORY_SEPARATOR;
53 53
         $module = ucfirst($module);
54 54
         $this->createModulePath($module, $modPath);
55 55
         $this->createModulePathTree($module, $modPath);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     private function createModuleBaseFiles($module, $modPath, $force = false, $controllerType = '')
75 75
     {
76
-        $modulePath = $modPath . $module;
76
+        $modulePath = $modPath.$module;
77 77
         $this->generateControllerTemplate($module, $modulePath, $force, $controllerType);
78 78
         $this->generateServiceTemplate($module, $modulePath, $force);
79 79
         $this->generateSchemaTemplate($module, $modulePath, $force);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         $this->genereateAutoloaderTemplate($module, $modulePath, $force);
95 95
         $this->generatePropertiesTemplate($module, $modulePath, $force);
96 96
         $this->generateConfigTemplate($modulePath, $force);
97
-        $this->createModuleModels($module, CORE_DIR . DIRECTORY_SEPARATOR);
97
+        $this->createModuleModels($module, CORE_DIR.DIRECTORY_SEPARATOR);
98 98
     }
99 99
 
100 100
     /**
@@ -114,26 +114,26 @@  discard block
 block discarded – undo
114 114
             "namespace" => preg_replace('/(\\\|\/)/', '\\', $module),
115 115
             "url" => preg_replace('/(\\\|\/)/', '/', $module),
116 116
             "class" => $class,
117
-            "controllerType" => $class . "Base",
117
+            "controllerType" => $class."Base",
118 118
             "is_base" => false
119 119
         ));
120
-        $controller = $this->writeTemplateToFile($controllerBody, $modPath . DIRECTORY_SEPARATOR . "Controller" .
121
-            DIRECTORY_SEPARATOR . "{$class}Controller.php", $force);
120
+        $controller = $this->writeTemplateToFile($controllerBody, $modPath.DIRECTORY_SEPARATOR."Controller".
121
+            DIRECTORY_SEPARATOR."{$class}Controller.php", $force);
122 122
 
123 123
         $controllerBody = $this->tpl->dump("generator/controller.template.twig", array(
124 124
             "module" => $module,
125 125
             "namespace" => preg_replace('/(\\\|\/)/', '\\', $module),
126 126
             "url" => preg_replace('/(\\\|\/)/', '/', $module),
127
-            "class" => $class . "Base",
127
+            "class" => $class."Base",
128 128
             "service" => $class,
129 129
             "controllerType" => $controllerType,
130 130
             "is_base" => true,
131 131
             "domain" => $class,
132 132
         ));
133
-        $controllerBase = $this->writeTemplateToFile($controllerBody, $modPath . DIRECTORY_SEPARATOR . "Controller" .
134
-            DIRECTORY_SEPARATOR . "base" . DIRECTORY_SEPARATOR . "{$class}BaseController.php", true);
133
+        $controllerBase = $this->writeTemplateToFile($controllerBody, $modPath.DIRECTORY_SEPARATOR."Controller".
134
+            DIRECTORY_SEPARATOR."base".DIRECTORY_SEPARATOR."{$class}BaseController.php", true);
135 135
 
136
-        $filename = $modPath . DIRECTORY_SEPARATOR . "Test" . DIRECTORY_SEPARATOR . "{$class}Test.php";
136
+        $filename = $modPath.DIRECTORY_SEPARATOR."Test".DIRECTORY_SEPARATOR."{$class}Test.php";
137 137
         $test = true;
138 138
         if (!file_exists($filename)) {
139 139
             $testTemplate = $this->tpl->dump("generator/testCase.template.twig", array(
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     private function createModuleModels($module, $path)
156 156
     {
157
-        $modulePath = str_replace(CORE_DIR . DIRECTORY_SEPARATOR, '', $path . $module);
157
+        $modulePath = str_replace(CORE_DIR.DIRECTORY_SEPARATOR, '', $path.$module);
158 158
         $configGenerator = $this->getConfigGenerator($modulePath);
159 159
 
160 160
         $this->buildModels($configGenerator);
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
         $configTemplate = $this->tpl->dump("generator/config.propel.template.twig", array(
164 164
             "module" => $module,
165 165
         ));
166
-        $this->writeTemplateToFile($configTemplate, CORE_DIR . DIRECTORY_SEPARATOR . $modulePath . DIRECTORY_SEPARATOR . "Config" .
167
-            DIRECTORY_SEPARATOR . "config.php", true);
166
+        $this->writeTemplateToFile($configTemplate, CORE_DIR.DIRECTORY_SEPARATOR.$modulePath.DIRECTORY_SEPARATOR."Config".
167
+            DIRECTORY_SEPARATOR."config.php", true);
168 168
         Logger::log("Generado config genérico para propel");
169 169
     }
170 170
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
         if ($totalNbTables) {
201 201
             Logger::log(sprintf('%d tables found in all databases.', $totalNbTables));
202
-        } else {
202
+        }else {
203 203
             Logger::log('No table found in all databases');
204 204
         }
205 205
 
@@ -256,8 +256,8 @@  discard block
 block discarded – undo
256 256
     private function generateBaseApiTemplate($module, $modPath, $force = false, $apiClass = "")
257 257
     {
258 258
         $created = true;
259
-        $modelPath = $modPath . $module . DIRECTORY_SEPARATOR . 'Models';
260
-        $apiPath = $modPath . $module . DIRECTORY_SEPARATOR . 'Api';
259
+        $modelPath = $modPath.$module.DIRECTORY_SEPARATOR.'Models';
260
+        $apiPath = $modPath.$module.DIRECTORY_SEPARATOR.'Api';
261 261
         if (file_exists($modelPath)) {
262 262
             $dir = dir($modelPath);
263 263
             $this->generateApiFiles($module, $force, $apiClass, $dir, $apiPath);
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         //Generamos el fichero de configuración
276 276
         Logger::log("Generamos fichero vacío de configuración");
277 277
         return $this->writeTemplateToFile("<?php\n\t",
278
-            $modPath . DIRECTORY_SEPARATOR . "Config" . DIRECTORY_SEPARATOR . "config.php",
278
+            $modPath.DIRECTORY_SEPARATOR."Config".DIRECTORY_SEPARATOR."config.php",
279 279
             $force);
280 280
     }
281 281
 
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
             "db" => $this->config->get("db_name"),
297 297
         ));
298 298
         return $this->writeTemplateToFile($schema,
299
-            $modPath . DIRECTORY_SEPARATOR . "Config" . DIRECTORY_SEPARATOR . "schema.xml",
299
+            $modPath.DIRECTORY_SEPARATOR."Config".DIRECTORY_SEPARATOR."schema.xml",
300 300
             $force);
301 301
     }
302 302
 
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
             "namespace" => preg_replace('/(\\\|\/)/', '', $module),
315 315
         ));
316 316
         return $this->writeTemplateToFile($buildProperties,
317
-            $modPath . DIRECTORY_SEPARATOR . "Config" . DIRECTORY_SEPARATOR . "propel.php",
317
+            $modPath.DIRECTORY_SEPARATOR."Config".DIRECTORY_SEPARATOR."propel.php",
318 318
             $force);
319 319
     }
320 320
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
             "module" => $module,
333 333
         ));
334 334
         return $this->writeTemplateToFile($index,
335
-            $modPath . DIRECTORY_SEPARATOR . "Templates" . DIRECTORY_SEPARATOR . "index.html.twig",
335
+            $modPath.DIRECTORY_SEPARATOR."Templates".DIRECTORY_SEPARATOR."index.html.twig",
336 336
             $force);
337 337
     }
338 338
 
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
         ));
363 363
 
364 364
         return $this->writeTemplateToFile($controller,
365
-            $modPath . DIRECTORY_SEPARATOR . 'base' . DIRECTORY_SEPARATOR . "{$api}BaseApi.php", true);
365
+            $modPath.DIRECTORY_SEPARATOR.'base'.DIRECTORY_SEPARATOR."{$api}BaseApi.php", true);
366 366
     }
367 367
 
368 368
     /**
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
             "package" => $package,
388 388
         ));
389 389
 
390
-        return $this->writeTemplateToFile($controller, $modPath . DIRECTORY_SEPARATOR . "{$api}.php", $force);
390
+        return $this->writeTemplateToFile($controller, $modPath.DIRECTORY_SEPARATOR."{$api}.php", $force);
391 391
     }
392 392
 
393 393
     /**
@@ -404,9 +404,9 @@  discard block
 block discarded – undo
404 404
         $base = $dir->path;
405 405
         while ($file = $dir->read()) {
406 406
             if (!in_array(strtolower($file), ['.', '..', 'base', 'map'])) {
407
-                if (is_dir($base . DIRECTORY_SEPARATOR . $file)) {
408
-                    $this->generateApiFiles($module, $force, $apiClass, dir($base . DIRECTORY_SEPARATOR . $file), $apiPath . DIRECTORY_SEPARATOR . $file, $file);
409
-                } else if (!preg_match('/Query\.php$/i', $file)
407
+                if (is_dir($base.DIRECTORY_SEPARATOR.$file)) {
408
+                    $this->generateApiFiles($module, $force, $apiClass, dir($base.DIRECTORY_SEPARATOR.$file), $apiPath.DIRECTORY_SEPARATOR.$file, $file);
409
+                }else if (!preg_match('/Query\.php$/i', $file)
410 410
                     && !preg_match('/I18n\.php$/i', $file)
411 411
                     && preg_match('/\.php$/i', $file)
412 412
                 ) {
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
             $parts[] = $package;
436 436
         }
437 437
         $parts[] = $filename;
438
-        $namespace = '\\' . implode('\\', $parts);
438
+        $namespace = '\\'.implode('\\', $parts);
439 439
         $reflectorClass = new \ReflectionClass($namespace);
440 440
         $isModel = $reflectorClass->isInstantiable();
441 441
         return $isModel;
Please login to merge, or discard this patch.
src/base/types/Api.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     public function init()
55 55
     {
56 56
         parent::init();
57
-        Logger::log(static::class . ' init', LOG_DEBUG);
57
+        Logger::log(static::class.' init', LOG_DEBUG);
58 58
         $this->domain = $this->getDomain();
59 59
         $this->hydrateRequestData();
60 60
         $this->hydrateOrders();
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         }
64 64
         $this->checkFieldType();
65 65
         $this->setLoaded(true);
66
-        Logger::log(static::class . ' loaded', LOG_DEBUG);
66
+        Logger::log(static::class.' loaded', LOG_DEBUG);
67 67
     }
68 68
 
69 69
     private function checkActions($method)
@@ -159,11 +159,11 @@  discard block
 block discarded – undo
159 159
                 $status = 200;
160 160
                 $saved = TRUE;
161 161
                 $model = $this->model->toArray($this->fieldType ?: TableMap::TYPE_PHPNAME, true, [], true);
162
-            } else {
162
+            }else {
163 163
                 $message = t('No se ha podido guardar el modelo seleccionado');
164 164
             }
165
-        } catch (\Exception $e) {
166
-            $message = t('Ha ocurrido un error intentando guardar el elemento: ') . '<br>' . $e->getMessage();
165
+        }catch (\Exception $e) {
166
+            $message = t('Ha ocurrido un error intentando guardar el elemento: ').'<br>'.$e->getMessage();
167 167
             $context = [];
168 168
             if (null !== $e->getPrevious()) {
169 169
                 $context[] = $e->getPrevious()->getMessage();
@@ -201,10 +201,10 @@  discard block
 block discarded – undo
201 201
                     $updated = TRUE;
202 202
                     $status = 200;
203 203
                     $model = $this->model->toArray($this->fieldType ?: TableMap::TYPE_PHPNAME, true, [], true);
204
-                } else {
204
+                }else {
205 205
                     $message = t('Ha ocurrido un error intentando actualizar el elemento, por favor revisa los logs');
206 206
                 }
207
-            } catch (\Exception $e) {
207
+            }catch (\Exception $e) {
208 208
                 $message = t('Ha ocurrido un error intentando actualizar el elemento, por favor revisa los logs');
209 209
                 $context = [];
210 210
                 if (null !== $e->getPrevious()) {
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
                 }
213 213
                 Logger::log($e->getMessage(), LOG_CRIT, $context);
214 214
             }
215
-        } else {
215
+        }else {
216 216
             $message = t('No se ha encontrado el modelo al que se hace referencia para actualizar');
217 217
         }
218 218
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
                     $this->model->delete($this->con);
247 247
                     $deleted = TRUE;
248 248
                 }
249
-            } catch (\Exception $e) {
249
+            }catch (\Exception $e) {
250 250
                 $context = [];
251 251
                 if (null !== $e->getPrevious()) {
252 252
                     $context[] = $e->getPrevious()->getMessage();
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
             $this->saveBulk();
279 279
             $saved = true;
280 280
             $status = 200;
281
-        } catch (\Exception $e) {
281
+        }catch (\Exception $e) {
282 282
             Logger::log($e->getMessage(), LOG_CRIT, $this->getRequest()->getData());
283 283
             $message = t('Bulk insert rolled back');
284 284
         }
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
             if (null !== $this->list) {
311 311
                 if (array_key_exists(self::API_FIELDS_RESULT_FIELD, $this->query) && Config::getParam('api.field.types')) {
312 312
                     $return = $this->extractDataWithFormat();
313
-                } else {
313
+                }else {
314 314
                     $return = $this->list->toArray(null, false, $this->fieldType ?: TableMap::TYPE_PHPNAME, false);
315 315
                 }
316 316
                 $total = 0;
@@ -323,8 +323,8 @@  discard block
 block discarded – undo
323 323
                     $pages = 1;
324 324
                 }
325 325
             }
326
-        } catch (\Exception $e) {
327
-            Logger::log(get_class($this) . ': ' . $e->getMessage(), LOG_ERR);
326
+        }catch (\Exception $e) {
327
+            Logger::log(get_class($this).': '.$e->getMessage(), LOG_ERR);
328 328
         }
329 329
 
330 330
         return array($return, $total, $pages);
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
         $return = array();
343 343
         if (NULL === $model || !method_exists($model, 'toArray')) {
344 344
             $code = 404;
345
-        } else {
345
+        }else {
346 346
             $return = $model->toArray($this->fieldType ?: TableMap::TYPE_PHPNAME, true, [], true);
347 347
         }
348 348
 
Please login to merge, or discard this patch.
src/base/types/Controller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             $vars['__profiling__'] = Inspector::getStats();
43 43
         }
44 44
         $domain = (null === $domain) ? $this->getDomain() : $domain;
45
-        return $this->tpl->render($domain . $template, $vars, $cookies);
45
+        return $this->tpl->render($domain.$template, $vars, $cookies);
46 46
     }
47 47
 
48 48
     /**
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     {
74 74
         $vars['__menu__'] = $this->getMenu();
75 75
         $domain = $domain ?: $this->getDomain();
76
-        return $this->tpl->dump($domain . $template, $vars);
76
+        return $this->tpl->dump($domain.$template, $vars);
77 77
     }
78 78
 
79 79
     /**
Please login to merge, or discard this patch.
src/base/types/traits/CurlTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
     {
99 99
         $this->params = [];
100 100
         $this->headers = [];
101
-        Logger::log('Context service for ' . static::class . ' cleared!');
101
+        Logger::log('Context service for '.static::class.' cleared!');
102 102
         $this->closeConnection();
103 103
     }
104 104
 
Please login to merge, or discard this patch.
src/base/types/traits/OutputTrait.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                 $this->setStatusCode(Template::STATUS_OK);
126 126
                 break;
127 127
             default:
128
-                $this->setStatusCode('HTTP/1.0 ' . ($status ?: 200));
128
+                $this->setStatusCode('HTTP/1.0 '.($status ?: 200));
129 129
                 break;
130 130
         }
131 131
         return $this;
@@ -139,11 +139,11 @@  discard block
 block discarded – undo
139 139
     private function setReponseHeaders($contentType = 'text/html', array $cookies = array())
140 140
     {
141 141
         $powered = Config::getParam('poweredBy', 'PSFS');
142
-        header('X-Powered-By: ' . $powered);
142
+        header('X-Powered-By: '.$powered);
143 143
         ResponseHelper::setStatusHeader($this->getStatusCode());
144 144
         ResponseHelper::setAuthHeaders($this->isPublicZone());
145 145
         ResponseHelper::setCookieHeaders($cookies);
146
-        header('Content-type: ' . $contentType);
146
+        header('Content-type: '.$contentType);
147 147
 
148 148
     }
149 149
 
@@ -161,16 +161,16 @@  discard block
 block discarded – undo
161 161
             Logger::log('Start output response');
162 162
             ob_start();
163 163
             $this->setReponseHeaders($contentType, $cookies);
164
-            header('Content-length: ' . strlen($output));
165
-            header('CRC: ' . crc32($output));
164
+            header('Content-length: '.strlen($output));
165
+            header('CRC: '.crc32($output));
166 166
 
167 167
             $needCache = Cache::needCache();
168 168
             $cache = Cache::getInstance();
169 169
             list($path, $cacheDataName) = $cache->getRequestCacheHash();
170 170
             if (null !== $cacheDataName && false !== $needCache && $this->getStatusCode() === Template::STATUS_OK) {
171 171
                 Logger::log('Saving output response into cache');
172
-                $cache->storeData('json' . DIRECTORY_SEPARATOR . $path . $cacheDataName, $output);
173
-                $cache->storeData('json' . DIRECTORY_SEPARATOR . $path . $cacheDataName . '.headers', headers_list(), Cache::JSON);
172
+                $cache->storeData('json'.DIRECTORY_SEPARATOR.$path.$cacheDataName, $output);
173
+                $cache->storeData('json'.DIRECTORY_SEPARATOR.$path.$cacheDataName.'.headers', headers_list(), Cache::JSON);
174 174
             } elseif (Request::getInstance()->getMethod() !== 'GET') {
175 175
                 $cache->flushCache();
176 176
             }
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             ob_end_clean();
181 181
             Logger::log('End output response');
182 182
             $this->closeRender();
183
-        } else {
183
+        }else {
184 184
             return $output;
185 185
         }
186 186
     }
@@ -193,11 +193,11 @@  discard block
 block discarded – undo
193 193
         Logger::log('Close template render');
194 194
         $uri = Request::requestUri();
195 195
         Security::getInstance()->setSessionKey('lastRequest', array(
196
-            'url' => Request::getInstance()->getRootUrl() . $uri,
196
+            'url' => Request::getInstance()->getRootUrl().$uri,
197 197
             'ts' => microtime(true),
198 198
         ));
199 199
         Security::getInstance()->updateSession();
200
-        Logger::log('End request: ' . $uri, LOG_INFO);
200
+        Logger::log('End request: '.$uri, LOG_INFO);
201 201
         exit;
202 202
     }
203 203
 
@@ -236,17 +236,17 @@  discard block
 block discarded – undo
236 236
         /////////////////////////////////////////////////////////////
237 237
         // Date in the past sets the value to already have been expired.
238 238
         header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
239
-        header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
239
+        header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
240 240
         header('Cache-Control: no-store, no-cache, must-revalidate'); // HTTP/1.1
241 241
         header('Cache-Control: pre-check=0, post-check=0, max-age=0'); // HTTP/1.1
242 242
         header('Pragma: no-cache');
243 243
         header('Expires: 0');
244 244
         header('Content-Transfer-Encoding: binary');
245
-        header('Content-type: ' . $content);
246
-        header('Content-length: ' . strlen($data));
247
-        header('Content-Disposition: attachment; filename="' . $filename . '"');
245
+        header('Content-type: '.$content);
246
+        header('Content-length: '.strlen($data));
247
+        header('Content-Disposition: attachment; filename="'.$filename.'"');
248 248
         header('Access-Control-Expose-Headers: Filename');
249
-        header('Filename: ' . $filename);
249
+        header('Filename: '.$filename);
250 250
         echo $data;
251 251
         ob_flush();
252 252
         ob_end_clean();
Please login to merge, or discard this patch.
src/base/types/traits/JsonTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         }
50 50
 
51 51
         if (Config::getParam('angular.protection', false)) {
52
-            $data = ")]}',\n" . $data;
52
+            $data = ")]}',\n".$data;
53 53
         }
54 54
         $this->setStatus($statusCode);
55 55
         ResponseHelper::setDebugHeaders([]);
Please login to merge, or discard this patch.