Passed
Push — master ( c82035...9f9933 )
by Fran
02:32
created
src/controller/UserController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                 Logger::log('Configuration saved successful');
66 66
                 Security::getInstance()->setFlash("callback_message", t("Usuario agregado correctamente"));
67 67
                 Security::getInstance()->setFlash("callback_route", Router::getInstance()->getRoute("admin", true));
68
-            } else {
68
+            }else {
69 69
                 throw new ConfigException(t('Error al guardar los administradores, prueba a cambiar los permisos'));
70 70
             }
71 71
         }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         if ($this->isAdmin()) {
101 101
             $this->redirect('admin');
102
-        } else {
102
+        }else {
103 103
             return Admin::staticAdminLogon();
104 104
         }
105 105
     }
Please login to merge, or discard this patch.
src/base/types/helpers/ResponseHelper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
             Logger::log('Adding debug headers to render response');
77 77
             $vars["__DEBUG__"]["includes"] = get_included_files();
78 78
             $vars["__DEBUG__"]["trace"] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
79
-            header('X-PSFS-DEBUG-TS: ' . Dispatcher::getInstance()->getTs() . ' s');
80
-            header('X-PSFS-DEBUG-MEM: ' . Dispatcher::getInstance()->getMem('MBytes') . ' MBytes');
81
-            header('X-PSFS-DEBUG-FILES: ' . count(get_included_files()) . ' files opened');
79
+            header('X-PSFS-DEBUG-TS: '.Dispatcher::getInstance()->getTs().' s');
80
+            header('X-PSFS-DEBUG-MEM: '.Dispatcher::getInstance()->getMem('MBytes').' MBytes');
81
+            header('X-PSFS-DEBUG-FILES: '.count(get_included_files()).' files opened');
82 82
         }
83 83
 
84 84
         return $vars;
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     public static function httpNotFound(Exception $exception = NULL, $isJson = false)
95 95
     {
96
-        if(self::isTest()) {
96
+        if (self::isTest()) {
97 97
             return 404;
98 98
         }
99 99
         Inspector::stats('[Router] Throw not found exception', Inspector::SCOPE_DEBUG);
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
         }
109 109
 
110 110
         $notFoundRoute = Config::getParam('route.404');
111
-        if(null !== $notFoundRoute) {
111
+        if (null !== $notFoundRoute) {
112 112
             Request::getInstance()->redirect(Router::getInstance()->getRoute($notFoundRoute, true));
113
-        } else {
113
+        }else {
114 114
             return $template->render('error.html.twig', array(
115 115
                 'exception' => $exception,
116 116
                 'trace' => $exception->getTraceAsString(),
Please login to merge, or discard this patch.
src/base/types/traits/Router/SluggerTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
     {
51 51
         $this->generateSlugs();
52 52
         GeneratorHelper::createDir(CONFIG_DIR);
53
-        Cache::getInstance()->storeData(CONFIG_DIR . DIRECTORY_SEPARATOR . 'urls.json', [$this->routing, $this->getSlugs()], Cache::JSON, TRUE);
53
+        Cache::getInstance()->storeData(CONFIG_DIR.DIRECTORY_SEPARATOR.'urls.json', [$this->routing, $this->getSlugs()], Cache::JSON, TRUE);
54 54
 
55 55
         return $this;
56 56
     }
Please login to merge, or discard this patch.
src/base/types/traits/Router/ModulesTrait.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
         if ($files->hasResults()) {
55 55
             foreach ($files->getIterator() as $file) {
56 56
                 if ($namespace !== Router::PSFS_BASE_NAMESPACE && method_exists($file, 'getRelativePathname')) {
57
-                    $filename = '\\' . str_replace('/', '\\', str_replace($origen, '', $file->getRelativePathname()));
58
-                } else {
57
+                    $filename = '\\'.str_replace('/', '\\', str_replace($origen, '', $file->getRelativePathname()));
58
+                }else {
59 59
                     $filename = str_replace('/', '\\', str_replace($origen, '', $file->getPathname()));
60 60
                 }
61
-                $routing = $this->addRouting($namespace . str_replace('.php', '', $filename), $routing, $namespace);
61
+                $routing = $this->addRouting($namespace.str_replace('.php', '', $filename), $routing, $namespace);
62 62
             }
63 63
         }
64 64
         $this->initializeFinder();
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             if (!is_array($this->domains)) {
112 112
                 $this->domains = [];
113 113
             }
114
-            $domain = '@' . $class->getConstant('DOMAIN') . '/';
114
+            $domain = '@'.$class->getConstant('DOMAIN').'/';
115 115
             if (!array_key_exists($domain, $this->domains)) {
116 116
                 $this->domains[$domain] = RouterHelper::extractDomainInfo($class, $domain);
117 117
             }
@@ -138,11 +138,11 @@  discard block
 block discarded – undo
138 138
     private function loadExternalAutoloader($hydrateRoute, SplFileInfo $modulePath, $externalModulePath, &$routing = [])
139 139
     {
140 140
         $extModule = $modulePath->getBasename();
141
-        $moduleAutoloader = realpath($externalModulePath . DIRECTORY_SEPARATOR . $extModule . DIRECTORY_SEPARATOR . 'autoload.php');
141
+        $moduleAutoloader = realpath($externalModulePath.DIRECTORY_SEPARATOR.$extModule.DIRECTORY_SEPARATOR.'autoload.php');
142 142
         if (file_exists($moduleAutoloader)) {
143 143
             include_once $moduleAutoloader;
144 144
             if ($hydrateRoute) {
145
-                $routing = $this->inspectDir($externalModulePath . DIRECTORY_SEPARATOR . $extModule, '\\' . $extModule, $routing);
145
+                $routing = $this->inspectDir($externalModulePath.DIRECTORY_SEPARATOR.$extModule, '\\'.$extModule, $routing);
146 146
             }
147 147
         }
148 148
     }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     {
158 158
         try {
159 159
             $module = preg_replace('/(\\\|\/)/', DIRECTORY_SEPARATOR, $module);
160
-            $externalModulePath = VENDOR_DIR . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . 'src';
160
+            $externalModulePath = VENDOR_DIR.DIRECTORY_SEPARATOR.$module.DIRECTORY_SEPARATOR.'src';
161 161
             if (file_exists($externalModulePath)) {
162 162
                 $externalModule = $this->finder->directories()->in($externalModulePath)->depth(0);
163 163
                 if ($externalModule->hasResults()) {
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
                     }
167 167
                 }
168 168
             }
169
-        } catch (Exception $e) {
169
+        }catch (Exception $e) {
170 170
             Logger::log($e->getMessage(), LOG_WARNING);
171 171
         }
172 172
     }
@@ -178,9 +178,9 @@  discard block
 block discarded – undo
178 178
     public function domainExists($domainToCheck) {
179 179
         $exists = false;
180 180
         $domains = array_keys($this->getDomains());
181
-        foreach($domains as $domain) {
181
+        foreach ($domains as $domain) {
182 182
             $cleanDomain = strtolower(str_replace(['@', '/', '\\'], '', $domain));
183
-            if($cleanDomain === strtolower($domainToCheck)) {
183
+            if ($cleanDomain === strtolower($domainToCheck)) {
184 184
                 $exists = true;
185 185
                 break;
186 186
             }
Please login to merge, or discard this patch.
src/base/extension/TemplateFunctions.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 
44 44
         $filePath = '';
45 45
         if (!file_exists($filePath)) {
46
-            $filePath = BASE_DIR . $string;
46
+            $filePath = BASE_DIR.$string;
47 47
         }
48 48
         $filenamePath = AssetsHelper::findDomainPath($string, $filePath);
49 49
 
50 50
         $filePath = self::processAsset($string, $name, $return, $filenamePath);
51 51
         $basePath = Config::getParam('resources.cdn.url', Request::getInstance()->getRootUrl());
52
-        $returnPath = empty($name) ? $basePath . '/' . $filePath : $name;
52
+        $returnPath = empty($name) ? $basePath.'/'.$filePath : $name;
53 53
         return $return ? $returnPath : '';
54 54
     }
55 55
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
         $router = Router::getInstance();
67 67
         try {
68 68
             return $router->getRoute($path, $absolute, $params);
69
-        } catch (\Exception $e) {
69
+        }catch (\Exception $e) {
70 70
             return $router->getRoute('', $absolute, $params);
71 71
         }
72 72
     }
@@ -213,9 +213,9 @@  discard block
 block discarded – undo
213 213
     {
214 214
         $data = file_get_contents($filenamePath);
215 215
         if (!empty($name)) {
216
-            file_put_contents(WEB_DIR . DIRECTORY_SEPARATOR . $name, $data);
217
-        } else {
218
-            file_put_contents($base . $filePath, $data);
216
+            file_put_contents(WEB_DIR.DIRECTORY_SEPARATOR.$name, $data);
217
+        }else {
218
+            file_put_contents($base.$filePath, $data);
219 219
         }
220 220
     }
221 221
 
@@ -234,9 +234,9 @@  discard block
 block discarded – undo
234 234
         if (file_exists($filenamePath)) {
235 235
             list($base, $htmlBase, $filePath) = AssetsHelper::calculateAssetPath($string, $name, $return, $filenamePath);
236 236
             //Creamos el directorio si no existe
237
-            GeneratorHelper::createDir($base . $htmlBase);
237
+            GeneratorHelper::createDir($base.$htmlBase);
238 238
             //Si se ha modificado
239
-            if (!file_exists($base . $filePath) || filemtime($base . $filePath) < filemtime($filenamePath)) {
239
+            if (!file_exists($base.$filePath) || filemtime($base.$filePath) < filemtime($filenamePath)) {
240 240
                 if ($htmlBase === 'css') {
241 241
                     self::processCssLines($filenamePath);
242 242
                 }
Please login to merge, or discard this patch.
src/base/types/helpers/SlackHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
             'attachments' => [
31 31
                 [
32 32
                     "author_name" => $request->getRootUrl(true),
33
-                    "text" => $file . ($line !== '' ? ' [' . $line . ']' : ''),
33
+                    "text" => $file.($line !== '' ? ' ['.$line.']' : ''),
34 34
                     "color" => Config::getParam('debug', true) ? 'warning' : "danger",
35 35
                     "title" => $message,
36 36
                     'fallback' => 'PSFS Error notifier',
Please login to merge, or discard this patch.
src/base/Request.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public static function header($name, $default = null)
124 124
     {
125
-        return self::getInstance()->getHeader($name,  $default);
125
+        return self::getInstance()->getHeader($name, $default);
126 126
     }
127 127
 
128 128
     /**
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
         $header = null;
136 136
         if ($this->hasHeader($name)) {
137 137
             $header = $this->header[$name];
138
-        } else if(array_key_exists('h_' . strtolower($name), $this->query)) {
139
-            $header = $this->query['h_' . strtolower($name)];
140
-        } else if(array_key_exists('HTTP_' . strtoupper(str_replace('-', '_', $name)), $this->server)) {
141
-            $header = $this->getServer('HTTP_' . strtoupper(str_replace('-', '_', $name)));
138
+        }else if (array_key_exists('h_'.strtolower($name), $this->query)) {
139
+            $header = $this->query['h_'.strtolower($name)];
140
+        }else if (array_key_exists('HTTP_'.strtoupper(str_replace('-', '_', $name)), $this->server)) {
141
+            $header = $this->getServer('HTTP_'.strtoupper(str_replace('-', '_', $name)));
142 142
         }
143 143
         return $header ?: $default;
144 144
     }
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
             $url = $this->getServer('HTTP_ORIGIN');
243 243
         }
244 244
         ob_start();
245
-        header('Location: ' . $url);
245
+        header('Location: '.$url);
246 246
         ob_end_clean();
247 247
         Security::getInstance()->updateSession();
248 248
         exit(t('Redirect...'));
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         $url = $this->getServerName();
259 259
         $protocol = $hasProtocol ? $this->getProtocol() : '';
260 260
         if (!empty($protocol)) {
261
-            $url = $protocol . $url;
261
+            $url = $protocol.$url;
262 262
         }
263 263
         $url = $this->checkServerPort($url);
264 264
         return $url;
@@ -272,15 +272,15 @@  discard block
 block discarded – undo
272 272
     {
273 273
         $port = (integer)$this->getServer('SERVER_PORT');
274 274
         $host = $this->getServer('HTTP_HOST');
275
-        if(!empty($host)) {
275
+        if (!empty($host)) {
276 276
             $parts = explode(':', $host);
277 277
             $hostPort = (integer)end($parts);
278
-            if($hostPort !== $port && count($parts) > 1) {
278
+            if ($hostPort !== $port && count($parts) > 1) {
279 279
                 $port = $hostPort;
280 280
             }
281 281
         }
282 282
         if (!in_array($port, [80, 443], true)) {
283
-            $url .= ':' . $port;
283
+            $url .= ':'.$port;
284 284
         }
285 285
         return $url;
286 286
     }
Please login to merge, or discard this patch.
src/base/Router.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function init()
64 64
     {
65
-        list($this->routing, $this->slugs) = $this->cache->getDataFromFile(CONFIG_DIR . DIRECTORY_SEPARATOR . 'urls.json', $this->cacheType, TRUE);
66
-        $this->domains = $this->cache->getDataFromFile(CONFIG_DIR . DIRECTORY_SEPARATOR . 'domains.json', $this->cacheType, TRUE);
65
+        list($this->routing, $this->slugs) = $this->cache->getDataFromFile(CONFIG_DIR.DIRECTORY_SEPARATOR.'urls.json', $this->cacheType, TRUE);
66
+        $this->domains = $this->cache->getDataFromFile(CONFIG_DIR.DIRECTORY_SEPARATOR.'domains.json', $this->cacheType, TRUE);
67 67
         if (empty($this->routing) || Config::getParam('debug', true)) {
68 68
             $this->debugLoad();
69 69
         }
@@ -98,13 +98,13 @@  discard block
 block discarded – undo
98 98
         try {
99 99
             //Search action and execute
100 100
             return $this->searchAction($route);
101
-        } catch (AccessDeniedException $e) {
102
-            Logger::log(t('Solicitamos credenciales de acceso a zona restringida'), LOG_WARNING, ['file' => $e->getFile() . '[' . $e->getLine() . ']']);
101
+        }catch (AccessDeniedException $e) {
102
+            Logger::log(t('Solicitamos credenciales de acceso a zona restringida'), LOG_WARNING, ['file' => $e->getFile().'['.$e->getLine().']']);
103 103
             return Admin::staticAdminLogon();
104
-        } catch (RouterException $r) {
104
+        }catch (RouterException $r) {
105 105
             Logger::log($r->getMessage(), LOG_WARNING);
106 106
             $code = $r->getCode();
107
-        } catch (Exception $e) {
107
+        }catch (Exception $e) {
108 108
             Logger::log($e->getMessage(), LOG_ERR);
109 109
             throw $e;
110 110
         }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     protected function searchAction($route)
124 124
     {
125
-        Inspector::stats('[Router] Searching action to execute: ' . $route, Inspector::SCOPE_DEBUG);
125
+        Inspector::stats('[Router] Searching action to execute: '.$route, Inspector::SCOPE_DEBUG);
126 126
         //Revisamos si tenemos la ruta registrada
127 127
         $parts = parse_url($route);
128 128
         $path = array_key_exists('path', $parts) ? $parts['path'] : $route;
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                     }
143 143
 
144 144
                     throw new RouterException(t('Preconditions failed'), 412);
145
-                } catch (Exception $e) {
145
+                }catch (Exception $e) {
146 146
                     Logger::log($e->getMessage(), LOG_ERR);
147 147
                     throw $e;
148 148
                 }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                 }
168 168
             }
169 169
             $valid = count($action['requirements']) === $checked;
170
-        } else {
170
+        }else {
171 171
             $valid = true;
172 172
         }
173 173
         return $valid;
@@ -190,11 +190,11 @@  discard block
 block discarded – undo
190 190
             if ($modules->hasResults()) {
191 191
                 foreach ($modules->getIterator() as $modulePath) {
192 192
                     $module = $modulePath->getBasename();
193
-                    $this->routing = $this->inspectDir($modulesPath . DIRECTORY_SEPARATOR . $module, $module, $this->routing);
193
+                    $this->routing = $this->inspectDir($modulesPath.DIRECTORY_SEPARATOR.$module, $module, $this->routing);
194 194
                 }
195 195
             }
196 196
         }
197
-        $this->cache->storeData(CONFIG_DIR . DIRECTORY_SEPARATOR . 'domains.json', $this->domains, Cache::JSON, TRUE);
197
+        $this->cache->storeData(CONFIG_DIR.DIRECTORY_SEPARATOR.'domains.json', $this->domains, Cache::JSON, TRUE);
198 198
     }
199 199
 
200 200
     /**
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             $homeParams = NULL;
212 212
             foreach ($this->routing as $pattern => $params) {
213 213
                 list($method, $route) = RouterHelper::extractHttpRoute($pattern);
214
-                if (preg_match('/' . preg_quote($route, '/') . '$/i', '/' . $home)) {
214
+                if (preg_match('/'.preg_quote($route, '/').'$/i', '/'.$home)) {
215 215
                     $homeParams = $params;
216 216
                 }
217 217
                 unset($method);
@@ -243,18 +243,18 @@  discard block
 block discarded – undo
243 243
     {
244 244
         $baseUrl = $absolute ? Request::getInstance()->getRootUrl() : '';
245 245
         if ('' === $slug) {
246
-            return $baseUrl . '/';
246
+            return $baseUrl.'/';
247 247
         }
248 248
         if (!is_array($this->slugs) || !array_key_exists($slug, $this->slugs)) {
249 249
             throw new RouterException(t('No existe la ruta especificada'));
250 250
         }
251
-        $url = $baseUrl . $this->slugs[$slug];
251
+        $url = $baseUrl.$this->slugs[$slug];
252 252
         if (!empty($params)) {
253 253
             foreach ($params as $key => $value) {
254
-                $url = str_replace('{' . $key . '}', $value, $url);
254
+                $url = str_replace('{'.$key.'}', $value, $url);
255 255
             }
256 256
         } elseif (!empty($this->routing[$this->slugs[$slug]]['default'])) {
257
-            $url = $baseUrl . $this->routing[$this->slugs[$slug]]['default'];
257
+            $url = $baseUrl.$this->routing[$this->slugs[$slug]]['default'];
258 258
         }
259 259
 
260 260
         return preg_replace('/(GET|POST|PUT|DELETE|ALL|HEAD|PATCH)\#\|\#/', '', $url);
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
      */
267 267
     private function checkPreActions($class, $method)
268 268
     {
269
-        $preAction = 'pre' . ucfirst($method);
269
+        $preAction = 'pre'.ucfirst($method);
270 270
         if (method_exists($class, $preAction)) {
271 271
             Inspector::stats('[Router] Pre action invoked', Inspector::SCOPE_DEBUG);
272 272
             try {
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
                     Logger::log(t('Pre action failed'), LOG_ERR, [error_get_last()]);
275 275
                     error_clear_last();
276 276
                 }
277
-            } catch (Exception $e) {
277
+            }catch (Exception $e) {
278 278
                 Logger::log($e->getMessage(), LOG_ERR, [$class, $method]);
279 279
             }
280 280
         }
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
      */
292 292
     protected function executeCachedRoute($route, $action, $class, $params = NULL)
293 293
     {
294
-        Inspector::stats('[Router] Executing route ' . $route, Inspector::SCOPE_DEBUG);
294
+        Inspector::stats('[Router] Executing route '.$route, Inspector::SCOPE_DEBUG);
295 295
         $action['params'] = array_merge($action['params'], $params, Request::getInstance()->getQueryParams());
296 296
         Security::getInstance()->setSessionKey(Cache::CACHE_SESSION_VAR, $action);
297 297
         $cache = Cache::needCache();
@@ -299,15 +299,15 @@  discard block
 block discarded – undo
299 299
         $return = null;
300 300
         if (FALSE !== $cache && $action['http'] === 'GET' && Config::getParam('debug') === FALSE) {
301 301
             list($path, $cacheDataName) = $this->cache->getRequestCacheHash();
302
-            $cachedData = $this->cache->readFromCache('json' . DIRECTORY_SEPARATOR . $path . $cacheDataName, $cache);
302
+            $cachedData = $this->cache->readFromCache('json'.DIRECTORY_SEPARATOR.$path.$cacheDataName, $cache);
303 303
             if (NULL !== $cachedData) {
304
-                $headers = $this->cache->readFromCache('json' . DIRECTORY_SEPARATOR . $path . $cacheDataName . '.headers', $cache, null, Cache::JSON);
304
+                $headers = $this->cache->readFromCache('json'.DIRECTORY_SEPARATOR.$path.$cacheDataName.'.headers', $cache, null, Cache::JSON);
305 305
                 Template::getInstance()->renderCache($cachedData, $headers);
306 306
                 $execute = FALSE;
307 307
             }
308 308
         }
309 309
         if ($execute) {
310
-            Inspector::stats('[Router] Start executing action ' . $route, Inspector::SCOPE_DEBUG);
310
+            Inspector::stats('[Router] Start executing action '.$route, Inspector::SCOPE_DEBUG);
311 311
             $this->checkPreActions($class, $action['method']);
312 312
             $return = call_user_func_array([$class, $action['method']], $params);
313 313
             if (false === $return) {
Please login to merge, or discard this patch.
src/base/Logger.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
 
19 19
 
20 20
 if (!defined('LOG_DIR')) {
21
-    GeneratorHelper::createDir(BASE_DIR . DIRECTORY_SEPARATOR . 'logs');
22
-    define('LOG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'logs');
21
+    GeneratorHelper::createDir(BASE_DIR.DIRECTORY_SEPARATOR.'logs');
22
+    define('LOG_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'logs');
23 23
 }
24 24
 
25 25
 /**
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
     {
58 58
         $args = func_get_args();
59 59
         list($logger, $debug, $path) = $this->setup($args);
60
-        $this->stream = fopen($path . DIRECTORY_SEPARATOR . date('Ymd') . '.log', 'ab+');
60
+        $this->stream = fopen($path.DIRECTORY_SEPARATOR.date('Ymd').'.log', 'ab+');
61 61
         if (false !== $this->stream && is_resource($this->stream)) {
62 62
             $this->addPushLogger($logger, $debug);
63
-        } else {
63
+        }else {
64 64
             throw new ConfigException(t('Error creating logger'));
65 65
         }
66 66
         $this->logLevel = strtoupper(Config::getParam('log.level', 'NOTICE'));
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     private function createLoggerPath()
142 142
     {
143 143
         $logger = $this->setLoggerName();
144
-        $path = Config::getParam('default.log.path',LOG_DIR) . DIRECTORY_SEPARATOR . $logger . DIRECTORY_SEPARATOR . date('Y') . DIRECTORY_SEPARATOR . date('m');
144
+        $path = Config::getParam('default.log.path', LOG_DIR).DIRECTORY_SEPARATOR.$logger.DIRECTORY_SEPARATOR.date('Y').DIRECTORY_SEPARATOR.date('m');
145 145
         GeneratorHelper::createDir($path);
146 146
         return $path;
147 147
     }
Please login to merge, or discard this patch.