Passed
Push — master ( 1dadf3...61c4e2 )
by Fran
03:43
created
src/base/types/helpers/ApiHelper.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@
 block discarded – undo
192 192
 
193 193
     /**
194 194
      * @param ColumnMap $column
195
-     * @param ModelCriteria $quwuery
195
+     * @param ModelCriteria $query
196 196
      * @param mixed $value
197 197
      */
198 198
     private static function addQueryFilter(ColumnMap $column, ModelCriteria &$query, $value = null) {
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
             } elseif ($mappedColumn->isNumeric()) {
39 39
                 $fDto = self::generateNumericField($field, $required);
40 40
             } elseif ($mappedColumn->isText()) {
41
-                if($mappedColumn->getSize() > 100) {
41
+                if ($mappedColumn->getSize() > 100) {
42 42
                     $fDto = self::createField($field, Field::TEXTAREA_TYPE, $required);
43
-                } else {
43
+                }else {
44 44
                     $fDto = self::generateStringField($field, $required);
45 45
                 }
46 46
             } elseif ($mappedColumn->getType() === PropelTypes::BOOLEAN) {
@@ -49,9 +49,9 @@  discard block
 block discarded – undo
49 49
                 $fDto = self::generatePasswordField($field, $required);
50 50
             } elseif (in_array($mappedColumn->getType(), [PropelTypes::TIMESTAMP, PropelTypes::DATE, PropelTypes::BU_DATE, PropelTypes::BU_TIMESTAMP])) {
51 51
                 $fDto = self::createField($field, $mappedColumn->getType() == PropelTypes::TIMESTAMP ? Field::TEXT_TYPE : Field::DATE, $required);
52
-            } elseif(in_array($mappedColumn->getType(), [PropelTypes::ENUM, PropelTypes::SET])) {
52
+            } elseif (in_array($mappedColumn->getType(), [PropelTypes::ENUM, PropelTypes::SET])) {
53 53
                 $fDto = self::generateEnumField($field, $required);
54
-                foreach($mappedColumn->getValueSet() as $value) {
54
+                foreach ($mappedColumn->getValueSet() as $value) {
55 55
                     $fDto->data[] = [
56 56
                         $field => $value,
57 57
                         "Label" => _($value),
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
                 }
60 60
             }
61 61
 
62
-            if(null !== $fDto) {
62
+            if (null !== $fDto) {
63 63
                 $fDto->size = $mappedColumn->getSize();
64 64
                 $form->addField($fDto);
65 65
             }
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $fDto->entity = $relatedModel;
84 84
         $relatedField = $foreignTable->getColumn($mappedColumn->getRelatedColumnName());
85 85
         $fDto->relatedField = $relatedField->getPhpName();
86
-        $fDto->url = Router::getInstance()->getRoute('api-' . $relatedModel);
86
+        $fDto->url = Router::getInstance()->getRoute('api-'.$relatedModel);
87 87
         return $fDto;
88 88
     }
89 89
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
     public static function checkFieldExists(TableMap $tableMap, $field) {
189 189
         try {
190 190
             $column = $tableMap->getColumnByPhpName($field);
191
-        } catch(\Exception $e) {
191
+        }catch (\Exception $e) {
192 192
             Logger::log($e->getMessage(), LOG_ERR);
193 193
             $column = null;
194 194
         }
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
      * @param ModelCriteria $quwuery
201 201
      * @param mixed $value
202 202
      */
203
-    private static function addQueryFilter(ColumnMap $column, ModelCriteria &$query, $value = null) {
203
+    private static function addQueryFilter(ColumnMap $column, ModelCriteria & $query, $value = null) {
204 204
         $tableField = $column->getPhpName();
205 205
         if (preg_match('/^<=/', $value)) {
206 206
             $query->filterBy($tableField, substr($value, 2, strlen($value)), Criteria::LESS_EQUAL);
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             $text = preg_replace('/(\'|\")/', '', $value);
215 215
             $text = preg_replace('/\ /', '%', $text);
216 216
             $query->filterBy($tableField, '%'.$text.'%', Criteria::LIKE);
217
-        } else {
217
+        }else {
218 218
             $query->filterBy($tableField, $value, Criteria::EQUAL);
219 219
         }
220 220
     }
@@ -225,23 +225,23 @@  discard block
 block discarded – undo
225 225
      * @param array $extraColumns
226 226
      * @param mixed $value
227 227
      */
228
-    public static function composerComboField(TableMap $tableMap, ModelCriteria &$query, array $extraColumns = [], $value = null) {
228
+    public static function composerComboField(TableMap $tableMap, ModelCriteria & $query, array $extraColumns = [], $value = null) {
229 229
         $exp = 'CONCAT(';
230 230
         $sep = '';
231
-        foreach($tableMap->getColumns() as $column) {
232
-            if($column->isText()) {
233
-                $exp .= $sep . 'IFNULL(' . $column->getFullyQualifiedName() . ',"")';
231
+        foreach ($tableMap->getColumns() as $column) {
232
+            if ($column->isText()) {
233
+                $exp .= $sep.'IFNULL('.$column->getFullyQualifiedName().',"")';
234 234
                 $sep = ', " ", ';
235 235
             }
236 236
         }
237
-        foreach($extraColumns as $extra => $name) {
238
-            $exp .= $sep . $extra;
237
+        foreach ($extraColumns as $extra => $name) {
238
+            $exp .= $sep.$extra;
239 239
             $sep = ', " ", ';
240 240
         }
241 241
         $exp .= ")";
242 242
         $text = preg_replace('/(\'|\")/', '', $value);
243 243
         $text = preg_replace('/\ /', '%', $text);
244
-        $query->where($exp . Criteria::LIKE . '"%' . $text . '%"');
244
+        $query->where($exp.Criteria::LIKE.'"%'.$text.'%"');
245 245
     }
246 246
 
247 247
     /**
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
      * @param string $field
252 252
      * @param mixed $value
253 253
      */
254
-    public static function addModelField(TableMap $tableMap, ModelCriteria &$query, $field, $value = null) {
254
+    public static function addModelField(TableMap $tableMap, ModelCriteria & $query, $field, $value = null) {
255 255
         if ($column = self::checkFieldExists($tableMap, $field)) {
256 256
             self::addQueryFilter($column, $query, $value);
257 257
         }
Please login to merge, or discard this patch.
src/bootstrap.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -4,17 +4,17 @@
 block discarded – undo
4 4
 
5 5
 if (!defined('SOURCE_DIR')) define('SOURCE_DIR', __DIR__);
6 6
 if (preg_match('/vendor/', SOURCE_DIR)) {
7
-    if (!defined('BASE_DIR')) define('BASE_DIR', SOURCE_DIR . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..');
8
-    if (!defined('CORE_DIR')) define('CORE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'src');
9
-} else {
10
-    if (!defined('BASE_DIR')) define('BASE_DIR', SOURCE_DIR . DIRECTORY_SEPARATOR . '..');
11
-    if (!defined('CORE_DIR')) define('CORE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'modules');
7
+    if (!defined('BASE_DIR')) define('BASE_DIR', SOURCE_DIR.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'..');
8
+    if (!defined('CORE_DIR')) define('CORE_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'src');
9
+}else {
10
+    if (!defined('BASE_DIR')) define('BASE_DIR', SOURCE_DIR.DIRECTORY_SEPARATOR.'..');
11
+    if (!defined('CORE_DIR')) define('CORE_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'modules');
12 12
 }
13
-if (!defined('VENDOR_DIR')) define('VENDOR_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'vendor');
14
-if (!defined('LOG_DIR')) define('LOG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'logs');
15
-if (!defined('CACHE_DIR')) define('CACHE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'cache');
16
-if (!defined('CONFIG_DIR')) define('CONFIG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'config');
17
-if (!defined('WEB_DIR')) define('WEB_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'html');
13
+if (!defined('VENDOR_DIR')) define('VENDOR_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'vendor');
14
+if (!defined('LOG_DIR')) define('LOG_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'logs');
15
+if (!defined('CACHE_DIR')) define('CACHE_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'cache');
16
+if (!defined('CONFIG_DIR')) define('CONFIG_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'config');
17
+if (!defined('WEB_DIR')) define('WEB_DIR', BASE_DIR.DIRECTORY_SEPARATOR.'html');
18 18
 
19 19
 //Cargamos en memoria la función de desarrollo PRE
20 20
 if (!function_exists('pre')) {
Please login to merge, or discard this patch.
Braces   +35 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,20 +1,42 @@
 block discarded – undo
1 1
 <?php
2
-if (defined('PSFS_BOOTSTRAP_LOADED')) return;
2
+if (defined('PSFS_BOOTSTRAP_LOADED')) {
3
+    return;
4
+}
3 5
 use Symfony\Component\Finder\Finder;
4 6
 
5
-if (!defined('SOURCE_DIR')) define('SOURCE_DIR', __DIR__);
7
+if (!defined('SOURCE_DIR')) {
8
+    define('SOURCE_DIR', __DIR__);
9
+}
6 10
 if (preg_match('/vendor/', SOURCE_DIR)) {
7
-    if (!defined('BASE_DIR')) define('BASE_DIR', SOURCE_DIR . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..');
8
-    if (!defined('CORE_DIR')) define('CORE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'src');
9
-} else {
10
-    if (!defined('BASE_DIR')) define('BASE_DIR', SOURCE_DIR . DIRECTORY_SEPARATOR . '..');
11
-    if (!defined('CORE_DIR')) define('CORE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'modules');
12
-}
13
-if (!defined('VENDOR_DIR')) define('VENDOR_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'vendor');
14
-if (!defined('LOG_DIR')) define('LOG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'logs');
15
-if (!defined('CACHE_DIR')) define('CACHE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'cache');
16
-if (!defined('CONFIG_DIR')) define('CONFIG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'config');
17
-if (!defined('WEB_DIR')) define('WEB_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'html');
11
+    if (!defined('BASE_DIR')) {
12
+        define('BASE_DIR', SOURCE_DIR . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..');
13
+    }
14
+    if (!defined('CORE_DIR')) {
15
+        define('CORE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'src');
16
+    }
17
+    } else {
18
+    if (!defined('BASE_DIR')) {
19
+        define('BASE_DIR', SOURCE_DIR . DIRECTORY_SEPARATOR . '..');
20
+    }
21
+    if (!defined('CORE_DIR')) {
22
+        define('CORE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'modules');
23
+    }
24
+    }
25
+if (!defined('VENDOR_DIR')) {
26
+    define('VENDOR_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'vendor');
27
+}
28
+if (!defined('LOG_DIR')) {
29
+    define('LOG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'logs');
30
+}
31
+if (!defined('CACHE_DIR')) {
32
+    define('CACHE_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'cache');
33
+}
34
+if (!defined('CONFIG_DIR')) {
35
+    define('CONFIG_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'config');
36
+}
37
+if (!defined('WEB_DIR')) {
38
+    define('WEB_DIR', BASE_DIR . DIRECTORY_SEPARATOR . 'html');
39
+}
18 40
 
19 41
 //Cargamos en memoria la función de desarrollo PRE
20 42
 if (!function_exists('pre')) {
Please login to merge, or discard this patch.
src/base/types/helpers/AdminHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     public static function sortByLabel(array $elementA, array $elementB) {
16 16
         $labelA = array_key_exists('label', $elementA) ? $elementA['label'] : '';
17 17
         $labelB = array_key_exists('label', $elementB) ? $elementB['label'] : '';
18
-        if($labelA == $labelB) {
18
+        if ($labelA == $labelB) {
19 19
             return 0;
20 20
         }
21 21
         return $labelA < $labelB ? -1 : 1;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
             if (preg_match('/^\/admin(\/|$)/', $routePattern)) {
34 34
                 if (preg_match('/^\\\?PSFS/', $params["class"])) {
35 35
                     $profile = "superadmin";
36
-                } else {
36
+                }else {
37 37
                     $profile = "admin";
38 38
                 }
39 39
                 if (!empty($params["default"]) && preg_match('/(GET|ALL)/i', $httpMethod)) {
Please login to merge, or discard this patch.
src/base/types/helpers/InjectorHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public static function extractVariables(\ReflectionClass $reflector) {
17 17
         $variables = [];
18
-        foreach($reflector->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
18
+        foreach ($reflector->getProperties(\ReflectionProperty::IS_PUBLIC) as $property) {
19 19
             $instanceType = self::extractVarType($property->getDocComment());
20 20
             if (null !== $instanceType) {
21 21
                 $variables[$property->getName()] = $instanceType;
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public static function constructInyectableInstance($variable, $singleton, $classNameSpace, $calledClass)
71 71
     {
72
-        Logger::log('Create inyectable instance for ' . $classNameSpace);
72
+        Logger::log('Create inyectable instance for '.$classNameSpace);
73 73
         $reflector = new \ReflectionClass($calledClass);
74 74
         $property = $reflector->getProperty($variable);
75 75
         $varInstanceType = (null === $classNameSpace) ? InjectorHelper::extractVarType($property->getDocComment()) : $classNameSpace;
76 76
         if (true === $singleton && method_exists($varInstanceType, "getInstance")) {
77 77
             $instance = $varInstanceType::getInstance();
78
-        } else {
78
+        }else {
79 79
             $instance = new $varInstanceType();
80 80
         }
81 81
         return $instance;
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     public static function getClassProperties($class)
90 90
     {
91 91
         $properties = [];
92
-        Logger::log('Extracting annotations properties from class ' . $class);
92
+        Logger::log('Extracting annotations properties from class '.$class);
93 93
         $selfReflector = new \ReflectionClass($class);
94 94
         if (false !== $selfReflector->getParentClass()) {
95 95
             $properties = self::getClassProperties($selfReflector->getParentClass()->getName());
Please login to merge, or discard this patch.
src/base/Template.php 2 patches
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -8,10 +8,7 @@
 block discarded – undo
8 8
 use PSFS\base\extension\TemplateFunctions;
9 9
 use PSFS\base\types\helpers\GeneratorHelper;
10 10
 use PSFS\base\types\helpers\ResponseHelper;
11
-use PSFS\base\types\helpers\SecurityHelper;
12
-use PSFS\base\types\helpers\TemplateHelper;
13 11
 use PSFS\base\types\SingletonTrait;
14
-use PSFS\Dispatcher;
15 12
 
16 13
 
17 14
 class Template
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         ResponseHelper::setStatusHeader($this->status_code);
132 132
         ResponseHelper::setAuthHeaders($this->public_zone);
133 133
         ResponseHelper::setCookieHeaders($cookies);
134
-        header('Content-type: ' . $contentType);
134
+        header('Content-type: '.$contentType);
135 135
 
136 136
     }
137 137
 
@@ -147,15 +147,15 @@  discard block
 block discarded – undo
147 147
         Logger::log('Start output response');
148 148
         ob_start();
149 149
         $this->setReponseHeaders($contentType, $cookies);
150
-        header('Content-length: ' . strlen($output));
150
+        header('Content-length: '.strlen($output));
151 151
 
152 152
         $cache = Cache::needCache();
153 153
         if (false !== $cache && $this->status_code === Template::STATUS_OK && $this->debug === false) {
154 154
             Logger::log('Saving output response into cache');
155 155
             $cacheName = $this->cache->getRequestCacheHash();
156
-            $tmpDir = substr($cacheName, 0, 2) . DIRECTORY_SEPARATOR . substr($cacheName, 2, 2) . DIRECTORY_SEPARATOR;
157
-            $this->cache->storeData("json" . DIRECTORY_SEPARATOR . $tmpDir . $cacheName, $output);
158
-            $this->cache->storeData("json" . DIRECTORY_SEPARATOR . $tmpDir . $cacheName . ".headers", headers_list(), Cache::JSON);
156
+            $tmpDir = substr($cacheName, 0, 2).DIRECTORY_SEPARATOR.substr($cacheName, 2, 2).DIRECTORY_SEPARATOR;
157
+            $this->cache->storeData("json".DIRECTORY_SEPARATOR.$tmpDir.$cacheName, $output);
158
+            $this->cache->storeData("json".DIRECTORY_SEPARATOR.$tmpDir.$cacheName.".headers", headers_list(), Cache::JSON);
159 159
         }
160 160
         echo $output;
161 161
 
@@ -172,11 +172,11 @@  discard block
 block discarded – undo
172 172
     {
173 173
         Logger::log('Close template render');
174 174
         Security::getInstance()->setSessionKey("lastRequest", array(
175
-            "url" => Request::getInstance()->getRootUrl() . Request::requestUri(),
175
+            "url" => Request::getInstance()->getRootUrl().Request::requestUri(),
176 176
             "ts" => microtime(true),
177 177
         ));
178 178
         Security::getInstance()->updateSession();
179
-        Logger::log('End request: ' . Request::requestUri(), LOG_INFO);
179
+        Logger::log('End request: '.Request::requestUri(), LOG_INFO);
180 180
         exit;
181 181
     }
182 182
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
         $dump = '';
227 227
         try {
228 228
             $dump = $this->tpl->render($tpl, $vars);
229
-        } catch (\Exception $e) {
229
+        }catch (\Exception $e) {
230 230
             Logger::log($e->getMessage(), LOG_ERR);
231 231
         }
232 232
         return $dump;
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
     public function regenerateTemplates()
341 341
     {
342 342
         $this->generateTemplatesCache();
343
-        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR . DIRECTORY_SEPARATOR . "domains.json", Cache::JSON, true);
343
+        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR.DIRECTORY_SEPARATOR."domains.json", Cache::JSON, true);
344 344
         $translations = [];
345 345
         if (is_array($domains)) {
346 346
             $translations = $this->parsePathTranslations($domains);
@@ -362,8 +362,8 @@  discard block
 block discarded – undo
362 362
             // force compilation
363 363
             if ($file->isFile()) {
364 364
                 try {
365
-                    $this->tpl->load(str_replace($tplDir . '/', '', $file));
366
-                } catch (\Exception $e) {
365
+                    $this->tpl->load(str_replace($tplDir.'/', '', $file));
366
+                }catch (\Exception $e) {
367 367
                     Logger::log($e->getMessage(), LOG_ERR, ['file' => $e->getFile(), 'line' => $e->getLine()]);
368 368
                 }
369 369
             }
@@ -437,9 +437,9 @@  discard block
 block discarded – undo
437 437
      */
438 438
     private function loadDomains()
439 439
     {
440
-        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR . DIRECTORY_SEPARATOR . 'domains.json', Cache::JSON, true);
441
-        if(null !== $domains) {
442
-            foreach($domains as $domain => $paths) {
440
+        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR.DIRECTORY_SEPARATOR.'domains.json', Cache::JSON, true);
441
+        if (null !== $domains) {
442
+            foreach ($domains as $domain => $paths) {
443 443
                 $this->addPath($paths['template'], preg_replace('/(@|\/)/', '', $domain));
444 444
             }
445 445
         }
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
         $this->cache = Cache::getInstance();
455 455
         $loader = new \Twig_Loader_Filesystem(GeneratorHelper::getTemplatePath());
456 456
         $this->tpl = new \Twig_Environment($loader, array(
457
-            'cache' => CACHE_DIR . DIRECTORY_SEPARATOR . 'twig',
457
+            'cache' => CACHE_DIR.DIRECTORY_SEPARATOR.'twig',
458 458
             'debug' => (bool)$this->debug,
459 459
             'auto_reload' => Config::getParam('twig.auto_reload', TRUE),
460 460
         ));
Please login to merge, or discard this patch.
src/controller/ConfigController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
      * @route /admin/config/params
23 23
      * @label Parámetros de configuración de PSGS
24 24
      * @visible false
25
-     * @return mixed
25
+     * @return string|null
26 26
      */
27 27
     public function getConfigParams()
28 28
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         foreach ($domains as $domain => $routes) {
32 32
             $pDomain = str_replace('@', '', $domain);
33 33
             $pDomain = str_replace('/', '', $pDomain);
34
-            $response[] = strtolower($pDomain) . '.api.secret';
34
+            $response[] = strtolower($pDomain).'.api.secret';
35 35
         }
36 36
         return $this->json($response);
37 37
     }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function config()
47 47
     {
48
-        Logger::log("Config loaded executed by " . $this->getRequest()->getRequestUri());
48
+        Logger::log("Config loaded executed by ".$this->getRequest()->getRequestUri());
49 49
         /* @var $form \PSFS\base\config\ConfigForm */
50 50
         $form = new ConfigForm(Router::getInstance()->getRoute('admin-config'), Config::$required, Config::$optional, Config::getInstance()->dumpConfig());
51 51
         $form->build();
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
                 }
83 83
                 Security::getInstance()->setFlash("callback_message", _("Configuración actualizada correctamente"));
84 84
                 Security::getInstance()->setFlash("callback_route", $this->getRoute("admin-config", true));
85
-            } else {
85
+            }else {
86 86
                 throw new \HttpException(_('Error al guardar la configuración, prueba a cambiar los permisos'), 403);
87 87
             }
88 88
         }
Please login to merge, or discard this patch.
src/controller/UserController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                 Logger::log('Configuration saved successful');
64 64
                 Security::getInstance()->setFlash("callback_message", _("Usuario agregado correctamente"));
65 65
                 Security::getInstance()->setFlash("callback_route", Router::getInstance()->getRoute("admin", true));
66
-            } else {
66
+            }else {
67 67
                 throw new ConfigException(_('Error al guardar los administradores, prueba a cambiar los permisos'));
68 68
             }
69 69
         }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         if ($this->isAdmin()) {
101 101
             return $this->redirect('admin');
102
-        } else {
102
+        }else {
103 103
             return Admin::staticAdminLogon($route);
104 104
         }
105 105
     }
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
                 $cookies = array(
132 132
                     array(
133 133
                         "name" => Security::getInstance()->getHash(),
134
-                        "value" => base64_encode($form->getFieldValue("user") . ":" . $form->getFieldValue("pass")),
134
+                        "value" => base64_encode($form->getFieldValue("user").":".$form->getFieldValue("pass")),
135 135
                         "expire" => time() + 3600,
136 136
                         "http" => true,
137 137
                     )
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                     'status_message' => _("Acceso permitido... redirigiendo!!"),
143 143
                     'delay' => 1,
144 144
                 );
145
-            } else {
145
+            }else {
146 146
                 $form->setError("user", _("El usuario no tiene acceso a la web"));
147 147
             }
148 148
         }
Please login to merge, or discard this patch.
src/controller/GeneratorController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     public function generateModule()
32 32
     {
33
-        Logger::log("Arranque generador de módulos al solicitar " . $this->getRequest()->getRequestUri());
33
+        Logger::log("Arranque generador de módulos al solicitar ".$this->getRequest()->getRequestUri());
34 34
         /* @var $form \PSFS\base\config\ConfigForm */
35 35
         $form = new ModuleForm();
36 36
         $form->build();
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
                 $this->gen->createStructureModule($module, false, $type, (bool)$is_module);
62 62
                 Security::getInstance()->setFlash("callback_message", str_replace("%s", $module, _("Módulo %s generado correctamente")));
63 63
                 Security::getInstance()->setFlash("callback_route", $this->getRoute("admin-module", true));
64
-            } catch (\Exception $e) {
65
-                Logger::getInstance()->infoLog($e->getMessage() . " [" . $e->getFile() . ":" . $e->getLine() . "]");
64
+            }catch (\Exception $e) {
65
+                Logger::getInstance()->infoLog($e->getMessage()." [".$e->getFile().":".$e->getLine()."]");
66 66
                 throw new ConfigException(_('Error al generar el módulo, prueba a cambiar los permisos'), 403);
67 67
             }
68 68
         }
Please login to merge, or discard this patch.
src/controller/base/Admin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,10 +48,10 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public static function staticAdminLogon($route = null)
50 50
     {
51
-        if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) {
51
+        if (file_exists(CONFIG_DIR.DIRECTORY_SEPARATOR.'admins.json')) {
52 52
             if ('login' !== Config::getInstance()->get('admin_login')) {
53 53
                 return AdminServices::getInstance()->setAdminHeaders();
54
-            } else {
54
+            }else {
55 55
                 $form = new LoginForm();
56 56
                 $form->setData(array("route" => $route));
57 57
                 $form->build();
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                     'form' => $form,
62 62
                 ));
63 63
             }
64
-        } else {
64
+        }else {
65 65
             return UserController::showAdminManager();
66 66
         }
67 67
     }
Please login to merge, or discard this patch.