Passed
Push — master ( 1825af...e5ac3d )
by Fran
03:15
created
src/base/config/Config.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
      */
98 98
     protected function init()
99 99
     {
100
-        if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . self::CONFIG_FILE)) {
100
+        if (file_exists(CONFIG_DIR.DIRECTORY_SEPARATOR.self::CONFIG_FILE)) {
101 101
             $this->loadConfigData();
102 102
         }
103 103
         return $this;
@@ -212,13 +212,13 @@  discard block
 block discarded – undo
212 212
         $finalData = self::saveExtraParams($data);
213 213
         $saved = false;
214 214
         try {
215
-            $finalData = array_filter($finalData, function ($key, $value) {
215
+            $finalData = array_filter($finalData, function($key, $value) {
216 216
                 return in_array($key, self::$required, true) || !empty($value);
217 217
             }, ARRAY_FILTER_USE_BOTH);
218
-            $saved = (false !== file_put_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . self::CONFIG_FILE, json_encode($finalData, JSON_PRETTY_PRINT)));
218
+            $saved = (false !== file_put_contents(CONFIG_DIR.DIRECTORY_SEPARATOR.self::CONFIG_FILE, json_encode($finalData, JSON_PRETTY_PRINT)));
219 219
             self::getInstance()->loadConfigData();
220 220
             $saved = true;
221
-        } catch (ConfigException $e) {
221
+        }catch (ConfigException $e) {
222 222
             Logger::log($e->getMessage(), LOG_ERR);
223 223
         }
224 224
         return $saved;
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
      */
251 251
     public function loadConfigData(): void
252 252
     {
253
-        $this->config = json_decode(file_get_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . self::CONFIG_FILE), true) ?: [];
253
+        $this->config = json_decode(file_get_contents(CONFIG_DIR.DIRECTORY_SEPARATOR.self::CONFIG_FILE), true) ?: [];
254 254
         $this->debug = array_key_exists('debug', $this->config) ? (bool)$this->config['debug'] : FALSE;
255 255
         if (array_key_exists('cache.var', $this->config)) {
256 256
             Security::getInstance()->setSessionKey('config.cache.var', $this->config['cache.var']);
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
     public static function getParam($key, $defaultValue = null, $module = null)
276 276
     {
277 277
         if (null !== $module) {
278
-            return self::getParam(strtolower($module) . '.' . $key, self::getParam($key, $defaultValue));
278
+            return self::getParam(strtolower($module).'.'.$key, self::getParam($key, $defaultValue));
279 279
         }
280 280
         $param = self::getInstance()->get($key);
281 281
         return (null !== $param) ? $param : $defaultValue;
@@ -291,8 +291,8 @@  discard block
 block discarded – undo
291 291
     {
292 292
         $done = true;
293 293
         foreach (self::$cleanable_config_files as $configFile) {
294
-            if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . $configFile)) {
295
-                if (!unlink(CONFIG_DIR . DIRECTORY_SEPARATOR . $configFile)) {
294
+            if (file_exists(CONFIG_DIR.DIRECTORY_SEPARATOR.$configFile)) {
295
+                if (!unlink(CONFIG_DIR.DIRECTORY_SEPARATOR.$configFile)) {
296 296
                     $done = false;
297 297
                 }
298 298
             }
Please login to merge, or discard this patch.