Passed
Push — master ( aba63f...2ff097 )
by Fran
03:32
created
src/base/Template.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         $dump = '';
118 118
         try {
119 119
             $dump = $this->tpl->render($tpl, $vars);
120
-        } catch (\Exception $e) {
120
+        }catch (\Exception $e) {
121 121
             Logger::log($e->getMessage(), LOG_ERR);
122 122
         }
123 123
         return $dump;
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     public function regenerateTemplates()
145 145
     {
146 146
         $this->generateTemplatesCache();
147
-        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR . DIRECTORY_SEPARATOR . 'domains.json', Cache::JSON, true);
147
+        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR.DIRECTORY_SEPARATOR.'domains.json', Cache::JSON, true);
148 148
         $translations = [];
149 149
         if (is_array($domains)) {
150 150
             $translations = $this->parsePathTranslations($domains);
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
             // force compilation
167 167
             if ($file->isFile()) {
168 168
                 try {
169
-                    $this->tpl->load(str_replace($tplDir . '/', '', $file));
170
-                } catch (\Exception $e) {
169
+                    $this->tpl->load(str_replace($tplDir.'/', '', $file));
170
+                }catch (\Exception $e) {
171 171
                     Logger::log($e->getMessage(), LOG_ERR, ['file' => $e->getFile(), 'line' => $e->getLine()]);
172 172
                 }
173 173
             }
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             'getFlash' => TemplateFunctions::GET_FLASH_FUNCTION,
229 229
             'getQuery' => TemplateFunctions::GET_QUERY_FUNCTION,
230 230
         ];
231
-        foreach($functions as $name => $function) {
231
+        foreach ($functions as $name => $function) {
232 232
             $this->addTemplateFunction($name, $function);
233 233
         }
234 234
     }
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      */
248 248
     private function loadDomains()
249 249
     {
250
-        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR . DIRECTORY_SEPARATOR . 'domains.json', Cache::JSON, true);
250
+        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR.DIRECTORY_SEPARATOR.'domains.json', Cache::JSON, true);
251 251
         if (null !== $domains) {
252 252
             foreach ($domains as $domain => $paths) {
253 253
                 $this->addPath($paths['template'], preg_replace('/(@|\/)/', '', $domain));
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
     {
263 263
         $loader = new FilesystemLoader(GeneratorHelper::getTemplatePath());
264 264
         $this->tpl = new Environment($loader, array(
265
-            'cache' => CACHE_DIR . DIRECTORY_SEPARATOR . 'twig',
265
+            'cache' => CACHE_DIR.DIRECTORY_SEPARATOR.'twig',
266 266
             'debug' => (bool)$this->debug,
267 267
             'auto_reload' => Config::getParam('twig.autoreload', TRUE),
268 268
         ));
Please login to merge, or discard this patch.