Passed
Push — master ( 283335...4a2fc2 )
by Fran
18:22 queued 08:26
created
src/base/types/helpers/DocumentorHelper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
         ];
44 44
         if ($endpoint['payload']['is_array']) {
45 45
             $schema['items'] = [
46
-                '$ref' => '#/definitions/' . $endpoint['payload']['type'],
46
+                '$ref' => '#/definitions/'.$endpoint['payload']['type'],
47 47
             ];
48
-        } else {
49
-            $schema['$ref'] = '#/definitions/' . $endpoint['payload']['type'];
48
+        }else {
49
+            $schema['$ref'] = '#/definitions/'.$endpoint['payload']['type'];
50 50
         }
51 51
         if (!self::searchPayloadParam($paths[$url][$method]['parameters'], $endpoint['payload']['type'])) {
52 52
             $paths[$url][$method]['parameters'][] = [
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
             if (array_key_exists('data', $endpoint['return']) && count(array_keys($object)) === count(array_keys($endpoint['return']['data']))) {
78 78
                 $classDefinition = [
79 79
                     'type' => 'object',
80
-                    '$ref' => '#/definitions/' . $class,
80
+                    '$ref' => '#/definitions/'.$class,
81 81
                 ];
82
-            } else {
82
+            }else {
83 83
                 $classDefinition = [
84 84
                     'type' => 'array',
85 85
                     'items' => [
86
-                        '$ref' => '#/definitions/' . $class,
86
+                        '$ref' => '#/definitions/'.$class,
87 87
                     ],
88 88
                 ];
89 89
             }
Please login to merge, or discard this patch.
src/base/types/helpers/ApiHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
     {
153 153
         if ($mappedColumn->getSize() > 100) {
154 154
             $fDto = self::createField($field, Field::TEXTAREA_TYPE, $required);
155
-        } else {
155
+        }else {
156 156
             $fDto = self::generateStringField($field, $required);
157 157
         }
158 158
         return $fDto;
Please login to merge, or discard this patch.
src/base/Template.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         $dump = '';
121 121
         try {
122 122
             $dump = $this->tpl->render($tpl, $vars);
123
-        } catch (\Exception $e) {
123
+        }catch (\Exception $e) {
124 124
             Logger::log($e->getMessage(), LOG_ERR);
125 125
         }
126 126
         return $dump;
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     public function regenerateTemplates()
148 148
     {
149 149
         $this->generateTemplatesCache();
150
-        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR . DIRECTORY_SEPARATOR . 'domains.json', Cache::JSON, true);
150
+        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR.DIRECTORY_SEPARATOR.'domains.json', Cache::JSON, true);
151 151
         $translations = [];
152 152
         if (is_array($domains)) {
153 153
             $translations = $this->parsePathTranslations($domains);
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
             // force compilation
173 173
             if ($file->isFile()) {
174 174
                 try {
175
-                    $this->tpl->load(str_replace($tplDir . '/', '', $file));
176
-                } catch (\Exception $e) {
175
+                    $this->tpl->load(str_replace($tplDir.'/', '', $file));
176
+                }catch (\Exception $e) {
177 177
                     Logger::log($e->getMessage(), LOG_ERR, ['file' => $e->getFile(), 'line' => $e->getLine()]);
178 178
                 }
179 179
             }
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
      */
254 254
     private function loadDomains()
255 255
     {
256
-        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR . DIRECTORY_SEPARATOR . 'domains.json', Cache::JSON, true);
256
+        $domains = Cache::getInstance()->getDataFromFile(CONFIG_DIR.DIRECTORY_SEPARATOR.'domains.json', Cache::JSON, true);
257 257
         if (null !== $domains) {
258 258
             foreach ($domains as $domain => $paths) {
259 259
                 $this->addPath($paths['template'], preg_replace('/(@|\/)/', '', $domain));
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
     {
269 269
         $loader = new FilesystemLoader(GeneratorHelper::getTemplatePath());
270 270
         $this->tpl = new Environment($loader, array(
271
-            'cache' => CACHE_DIR . DIRECTORY_SEPARATOR . 'twig',
271
+            'cache' => CACHE_DIR.DIRECTORY_SEPARATOR.'twig',
272 272
             'debug' => (bool)$this->debug,
273 273
             'auto_reload' => Config::getParam('twig.autoreload', TRUE),
274 274
         ));
Please login to merge, or discard this patch.
src/controller/base/Admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,9 +38,9 @@
 block discarded – undo
38 38
         if (self::isTest()) {
39 39
             throw new UserAuthException();
40 40
         }
41
-        if (file_exists(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json')) {
41
+        if (file_exists(CONFIG_DIR.DIRECTORY_SEPARATOR.'admins.json')) {
42 42
             return AdminServices::getInstance()->setAdminHeaders();
43
-        } else {
43
+        }else {
44 44
             return UserController::showAdminManager();
45 45
         }
46 46
     }
Please login to merge, or discard this patch.
src/controller/UserController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                 Logger::log('Configuration saved successful');
66 66
                 Security::getInstance()->setFlash("callback_message", t("Usuario agregado correctamente"));
67 67
                 Security::getInstance()->setFlash("callback_route", Router::getInstance()->getRoute("admin", true));
68
-            } else {
68
+            }else {
69 69
                 throw new ConfigException(t('Error al guardar los administradores, prueba a cambiar los permisos'));
70 70
             }
71 71
         }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     {
100 100
         if ($this->isAdmin()) {
101 101
             $this->redirect('admin');
102
-        } else {
102
+        }else {
103 103
             return Admin::staticAdminLogon();
104 104
         }
105 105
     }
Please login to merge, or discard this patch.
src/base/types/traits/Router/SluggerTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
     {
51 51
         $this->generateSlugs();
52 52
         GeneratorHelper::createDir(CONFIG_DIR);
53
-        Cache::getInstance()->storeData(CONFIG_DIR . DIRECTORY_SEPARATOR . 'urls.json', [$this->routing, $this->getSlugs()], Cache::JSON, TRUE);
53
+        Cache::getInstance()->storeData(CONFIG_DIR.DIRECTORY_SEPARATOR.'urls.json', [$this->routing, $this->getSlugs()], Cache::JSON, TRUE);
54 54
 
55 55
         return $this;
56 56
     }
Please login to merge, or discard this patch.
src/base/types/helpers/SlackHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
             'attachments' => [
31 31
                 [
32 32
                     "author_name" => $request->getRootUrl(true),
33
-                    "text" => $file . ($line !== '' ? ' [' . $line . ']' : ''),
33
+                    "text" => $file.($line !== '' ? ' ['.$line.']' : ''),
34 34
                     "color" => Config::getParam('debug', true) ? 'warning' : "danger",
35 35
                     "title" => $message,
36 36
                     'fallback' => 'PSFS Error notifier',
Please login to merge, or discard this patch.
src/base/extension/AssetsNode.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,20 +34,20 @@
 block discarded – undo
34 34
         $scripts = $this->getNode("scripts");
35 35
 
36 36
         //Creamos el parser
37
-        $compiler->addDebugInfo($scripts)->write('$parser = new \\PSFS\\base\\extension\\AssetsParser(\'' . $this->type . '\')')
37
+        $compiler->addDebugInfo($scripts)->write('$parser = new \\PSFS\\base\\extension\\AssetsParser(\''.$this->type.'\')')
38 38
             ->raw(";\n");
39 39
 
40 40
         //Asociamos el hash
41
-        $compiler->write('$parser->setHash(\'' . $this->hash . '\')')
41
+        $compiler->write('$parser->setHash(\''.$this->hash.'\')')
42 42
             ->raw(";\n");
43 43
 
44 44
         //Inicializamos SRI
45
-        $compiler->write('$parser->init(\'' . $this->type . '\')')
45
+        $compiler->write('$parser->init(\''.$this->type.'\')')
46 46
             ->raw(";\n");
47 47
 
48 48
         //Asociamos los ficheros
49 49
         foreach ($scripts->getAttribute("value") as $value) {
50
-            $compiler->write('$parser->addFile(\'' . $value . '\')')->raw(";\n");
50
+            $compiler->write('$parser->addFile(\''.$value.'\')')->raw(";\n");
51 51
         }
52 52
 
53 53
         //Procesamos los ficheros
Please login to merge, or discard this patch.
src/base/types/CurlService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     {
89 89
         $headers = [];
90 90
         foreach ($this->getHeaders() as $key => $value) {
91
-            $headers[] = $key . ': ' . $value;
91
+            $headers[] = $key.': '.$value;
92 92
         }
93 93
         $headers[self::PSFS_TRACK_HEADER] = Logger::getUid();
94 94
         if (count($headers)) {
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             case Request::VERB_GET:
119 119
                 if (!empty($this->params)) {
120 120
                     $sep = !str_contains($this->getUrl(), '?') ? '?' : '';
121
-                    $this->setUrl($this->getUrl() . $sep . http_build_query($this->getParams()), false);
121
+                    $this->setUrl($this->getUrl().$sep.http_build_query($this->getParams()), false);
122 122
                 }
123 123
                 break;
124 124
             case Request::VERB_POST:
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         if ($this->isDebug() && is_resource($verbose)) {
150 150
             $this->dumpVerboseLogs($verbose);
151 151
         }
152
-        Logger::log($this->getUrl() . ' response: ', LOG_DEBUG, is_array($this->getRawResult()) ? $this->getRawResult() : [$this->getRawResult()]);
152
+        Logger::log($this->getUrl().' response: ', LOG_DEBUG, is_array($this->getRawResult()) ? $this->getRawResult() : [$this->getRawResult()]);
153 153
         $this->info = array_merge($this->info, curl_getinfo($this->con));
154 154
     }
155 155
 
Please login to merge, or discard this patch.