Passed
Push — master ( ffe143...c13334 )
by Fran
05:32
created
src/base/types/AuthApi.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@
 block discarded – undo
26 26
         {
27 27
             $namespace = explode('\\', $this->getModelTableMap());
28 28
             $module = strtolower($namespace[0]);
29
-            $secret = Config::getInstance()->get($module . '.api.secret');
29
+            $secret = Config::getInstance()->get($module.'.api.secret');
30 30
             if (NULL === $secret) {
31 31
                 $secret = Config::getInstance()->get("api.secret");
32 32
             }
33 33
             if (NULL === $secret) {
34 34
                 $auth = TRUE;
35
-            } else {
35
+            }else {
36 36
                 $token = Request::getInstance()->getHeader('X-API-SEC-TOKEN');
37 37
                 if (array_key_exists('API_TOKEN', $this->query)) {
38 38
                     $token = $this->query['API_TOKEN'];
Please login to merge, or discard this patch.
src/base/types/interfaces/AuthInterface.php 1 patch
Doc Comments   +12 added lines patch added patch discarded remove patch
@@ -7,7 +7,19 @@
 block discarded – undo
7 7
  * @package PSFS\base\types\interfaces
8 8
  */
9 9
 interface AuthInterface {
10
+
11
+    /**
12
+     * @return boolean
13
+     */
10 14
     function isLogged();
15
+
16
+    /**
17
+     * @return boolean
18
+     */
11 19
     function isAdmin();
20
+
21
+    /**
22
+     * @return boolean
23
+     */
12 24
     function canDo($action);
13 25
 }
Please login to merge, or discard this patch.
src/base/types/interfaces/ControllerInterface.php 1 patch
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -7,6 +7,14 @@
 block discarded – undo
7 7
  * @package PSFS\base\types\interfaces
8 8
  */
9 9
 interface ControllerInterface {
10
+
11
+    /**
12
+     * @return string|null
13
+     */
10 14
     public function render($template, Array $vars = null);
15
+
16
+    /**
17
+     * @return void
18
+     */
11 19
     public function response($response, $type = 'text/html');
12 20
 }
Please login to merge, or discard this patch.
src/services/DocumentorService.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -371,7 +371,7 @@
 block discarded – undo
371 371
          * @param array $parts
372 372
          * @param int $partLength
373 373
          *
374
-         * @return array
374
+         * @return string[]
375 375
          */
376 376
         private static function extractTsAndMod(array &$parts, $partLength)
377 377
         {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -422,7 +422,7 @@
 block discarded – undo
422 422
                                 "type" => $type,
423 423
                             ];
424 424
                             if (strlen($format)) {
425
-                               $dto['properties'][$field]['format'] = $format;
425
+                                $dto['properties'][$field]['format'] = $format;
426 426
                             }
427 427
                         }
428 428
                     }
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
                         if (!preg_match('/^\@ROOT/i', $domain)) {
35 35
                             $modules[] = str_replace('/', '', str_replace('@', '', $domain));
36 36
                         }
37
-                    } catch (\Exception $e) {
37
+                    }catch (\Exception $e) {
38 38
                         $modules[] = $e->getMessage();
39 39
                     }
40 40
                 }
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
          */
53 53
         public function extractApiEndpoints($module)
54 54
         {
55
-            $module_path = CORE_DIR . DIRECTORY_SEPARATOR . $module . DIRECTORY_SEPARATOR . "Api";
55
+            $module_path = CORE_DIR.DIRECTORY_SEPARATOR.$module.DIRECTORY_SEPARATOR."Api";
56 56
             $endpoints = [];
57 57
             if (file_exists($module_path)) {
58 58
                 $finder = new Finder();
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                 if (count($finder)) {
61 61
                     /** @var \SplFileInfo $file */
62 62
                     foreach ($finder as $file) {
63
-                        $namespace = "\\{$module}\\Api\\" . str_replace('.php', '', $file->getFilename());
63
+                        $namespace = "\\{$module}\\Api\\".str_replace('.php', '', $file->getFilename());
64 64
                         $endpoints[$namespace] = $this->extractApiInfo($namespace);
65 65
                     }
66 66
                 }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
                         if (NULL !== $mInfo) {
90 90
                             $info[] = $mInfo;
91 91
                         }
92
-                    } catch (\Exception $e) {
92
+                    }catch (\Exception $e) {
93 93
                         Logger::getInstance()->errorLog($e->getMessage());
94 94
                     }
95 95
                 }
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
          */
237 237
         protected function extractReturn($model, $comments = '')
238 238
         {
239
-            $modelDto  = [];
239
+            $modelDto = [];
240 240
             preg_match('/\@return\ (.*)\((.*)\)\n/i', $comments, $returnTypes);
241 241
             if (count($returnTypes)) {
242 242
                 // Extract principal DTO information
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
                 } elseif (null !== $reflector && $reflector->isSubclassOf(self::DTO_INTERFACE)) {
290 290
                     $payload = $this->extractDtoProperties($namespace);
291 291
                 }
292
-            } catch (\Exception $e) {
292
+            }catch (\Exception $e) {
293 293
                 Logger::getInstance()->errorLog($e->getMessage());
294 294
             }
295 295
 
@@ -325,7 +325,7 @@  discard block
 block discarded – undo
325 325
                         if (in_array($methodInfo['method'], ['POST', 'PUT'])) {
326 326
                             $methodInfo['payload'] = $this->extractPayload($modelNamespace, $docComments);
327 327
                         }
328
-                    } catch (\Exception $e) {
328
+                    }catch (\Exception $e) {
329 329
                         jpre($e->getMessage());
330 330
                         Logger::getInstance()->errorLog($e->getMessage());
331 331
                     }
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
          */
344 344
         public static function translateSwaggerFormats($format)
345 345
         {
346
-            switch(strtolower($format)) {
346
+            switch (strtolower($format)) {
347 347
                 case 'bool':
348 348
                 case 'boolean':
349 349
                     $swaggerType = 'boolean';
@@ -404,13 +404,13 @@  discard block
 block discarded – undo
404 404
                             ]]);
405 405
                             if (array_key_exists($subDtoName, $subDto)) {
406 406
                                 $definitions = $subDto;
407
-                            } else {
407
+                            }else {
408 408
                                 $definitions[$subDtoName] = $subDto;
409 409
                             }
410 410
                             $dto['properties'][$field] = [
411
-                                '$ref' => "#/definitions/" . $subDtoName,
411
+                                '$ref' => "#/definitions/".$subDtoName,
412 412
                             ];
413
-                        } else {
413
+                        }else {
414 414
                             list($type, $format) = self::translateSwaggerFormats($format);
415 415
                             $dto['properties'][$field] = [
416 416
                                 "type" => $type,
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
                     "url" => Router::getInstance()->getRoute(''),
448 448
                 ]
449 449
             ];
450
-            foreach($endpoints as $model) {
450
+            foreach ($endpoints as $model) {
451 451
                 foreach ($model as $endpoint) {
452 452
                     $dtos += self::extractSwaggerDefinition($endpoint);
453 453
                 }
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
         protected function extractDtoName($dto, $isArray = false)
467 467
         {
468 468
             $dto = explode('\\', $dto);
469
-            $modelDto = array_pop($dto) . "Dto";
469
+            $modelDto = array_pop($dto)."Dto";
470 470
             if ($isArray) {
471 471
                 $modelDto .= "List";
472 472
             }
Please login to merge, or discard this patch.
src/base/Request.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -121,6 +121,9 @@
 block discarded – undo
121 121
         return self::getInstance()->getHeader($name);
122 122
     }
123 123
 
124
+    /**
125
+     * @return string
126
+     */
124 127
     public function getHeader($name)
125 128
     {
126 129
         $header = null;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
     {
217 217
         if (null === $url) $url = $this->server['HTTP_ORIGIN'];
218 218
         ob_start();
219
-        header('Location: ' . $url);
219
+        header('Location: '.$url);
220 220
         ob_end_clean();
221 221
         exit(_("Redireccionando..."));
222 222
     }
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         $host = $this->getServerName();
261 261
         $protocol = $protocol ? $this->getProtocol() : '';
262 262
         $url = '';
263
-        if (!empty($host) && !empty($protocol)) $url = $protocol . $host;
263
+        if (!empty($host) && !empty($protocol)) $url = $protocol.$host;
264 264
         return $url;
265 265
     }
266 266
 
Please login to merge, or discard this patch.
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,9 +8,10 @@  discard block
 block discarded – undo
8 8
     function getallheaders()
9 9
     {
10 10
         $headers = array();
11
-        foreach ($_SERVER as $h => $v)
12
-            if (preg_match('/HTTP_(.+)/', $h, $hp))
11
+        foreach ($_SERVER as $h => $v) {
12
+                    if (preg_match('/HTTP_(.+)/', $h, $hp))
13 13
                 $headers[$hp[1]] = $v;
14
+        }
14 15
         return $headers;
15 16
     }
16 17
 }
@@ -214,7 +215,9 @@  discard block
 block discarded – undo
214 215
      */
215 216
     public function redirect($url = null)
216 217
     {
217
-        if (null === $url) $url = $this->server['HTTP_ORIGIN'];
218
+        if (null === $url) {
219
+            $url = $this->server['HTTP_ORIGIN'];
220
+        }
218 221
         ob_start();
219 222
         header('Location: ' . $url);
220 223
         ob_end_clean();
@@ -260,7 +263,9 @@  discard block
 block discarded – undo
260 263
         $host = $this->getServerName();
261 264
         $protocol = $protocol ? $this->getProtocol() : '';
262 265
         $url = '';
263
-        if (!empty($host) && !empty($protocol)) $url = $protocol . $host;
266
+        if (!empty($host) && !empty($protocol)) {
267
+            $url = $protocol . $host;
268
+        }
264 269
         return $url;
265 270
     }
266 271
 
Please login to merge, or discard this patch.
src/base/Security.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -415,7 +415,7 @@
 block discarded – undo
415 415
      * @param array $parts
416 416
      * @param int $partLength
417 417
      *
418
-     * @return array
418
+     * @return string[]
419 419
      */
420 420
     private static function extractTsAndMod(array &$parts, $partLength)
421 421
     {
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
     public static function save($user)
106 106
     {
107 107
         $admins = array();
108
-        if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) {
109
-            $admins = json_decode(file_get_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json'), TRUE);
108
+        if (file_exists(CONFIG_DIR.DIRECTORY_SEPARATOR.'admins.json')) {
109
+            $admins = json_decode(file_get_contents(CONFIG_DIR.DIRECTORY_SEPARATOR.'admins.json'), TRUE);
110 110
         }
111
-        $admins[$user['username']]['hash'] = sha1($user['username'] . $user['password']);
111
+        $admins[$user['username']]['hash'] = sha1($user['username'].$user['password']);
112 112
         $admins[$user['username']]['profile'] = $user['profile'];
113 113
 
114
-        return (FALSE !== file_put_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json', json_encode($admins, JSON_PRETTY_PRINT)));
114
+        return (FALSE !== file_put_contents(CONFIG_DIR.DIRECTORY_SEPARATOR.'admins.json', json_encode($admins, JSON_PRETTY_PRINT)));
115 115
     }
116 116
 
117 117
     /**
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
     public function getAdmins()
146 146
     {
147 147
         $admins = array();
148
-        if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) {
149
-            $admins = json_decode(file_get_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json'), TRUE);
148
+        if (file_exists(CONFIG_DIR.DIRECTORY_SEPARATOR.'admins.json')) {
149
+            $admins = json_decode(file_get_contents(CONFIG_DIR.DIRECTORY_SEPARATOR.'admins.json'), TRUE);
150 150
         }
151 151
 
152 152
         return $admins;
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
         Logger::log('Checking admin session');
167 167
         if (!$this->authorized) {
168 168
             $request = Request::getInstance();
169
-            if (!file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) {
169
+            if (!file_exists(CONFIG_DIR.DIRECTORY_SEPARATOR.'admins.json')) {
170 170
                 //Si no hay fichero de usuarios redirigimos directamente al gestor
171 171
                 return Router::getInstance()->getAdmin()->adminers();
172 172
             }
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
             }
180 180
             if (!empty($user) && !empty($admins[$user])) {
181 181
                 $auth = $admins[$user]['hash'];
182
-                $this->authorized = ($auth == sha1($user . $pass));
182
+                $this->authorized = ($auth == sha1($user.$pass));
183 183
                 $this->admin = array(
184 184
                     'alias' => $user,
185 185
                     'profile' => $admins[$user]['profile'],
@@ -398,12 +398,12 @@  discard block
 block discarded – undo
398 398
         $axis = 0;
399 399
         $parts = array();
400 400
         try {
401
-            $partLength = floor(strlen($token) / 10);
402
-            for ($i = 0, $ct = ceil(strlen($token) / $partLength); $i < $ct; $i++) {
401
+            $partLength = floor(strlen($token)/10);
402
+            for ($i = 0, $ct = ceil(strlen($token)/$partLength); $i < $ct; $i++) {
403 403
                 $parts[] = substr($token, $axis, $partLength);
404 404
                 $axis += $partLength;
405 405
             }
406
-        } catch (\Exception $e) {
406
+        }catch (\Exception $e) {
407 407
             $partLength = 0;
408 408
         }
409 409
 
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
         $decoded = NULL;
444 444
         list($partLength, $parts) = self::extractTokenParts($token);
445 445
         list($ts, $mod) = self::extractTsAndMod($parts, $partLength);
446
-        $hashMod = substr(strtoupper(sha1($module)), strlen($ts) / 2, strlen($ts) * 2);
446
+        $hashMod = substr(strtoupper(sha1($module)), strlen($ts)/2, strlen($ts)*2);
447 447
         if (time() - (integer)$ts < 300 && $hashMod === $mod) {
448 448
             $decoded = implode('', $parts);
449 449
         }
@@ -460,16 +460,16 @@  discard block
 block discarded – undo
460 460
     public static function generateToken($secret, $module = 'PSFS')
461 461
     {
462 462
         $ts = time();
463
-        $hashModule = substr(strtoupper(sha1($module)), strlen($ts) / 2, strlen($ts) * 2);
463
+        $hashModule = substr(strtoupper(sha1($module)), strlen($ts)/2, strlen($ts)*2);
464 464
         $hash = hash('sha256', $secret);
465
-        $insert = floor(strlen($hash) / strlen($ts));
465
+        $insert = floor(strlen($hash)/strlen($ts));
466 466
         $j = 0;
467 467
         $token = '';
468 468
         for ($i = 0, $ct = strlen($ts); $i < $ct; $i++) {
469
-            $token .= substr($ts, $i, 1) . substr($hash, $j, $insert) . substr($hashModule, $i, 2);
469
+            $token .= substr($ts, $i, 1).substr($hash, $j, $insert).substr($hashModule, $i, 2);
470 470
             $j += $insert;
471 471
         }
472
-        $token .= substr($hash, ($insert * strlen($ts)), strlen($hash) - ($insert * strlen($ts)));
472
+        $token .= substr($hash, ($insert*strlen($ts)), strlen($hash) - ($insert*strlen($ts)));
473 473
         return $token;
474 474
     }
475 475
 
Please login to merge, or discard this patch.
src/base/Service.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -125,8 +125,8 @@
 block discarded – undo
125 125
     }
126 126
 
127 127
     /**
128
-     * @param $header
129
-     * @param null $content
128
+     * @param string $header
129
+     * @param string $content
130 130
      *
131 131
      * @return $this
132 132
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@
 block discarded – undo
177 177
         $this->url = NULL;
178 178
         $this->params = array();
179 179
         $this->headers = array();
180
-        Logger::log("Context service for " . get_called_class() . " cleared!");
180
+        Logger::log("Context service for ".get_called_class()." cleared!");
181 181
     }
182 182
 
183 183
     /**
Please login to merge, or discard this patch.
src/base/Singleton.php 2 patches
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
     public function __construct()
21 21
     {
22
-        Logger::log(get_class($this) . ' constructor invoked');
22
+        Logger::log(get_class($this).' constructor invoked');
23 23
     }
24 24
 
25 25
     /**
@@ -106,14 +106,14 @@  discard block
 block discarded – undo
106 106
         $calledClass = get_called_class();
107 107
         try {
108 108
             $instance = $this->constructInyectableInstance($variable, $singleton, $classNameSpace, $calledClass);
109
-            $setter = "set" . ucfirst($variable);
109
+            $setter = "set".ucfirst($variable);
110 110
             if (method_exists($calledClass, $setter)) {
111 111
                 $this->$setter($instance);
112
-            } else {
112
+            }else {
113 113
                 $this->$variable = $instance;
114 114
             }
115
-        } catch (\Exception $e) {
116
-            Logger::log($e->getMessage() . ': ' . $e->getFile() . ' [' . $e->getLine() . ']', LOG_ERR);
115
+        }catch (\Exception $e) {
116
+            Logger::log($e->getMessage().': '.$e->getFile().' ['.$e->getLine().']', LOG_ERR);
117 117
         }
118 118
         return $this;
119 119
     }
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
     public function init()
125 125
     {
126 126
         if (!$this->isLoaded()) {
127
-            $cacheFilename = "reflections" . DIRECTORY_SEPARATOR . sha1(get_class($this)) . ".json";
127
+            $cacheFilename = "reflections".DIRECTORY_SEPARATOR.sha1(get_class($this)).".json";
128 128
             /** @var \PSFS\base\Cache $cacheService */
129 129
             $cacheService = Cache::getInstance();
130 130
             /** @var \PSFS\base\config\Config $configService */
@@ -139,8 +139,8 @@  discard block
 block discarded – undo
139 139
                 $this->load($property, true, $class);
140 140
             }
141 141
             $this->setLoaded();
142
-        } else {
143
-            Logger::log(get_class($this) . ' already loaded', LOG_INFO);
142
+        }else {
143
+            Logger::log(get_class($this).' already loaded', LOG_INFO);
144 144
         }
145 145
     }
146 146
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         if (null === $class) {
156 156
             $class = get_class($this);
157 157
         }
158
-        Logger::log('Extracting annotations properties from class ' . $class);
158
+        Logger::log('Extracting annotations properties from class '.$class);
159 159
         $selfReflector = new \ReflectionClass($class);
160 160
         if (false !== $selfReflector->getParentClass()) {
161 161
             $properties = $this->getClassProperties($selfReflector->getParentClass()->getName());
@@ -196,13 +196,13 @@  discard block
 block discarded – undo
196 196
      */
197 197
     private function constructInyectableInstance($variable, $singleton, $classNameSpace, $calledClass)
198 198
     {
199
-        Logger::log('Create inyectable instance for ' . $classNameSpace . ' into ' . get_class($this));
199
+        Logger::log('Create inyectable instance for '.$classNameSpace.' into '.get_class($this));
200 200
         $reflector = new \ReflectionClass($calledClass);
201 201
         $property = $reflector->getProperty($variable);
202 202
         $varInstanceType = (null === $classNameSpace) ? $this->extractVarType($property->getDocComment()) : $classNameSpace;
203 203
         if (true === $singleton && method_exists($varInstanceType, "getInstance")) {
204 204
             $instance = $varInstanceType::getInstance();
205
-        } else {
205
+        }else {
206 206
             $instance = new $varInstanceType();
207 207
         }
208 208
         return $instance;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -135,9 +135,11 @@
 block discarded – undo
135 135
                 $cacheService->storeData($cacheFilename, $properties, Cache::JSON);
136 136
             }
137 137
             /** @var \ReflectionProperty $property */
138
-            if (!empty($properties) && is_array($properties)) foreach ($properties as $property => $class) {
138
+            if (!empty($properties) && is_array($properties)) {
139
+                foreach ($properties as $property => $class) {
139 140
                 $this->load($property, true, $class);
140 141
             }
142
+            }
141 143
             $this->setLoaded();
142 144
         } else {
143 145
             Logger::log(get_class($this) . ' already loaded', LOG_INFO);
Please login to merge, or discard this patch.
src/base/Logger.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@  discard block
 block discarded – undo
13 13
 
14 14
 
15 15
 if (!defined("LOG_DIR")) {
16
-    Config::createDir(BASE_DIR . DIRECTORY_SEPARATOR . 'logs');
17
-    define("LOG_DIR", BASE_DIR . DIRECTORY_SEPARATOR . 'logs');
16
+    Config::createDir(BASE_DIR.DIRECTORY_SEPARATOR.'logs');
17
+    define("LOG_DIR", BASE_DIR.DIRECTORY_SEPARATOR.'logs');
18 18
 }
19 19
 
20 20
 /**
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $config = Config::getInstance();
44 44
         $args = func_get_args();
45 45
         list($logger, $debug, $path) = $this->setup($config, $args);
46
-        $this->stream = fopen($path . DIRECTORY_SEPARATOR . date("Ymd") . ".log", "a+");
46
+        $this->stream = fopen($path.DIRECTORY_SEPARATOR.date("Ymd").".log", "a+");
47 47
         $this->addPushLogger($logger, $debug, $config);
48 48
     }
49 49
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     private function createLoggerPath(Config $config)
186 186
     {
187 187
         $logger = $this->setLoggerName($config);
188
-        $path = LOG_DIR . DIRECTORY_SEPARATOR . $logger . DIRECTORY_SEPARATOR . date('Y') . DIRECTORY_SEPARATOR . date('m');
188
+        $path = LOG_DIR.DIRECTORY_SEPARATOR.$logger.DIRECTORY_SEPARATOR.date('Y').DIRECTORY_SEPARATOR.date('m');
189 189
         Config::createDir($path);
190 190
 
191 191
         return $path;
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      * @param string $msg
89 89
      * @param array $context
90 90
      *
91
-     * @return bool
91
+     * @return boolean|null
92 92
      */
93 93
     public function debugLog($msg = '', $context = [])
94 94
     {
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
     /**
99 99
      * Método que escribe un log de Error
100
-     * @param $msg
100
+     * @param string $msg
101 101
      * @param array $context
102 102
      *
103 103
      * @return bool
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
     /**
111 111
      * Método que escribe un log de Warning
112
-     * @param $msg
112
+     * @param string $msg
113 113
      * @param array $context
114 114
      * @return bool
115 115
      */
Please login to merge, or discard this patch.