Passed
Push — master ( 71a986...d378fe )
by Fran
04:06
created
src/base/config/Config.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
src/base/types/helpers/SecurityHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
             && (preg_match('/^\/(admin|setup\-admin)/i', $route) || NULL !== Config::getInstance()->get('restricted'))
24 24
         ) {
25 25
 
26
-            if(!file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) {
26
+            if (!file_exists(CONFIG_DIR.DIRECTORY_SEPARATOR.'admins.json')) {
27 27
                 //Si no hay fichero de usuarios redirigimos directamente al gestor
28 28
                 return UserController::getInstance()->adminers();
29 29
             }
Please login to merge, or discard this patch.