@@ -125,8 +125,8 @@ |
||
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 | */ |
@@ -177,7 +177,7 @@ |
||
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 | /** |
@@ -135,9 +135,11 @@ |
||
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); |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | public function __construct() |
22 | 22 | { |
23 | - Logger::log(get_class($this) . ' constructor invoked'); |
|
23 | + Logger::log(get_class($this).' constructor invoked'); |
|
24 | 24 | $this->init(); |
25 | 25 | } |
26 | 26 | |
@@ -90,14 +90,14 @@ discard block |
||
90 | 90 | $calledClass = get_called_class(); |
91 | 91 | try { |
92 | 92 | $instance = InjectorHelper::constructInyectableInstance($variable, $singleton, $classNameSpace, $calledClass); |
93 | - $setter = "set" . ucfirst($variable); |
|
93 | + $setter = "set".ucfirst($variable); |
|
94 | 94 | if (method_exists($calledClass, $setter)) { |
95 | 95 | $this->$setter($instance); |
96 | - } else { |
|
96 | + }else { |
|
97 | 97 | $this->$variable = $instance; |
98 | 98 | } |
99 | - } catch (\Exception $e) { |
|
100 | - Logger::log($e->getMessage() . ': ' . $e->getFile() . ' [' . $e->getLine() . ']', LOG_ERR); |
|
99 | + }catch (\Exception $e) { |
|
100 | + Logger::log($e->getMessage().': '.$e->getFile().' ['.$e->getLine().']', LOG_ERR); |
|
101 | 101 | } |
102 | 102 | return $this; |
103 | 103 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | public function init() |
109 | 109 | { |
110 | 110 | if (!$this->isLoaded()) { |
111 | - $cacheFilename = "reflections" . DIRECTORY_SEPARATOR . sha1(get_class($this)) . ".json"; |
|
111 | + $cacheFilename = "reflections".DIRECTORY_SEPARATOR.sha1(get_class($this)).".json"; |
|
112 | 112 | /** @var \PSFS\base\Cache $cacheService */ |
113 | 113 | $cacheService = Cache::getInstance(); |
114 | 114 | /** @var \PSFS\base\config\Config $configService */ |
@@ -123,8 +123,8 @@ discard block |
||
123 | 123 | $this->load($property, true, $class); |
124 | 124 | } |
125 | 125 | $this->setLoaded(); |
126 | - } else { |
|
127 | - Logger::log(get_class($this) . ' already loaded', LOG_INFO); |
|
126 | + }else { |
|
127 | + Logger::log(get_class($this).' already loaded', LOG_INFO); |
|
128 | 128 | } |
129 | 129 | } |
130 | 130 | } |
@@ -21,11 +21,11 @@ |
||
21 | 21 | $path = str_replace("\\", DIRECTORY_SEPARATOR, $class); |
22 | 22 | |
23 | 23 | // filepath |
24 | - $abs_path = SOURCE_DIR . DIRECTORY_SEPARATOR . $path . ".php"; |
|
24 | + $abs_path = SOURCE_DIR.DIRECTORY_SEPARATOR.$path.".php"; |
|
25 | 25 | if (!file_exists($abs_path)) { |
26 | - pre('→ ' . $class); |
|
27 | - pre('→ ' . $path); |
|
28 | - pre('→ ' . $abs_path); |
|
26 | + pre('→ '.$class); |
|
27 | + pre('→ '.$path); |
|
28 | + pre('→ '.$abs_path); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | // require the file |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | |
122 | 122 | /** |
123 | 123 | * Método que guarda en fichero los datos pasados |
124 | - * @param $path |
|
124 | + * @param string $path |
|
125 | 125 | * @param $data |
126 | 126 | * @param int $transform |
127 | 127 | * @param boolean $absolutePath |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | |
157 | 157 | /** |
158 | 158 | * Método estático que revisa si se necesita cachear la respuesta de un servicio o no |
159 | - * @return integer|boolean |
|
159 | + * @return integer |
|
160 | 160 | */ |
161 | 161 | public static function needCache() |
162 | 162 | { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | |
4 | 4 | use PSFS\base\config\Config; |
5 | 5 | use PSFS\base\exception\ConfigException; |
6 | -use PSFS\base\types\helpers\RequestHelper; |
|
7 | 6 | use PSFS\base\types\SingletonTrait; |
8 | 7 | |
9 | 8 | /** |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | private function saveTextToFile($data, $path, $absolute = false) |
32 | 32 | { |
33 | - $absolutePath = ($absolute) ? $path : CACHE_DIR . DIRECTORY_SEPARATOR . $path; |
|
33 | + $absolutePath = ($absolute) ? $path : CACHE_DIR.DIRECTORY_SEPARATOR.$path; |
|
34 | 34 | $filename = basename($absolutePath); |
35 | 35 | Config::createDir(str_replace($filename, "", $absolutePath)); |
36 | 36 | if (false === file_put_contents($absolutePath, $data)) { |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | public function getDataFromFile($path, $transform = Cache::TEXT, $absolute = false) |
50 | 50 | { |
51 | 51 | $data = null; |
52 | - $absolutePath = ($absolute) ? $path : CACHE_DIR . DIRECTORY_SEPARATOR . $path; |
|
52 | + $absolutePath = ($absolute) ? $path : CACHE_DIR.DIRECTORY_SEPARATOR.$path; |
|
53 | 53 | if (file_exists($absolutePath)) { |
54 | 54 | $data = file_get_contents($absolutePath); |
55 | 55 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | private function hasExpiredCache($path, $expires = 300, $absolute = false) |
67 | 67 | { |
68 | - $absolutePath = ($absolute) ? $path : CACHE_DIR . DIRECTORY_SEPARATOR . $path; |
|
68 | + $absolutePath = ($absolute) ? $path : CACHE_DIR.DIRECTORY_SEPARATOR.$path; |
|
69 | 69 | $lasModificationDate = filemtime($absolutePath); |
70 | 70 | return ($lasModificationDate + $expires <= time()); |
71 | 71 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | break; |
89 | 89 | case Cache::GZIP: |
90 | 90 | // TODO implementar |
91 | - if(function_exists('gzuncompress')) { |
|
91 | + if (function_exists('gzuncompress')) { |
|
92 | 92 | $data = gzuncompress($data ?: ''); |
93 | 93 | } |
94 | 94 | break; |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $data = Cache::transformData($data, Cache::GZIP); |
114 | 114 | break; |
115 | 115 | case Cache::GZIP: |
116 | - if(function_exists('gzcompress')) { |
|
116 | + if (function_exists('gzcompress')) { |
|
117 | 117 | $data = gzcompress($data ?: ''); |
118 | 118 | } |
119 | 119 | break; |
@@ -145,11 +145,11 @@ discard block |
||
145 | 145 | public function readFromCache($path, $expires = 300, callable $function, $transform = Cache::TEXT) |
146 | 146 | { |
147 | 147 | $data = null; |
148 | - if (file_exists(CACHE_DIR . DIRECTORY_SEPARATOR . $path)) { |
|
148 | + if (file_exists(CACHE_DIR.DIRECTORY_SEPARATOR.$path)) { |
|
149 | 149 | if (null !== $function && $this->hasExpiredCache($path, $expires)) { |
150 | 150 | $data = call_user_func($function); |
151 | 151 | $this->storeData($path, $data, $transform); |
152 | - } else { |
|
152 | + }else { |
|
153 | 153 | $data = $this->getDataFromFile($path, $transform); |
154 | 154 | } |
155 | 155 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | private static function checkAdminSite() { |
163 | 163 | $isAdminRequest = false; |
164 | 164 | $lastRequest = Security::getInstance()->getSessionKey("lastRequest"); |
165 | - if(null !== $lastRequest) { |
|
165 | + if (null !== $lastRequest) { |
|
166 | 166 | $url = str_replace(Request::getInstance()->getRootUrl(true), '', $lastRequest['url']); |
167 | 167 | $isAdminRequest = preg_match('/^\/admin\//i', $url); |
168 | 168 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | public static function needCache() |
177 | 177 | { |
178 | 178 | $needCache = false; |
179 | - if(!self::checkAdminSite()) { |
|
179 | + if (!self::checkAdminSite()) { |
|
180 | 180 | $action = Security::getInstance()->getSessionKey("__CACHE__"); |
181 | 181 | if (null !== $action && array_key_exists("cache", $action) && $action["cache"] > 0) { |
182 | 182 | $needCache = $action["cache"]; |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | $hash = ""; |
195 | 195 | $action = Security::getInstance()->getSessionKey("__CACHE__"); |
196 | 196 | if (null !== $action && $action["cache"] > 0) { |
197 | - $hash = $action["http"] . " " . $action["slug"]; |
|
197 | + $hash = $action["http"]." ".$action["slug"]; |
|
198 | 198 | } |
199 | 199 | return sha1($hash); |
200 | 200 | } |
@@ -32,18 +32,18 @@ |
||
32 | 32 | 'robots' => 'robots.txt', |
33 | 33 | ]; |
34 | 34 | foreach ($files as $templates => $filename) { |
35 | - $text = \PSFS\base\Template::getInstance()->dump("generator/html/". $templates . '.html.twig'); |
|
36 | - if(false === file_put_contents($path . DIRECTORY_SEPARATOR . $filename, $text)) { |
|
37 | - $output->writeln('Can\t create the file ' . $filename); |
|
38 | - } else { |
|
39 | - $output->writeln($filename . ' created successfully'); |
|
35 | + $text = \PSFS\base\Template::getInstance()->dump("generator/html/".$templates.'.html.twig'); |
|
36 | + if (false === file_put_contents($path.DIRECTORY_SEPARATOR.$filename, $text)) { |
|
37 | + $output->writeln('Can\t create the file '.$filename); |
|
38 | + }else { |
|
39 | + $output->writeln($filename.' created successfully'); |
|
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
43 | 43 | //Export base locale translations |
44 | - if(!file_exists(BASE_DIR.DIRECTORY_SEPARATOR.'locale')) { |
|
44 | + if (!file_exists(BASE_DIR.DIRECTORY_SEPARATOR.'locale')) { |
|
45 | 45 | \PSFS\base\config\Config::createDir(BASE_DIR.DIRECTORY_SEPARATOR.'locale'); |
46 | - \PSFS\Services\GeneratorService::copyr(SOURCE_DIR . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'locale', BASE_DIR . DIRECTORY_SEPARATOR . 'locale'); |
|
46 | + \PSFS\Services\GeneratorService::copyr(SOURCE_DIR.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'locale', BASE_DIR.DIRECTORY_SEPARATOR.'locale'); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | $output->writeln("Document root generado en ".$path); |
@@ -6,7 +6,9 @@ discard block |
||
6 | 6 | use Symfony\Component\Console\Input\InputInterface; |
7 | 7 | use Symfony\Component\Console\Output\OutputInterface; |
8 | 8 | |
9 | - if (!isset($console)) $console = new Application(); |
|
9 | + if (!isset($console)) { |
|
10 | + $console = new Application(); |
|
11 | + } |
|
10 | 12 | $console |
11 | 13 | ->register('psfs:create:root') |
12 | 14 | ->setDefinition(array( |
@@ -16,7 +18,9 @@ discard block |
||
16 | 18 | ->setCode(function(InputInterface $input, OutputInterface $output) { |
17 | 19 | // Creates the html path |
18 | 20 | $path = $input->getArgument('path'); |
19 | - if (empty($path)) $path = WEB_DIR; |
|
21 | + if (empty($path)) { |
|
22 | + $path = WEB_DIR; |
|
23 | + } |
|
20 | 24 | \PSFS\base\config\Config::createDir($path); |
21 | 25 | $paths = array("js", "css", "img", "media", "font"); |
22 | 26 | foreach ($paths as $htmlPath) { |
@@ -20,7 +20,7 @@ |
||
20 | 20 | * @GET |
21 | 21 | * @route /admin/config/params |
22 | 22 | * @visible false |
23 | - * @return mixed |
|
23 | + * @return string|null |
|
24 | 24 | */ |
25 | 25 | public function getConfigParams() { |
26 | 26 | $response = array_merge(Config::$required, Config::$optional); |
@@ -25,10 +25,10 @@ discard block |
||
25 | 25 | public function getConfigParams() { |
26 | 26 | $response = array_merge(Config::$required, Config::$optional); |
27 | 27 | $domains = Router::getInstance()->getDomains(); |
28 | - foreach($domains as $domain => $routes) { |
|
28 | + foreach ($domains as $domain => $routes) { |
|
29 | 29 | $pDomain = str_replace('@', '', $domain); |
30 | 30 | $pDomain = str_replace('/', '', $pDomain); |
31 | - $response[] = strtolower($pDomain) . '.api.secret'; |
|
31 | + $response[] = strtolower($pDomain).'.api.secret'; |
|
32 | 32 | } |
33 | 33 | return $this->json($response); |
34 | 34 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public function config() |
44 | 44 | { |
45 | - Logger::log("Config loaded executed by " . $this->getRequest()->getRequestUri()); |
|
45 | + Logger::log("Config loaded executed by ".$this->getRequest()->getRequestUri()); |
|
46 | 46 | /* @var $form \PSFS\base\config\ConfigForm */ |
47 | 47 | $form = new ConfigForm(Router::getInstance()->getRoute('admin-config'), Config::$required, Config::$optional, Config::getInstance()->dumpConfig()); |
48 | 48 | $form->build(); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | } |
80 | 80 | Security::getInstance()->setFlash("callback_message", _("Configuración actualizada correctamente")); |
81 | 81 | Security::getInstance()->setFlash("callback_route", $this->getRoute("admin-config", true)); |
82 | - } else { |
|
82 | + }else { |
|
83 | 83 | throw new \HttpException(_('Error al guardar la configuración, prueba a cambiar los permisos'), 403); |
84 | 84 | } |
85 | 85 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | * @GET |
29 | 29 | * @route /admin/routes/show |
30 | 30 | * @visible false |
31 | - * @return mixed |
|
31 | + * @return string|null |
|
32 | 32 | */ |
33 | 33 | public function getRouting() |
34 | 34 | { |
@@ -51,7 +51,7 @@ |
||
51 | 51 | $router->simpatize(); |
52 | 52 | Security::getInstance()->setFlash("callback_message", _("Rutas generadas correctamente")); |
53 | 53 | Security::getInstance()->setFlash("callback_route", $this->getRoute("admin-routes", true)); |
54 | - } catch(\Exception $e) { |
|
54 | + }catch (\Exception $e) { |
|
55 | 55 | Logger::log($e->getMessage(), LOG_ERR); |
56 | 56 | Security::getInstance()->setFlash("callback_message", _("Algo no ha salido bien, revisa los logs")); |
57 | 57 | Security::getInstance()->setFlash("callback_route", $this->getRoute("admin-routes", true)); |
@@ -38,8 +38,8 @@ |
||
38 | 38 | //Generating the templates translations |
39 | 39 | $translations = $this->tpl->regenerateTemplates(); |
40 | 40 | |
41 | - $locale_path = realpath(BASE_DIR . DIRECTORY_SEPARATOR . 'locale'); |
|
42 | - $locale_path .= DIRECTORY_SEPARATOR . $locale . DIRECTORY_SEPARATOR . 'LC_MESSAGES' . DIRECTORY_SEPARATOR; |
|
41 | + $locale_path = realpath(BASE_DIR.DIRECTORY_SEPARATOR.'locale'); |
|
42 | + $locale_path .= DIRECTORY_SEPARATOR.$locale.DIRECTORY_SEPARATOR.'LC_MESSAGES'.DIRECTORY_SEPARATOR; |
|
43 | 43 | |
44 | 44 | //xgettext localizations |
45 | 45 | $translations = array_merge($translations, GeneratorService::findTranslations(SOURCE_DIR, $locale)); |
@@ -33,7 +33,9 @@ |
||
33 | 33 | public function getTranslations($locale) |
34 | 34 | { |
35 | 35 | //Default locale |
36 | - if (null === $locale) $locale = $this->config->get("default_language"); |
|
36 | + if (null === $locale) { |
|
37 | + $locale = $this->config->get("default_language"); |
|
38 | + } |
|
37 | 39 | |
38 | 40 | //Generating the templates translations |
39 | 41 | $translations = $this->tpl->regenerateTemplates(); |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | protected function init() |
48 | 48 | { |
49 | - if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . "config.json")) { |
|
49 | + if (file_exists(CONFIG_DIR.DIRECTORY_SEPARATOR."config.json")) { |
|
50 | 50 | $this->loadConfigData(); |
51 | 51 | } |
52 | 52 | return $this; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | */ |
117 | 117 | public function getTemplatePath() |
118 | 118 | { |
119 | - $path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'templates' . DIRECTORY_SEPARATOR; |
|
119 | + $path = __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'templates'.DIRECTORY_SEPARATOR; |
|
120 | 120 | return realpath($path); |
121 | 121 | } |
122 | 122 | |
@@ -163,10 +163,10 @@ discard block |
||
163 | 163 | $final_data = self::saveExtraParams($data); |
164 | 164 | $saved = false; |
165 | 165 | try { |
166 | - Cache::getInstance()->storeData(CONFIG_DIR . DIRECTORY_SEPARATOR . "config.json", $final_data, Cache::JSON, true); |
|
166 | + Cache::getInstance()->storeData(CONFIG_DIR.DIRECTORY_SEPARATOR."config.json", $final_data, Cache::JSON, true); |
|
167 | 167 | Config::getInstance()->loadConfigData(); |
168 | 168 | $saved = true; |
169 | - } catch (ConfigException $e) { |
|
169 | + }catch (ConfigException $e) { |
|
170 | 170 | Logger::log($e->getMessage(), LOG_ERR); |
171 | 171 | } |
172 | 172 | return $saved; |
@@ -198,7 +198,7 @@ discard block |
||
198 | 198 | */ |
199 | 199 | public function getPropelParams() |
200 | 200 | { |
201 | - return Cache::getInstance()->getDataFromFile(__DIR__ . DIRECTORY_SEPARATOR . 'properties.json', Cache::JSON, true); |
|
201 | + return Cache::getInstance()->getDataFromFile(__DIR__.DIRECTORY_SEPARATOR.'properties.json', Cache::JSON, true); |
|
202 | 202 | } |
203 | 203 | |
204 | 204 | /** |
@@ -210,12 +210,12 @@ discard block |
||
210 | 210 | { |
211 | 211 | try { |
212 | 212 | if (!is_dir($dir) && @mkdir($dir, 0775, true) === false) { |
213 | - throw new \Exception(_('Can\'t create directory ') . $dir); |
|
213 | + throw new \Exception(_('Can\'t create directory ').$dir); |
|
214 | 214 | } |
215 | - } catch (\Exception $e) { |
|
215 | + }catch (\Exception $e) { |
|
216 | 216 | Logger::log($e->getMessage(), LOG_WARNING); |
217 | 217 | if (!file_exists(dirname($dir))) { |
218 | - throw new ConfigException($e->getMessage() . $dir); |
|
218 | + throw new ConfigException($e->getMessage().$dir); |
|
219 | 219 | } |
220 | 220 | } |
221 | 221 | } |
@@ -227,10 +227,10 @@ discard block |
||
227 | 227 | { |
228 | 228 | $rootDirs = array("css", "js", "media", "font"); |
229 | 229 | foreach ($rootDirs as $dir) { |
230 | - if (file_exists(WEB_DIR . DIRECTORY_SEPARATOR . $dir)) { |
|
230 | + if (file_exists(WEB_DIR.DIRECTORY_SEPARATOR.$dir)) { |
|
231 | 231 | try { |
232 | - @shell_exec("rm -rf " . WEB_DIR . DIRECTORY_SEPARATOR . $dir); |
|
233 | - } catch (\Exception $e) { |
|
232 | + @shell_exec("rm -rf ".WEB_DIR.DIRECTORY_SEPARATOR.$dir); |
|
233 | + }catch (\Exception $e) { |
|
234 | 234 | Logger::log($e->getMessage()); |
235 | 235 | } |
236 | 236 | } |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | */ |
243 | 243 | public function loadConfigData() |
244 | 244 | { |
245 | - $this->config = Cache::getInstance()->getDataFromFile(CONFIG_DIR . DIRECTORY_SEPARATOR . "config.json", |
|
245 | + $this->config = Cache::getInstance()->getDataFromFile(CONFIG_DIR.DIRECTORY_SEPARATOR."config.json", |
|
246 | 246 | Cache::JSON, |
247 | 247 | TRUE) ?: []; |
248 | 248 | $this->debug = (array_key_exists('debug', $this->config)) ? (bool)$this->config['debug'] : FALSE; |
@@ -8,7 +8,6 @@ |
||
8 | 8 | use PSFS\base\Logger; |
9 | 9 | use PSFS\base\Request; |
10 | 10 | use PSFS\base\types\SingletonTrait; |
11 | -use PSFS\controller\UserController; |
|
12 | 11 | |
13 | 12 | /** |
14 | 13 | * Class Config |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | /** |
200 | 200 | * Method that returns a config value |
201 | 201 | * @param string $param |
202 | - * @param mixed $defaultValue |
|
202 | + * @param boolean $defaultValue |
|
203 | 203 | * |
204 | 204 | * @return mixed|null |
205 | 205 | */ |
@@ -284,8 +284,8 @@ discard block |
||
284 | 284 | /** |
285 | 285 | * Static wrapper for extracting params |
286 | 286 | * @param string $key |
287 | - * @param mixed|null $defaultValue |
|
288 | - * @return mixed|null |
|
287 | + * @param boolean $defaultValue |
|
288 | + * @return string |
|
289 | 289 | */ |
290 | 290 | public static function getParam($key, $defaultValue = null) { |
291 | 291 | $param = Config::getInstance()->get($key); |