@@ -77,13 +77,13 @@ discard block |
||
77 | 77 | private function setLocale() |
78 | 78 | { |
79 | 79 | $this->locale = $this->config->get("default_language"); |
80 | - Logger::log('Set locale to project [' . $this->locale . ']'); |
|
80 | + Logger::log('Set locale to project ['.$this->locale.']'); |
|
81 | 81 | // Load translations |
82 | - putenv("LC_ALL=" . $this->locale); |
|
82 | + putenv("LC_ALL=".$this->locale); |
|
83 | 83 | setlocale(LC_ALL, $this->locale); |
84 | 84 | // Load the locale path |
85 | - $locale_path = BASE_DIR . DIRECTORY_SEPARATOR . 'locale'; |
|
86 | - Logger::log('Set locale dir ' . $locale_path); |
|
85 | + $locale_path = BASE_DIR.DIRECTORY_SEPARATOR.'locale'; |
|
86 | + Logger::log('Set locale dir '.$locale_path); |
|
87 | 87 | GeneratorHelper::createDir($locale_path); |
88 | 88 | bindtextdomain('translations', $locale_path); |
89 | 89 | textdomain('translations'); |
@@ -104,20 +104,20 @@ discard block |
||
104 | 104 | if (!$this->parser->isFile()) { |
105 | 105 | return $this->router->execute($this->actualUri); |
106 | 106 | } |
107 | - } else { |
|
107 | + }else { |
|
108 | 108 | return ConfigController::getInstance()->config(); |
109 | 109 | } |
110 | - } catch (AdminCredentialsException $a) { |
|
110 | + }catch (AdminCredentialsException $a) { |
|
111 | 111 | return UserController::showAdminManager(); |
112 | - } catch (ConfigException $c) { |
|
112 | + }catch (ConfigException $c) { |
|
113 | 113 | return $this->dumpException($c); |
114 | - } catch (SecurityException $s) { |
|
114 | + }catch (SecurityException $s) { |
|
115 | 115 | return $this->security->notAuthorized($this->actualUri); |
116 | - } catch (UserAuthException $u) { |
|
116 | + }catch (UserAuthException $u) { |
|
117 | 117 | $this->redirectToHome(); |
118 | - } catch (RouterException $r) { |
|
118 | + }catch (RouterException $r) { |
|
119 | 119 | return $this->router->httpNotFound($r); |
120 | - } catch (\Exception $e) { |
|
120 | + }catch (\Exception $e) { |
|
121 | 121 | return $this->dumpException($e); |
122 | 122 | } |
123 | 123 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $use /= 1024; |
165 | 165 | break; |
166 | 166 | case "MBytes": |
167 | - $use /= (1024 * 1024); |
|
167 | + $use /= (1024*1024); |
|
168 | 168 | break; |
169 | 169 | case "Bytes": |
170 | 170 | default: |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | if ($this->config->getDebugMode() && $this->config->get('errors.strict', false)) { |
191 | 191 | Logger::log('Added handlers for errors'); |
192 | 192 | //Warning & Notice handler |
193 | - set_error_handler(function ($errno, $errstr, $errfile, $errline) { |
|
193 | + set_error_handler(function($errno, $errstr, $errfile, $errline) { |
|
194 | 194 | Logger::log($errstr, LOG_CRIT, ['file' => $errfile, 'line' => $errline]); |
195 | 195 | throw new \Exception($errstr, 500); |
196 | 196 | }); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | Logger::log('Initializing stats (mem + ts)'); |
206 | 206 | if (null !== $_SERVER && array_key_exists('REQUEST_TIME_FLOAT', $_SERVER)) { |
207 | 207 | $this->ts = (float)$_SERVER['REQUEST_TIME_FLOAT']; |
208 | - } else { |
|
208 | + }else { |
|
209 | 209 | $this->ts = $this->parser->getTs(); |
210 | 210 | } |
211 | 211 | $this->mem = memory_get_usage(); |
@@ -2,7 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace PSFS\base\types; |
4 | 4 | |
5 | -require_once __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'bootstrap.php'; |
|
5 | +require_once __DIR__.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'bootstrap.php'; |
|
6 | 6 | /** |
7 | 7 | * Class SingletonTrait |
8 | 8 | * @package PSFS\base\types |