Passed
Push — master ( dd9457...9bc0cf )
by Fran
03:07
created
src/base/config/Config.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     protected function init()
76 76
     {
77
-        if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . self::CONFIG_FILE)) {
77
+        if (file_exists(CONFIG_DIR.DIRECTORY_SEPARATOR.self::CONFIG_FILE)) {
78 78
             $this->loadConfigData();
79 79
         }
80 80
         return $this;
@@ -190,10 +190,10 @@  discard block
 block discarded – undo
190 190
             $final_data = array_filter($final_data, function($key, $value) {
191 191
                 return in_array($key, self::$required, true) || !empty($value);
192 192
             }, ARRAY_FILTER_USE_BOTH);
193
-            $saved = (false !== file_put_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . self::CONFIG_FILE, json_encode($final_data, JSON_PRETTY_PRINT)));
193
+            $saved = (false !== file_put_contents(CONFIG_DIR.DIRECTORY_SEPARATOR.self::CONFIG_FILE, json_encode($final_data, JSON_PRETTY_PRINT)));
194 194
             self::getInstance()->loadConfigData();
195 195
             $saved = true;
196
-        } catch (ConfigException $e) {
196
+        }catch (ConfigException $e) {
197 197
             Logger::log($e->getMessage(), LOG_ERR);
198 198
         }
199 199
         return $saved;
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
      */
226 226
     public function loadConfigData()
227 227
     {
228
-        $this->config = json_decode(file_get_contents(CONFIG_DIR . DIRECTORY_SEPARATOR . self::CONFIG_FILE), true) ?: [];
228
+        $this->config = json_decode(file_get_contents(CONFIG_DIR.DIRECTORY_SEPARATOR.self::CONFIG_FILE), true) ?: [];
229 229
         $this->debug = array_key_exists('debug', $this->config) ? (bool)$this->config['debug'] : FALSE;
230 230
     }
231 231
 
@@ -246,8 +246,8 @@  discard block
 block discarded – undo
246 246
      */
247 247
     public static function getParam($key, $defaultValue = null, $module = null)
248 248
     {
249
-        if(null !== $module) {
250
-            return self::getParam(strtolower($module) . '.' . $key, self::getParam($key, $defaultValue));
249
+        if (null !== $module) {
250
+            return self::getParam(strtolower($module).'.'.$key, self::getParam($key, $defaultValue));
251 251
         }
252 252
         $param = self::getInstance()->get($key);
253 253
         return (null !== $param) ? $param : $defaultValue;
Please login to merge, or discard this patch.