Test Failed
Push — master ( 79af4d...00f9a5 )
by Fran
02:26
created
src/services/GeneratorService.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     public function createStructureModule($module, $force = false, $type = "", $apiClass = "")
40 40
     {
41
-        $modPath = CORE_DIR . DIRECTORY_SEPARATOR;
41
+        $modPath = CORE_DIR.DIRECTORY_SEPARATOR;
42 42
         $module = ucfirst($module);
43 43
         $this->createModulePath($module, $modPath);
44 44
         $this->createModulePathTree($module, $modPath);
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
      */
60 60
     private function createModuleBaseFiles($module, $modPath, $force = false, $controllerType = '')
61 61
     {
62
-        $modulePath = $modPath . $module;
62
+        $modulePath = $modPath.$module;
63 63
         $this->generateControllerTemplate($module, $modulePath, $force, $controllerType);
64 64
         $this->generateServiceTemplate($module, $modulePath, $force);
65 65
         $this->genereateAutoloaderTemplate($module, $modulePath, $force);
@@ -87,28 +87,28 @@  discard block
 block discarded – undo
87 87
             "namespace" => preg_replace('/(\\\|\/)/', '\\', $module),
88 88
             "url" => preg_replace('/(\\\|\/)/', '/', $module),
89 89
             "class" => $class,
90
-            "controllerType" => $class . "Base",
90
+            "controllerType" => $class."Base",
91 91
             "is_base" => false
92 92
         ));
93
-        $controller = $this->writeTemplateToFile($controllerBody, $modPath . DIRECTORY_SEPARATOR . "Controller" .
94
-            DIRECTORY_SEPARATOR . "{$class}Controller.php", $force);
93
+        $controller = $this->writeTemplateToFile($controllerBody, $modPath.DIRECTORY_SEPARATOR."Controller".
94
+            DIRECTORY_SEPARATOR."{$class}Controller.php", $force);
95 95
 
96 96
         $controllerBody = $this->tpl->dump("generator/controller.template.twig", array(
97 97
             "module" => $module,
98 98
             "namespace" => preg_replace('/(\\\|\/)/', '\\', $module),
99 99
             "url" => preg_replace('/(\\\|\/)/', '/', $module),
100
-            "class" => $class . "Base",
100
+            "class" => $class."Base",
101 101
             "service" => $class,
102 102
             "controllerType" => $controllerType,
103 103
             "is_base" => true,
104 104
             "domain" => $class,
105 105
         ));
106
-        $controllerBase = $this->writeTemplateToFile($controllerBody, $modPath . DIRECTORY_SEPARATOR . "Controller" .
107
-            DIRECTORY_SEPARATOR . "base" . DIRECTORY_SEPARATOR . "{$class}BaseController.php", true);
106
+        $controllerBase = $this->writeTemplateToFile($controllerBody, $modPath.DIRECTORY_SEPARATOR."Controller".
107
+            DIRECTORY_SEPARATOR."base".DIRECTORY_SEPARATOR."{$class}BaseController.php", true);
108 108
 
109
-        $filename = $modPath . DIRECTORY_SEPARATOR . "Test" . DIRECTORY_SEPARATOR . "{$class}Test.php";
109
+        $filename = $modPath.DIRECTORY_SEPARATOR."Test".DIRECTORY_SEPARATOR."{$class}Test.php";
110 110
         $test = true;
111
-        if(!file_exists($filename)) {
111
+        if (!file_exists($filename)) {
112 112
             $testTemplate = $this->tpl->dump("generator/testCase.template.twig", array(
113 113
                 "module" => $module,
114 114
                 "namespace" => preg_replace('/(\\\|\/)/', '\\', $module),
@@ -127,8 +127,8 @@  discard block
 block discarded – undo
127 127
      */
128 128
     private function createModuleModels($module, $path)
129 129
     {
130
-        $modulePath = $path . $module;
131
-        $modulePath = str_replace(CORE_DIR . DIRECTORY_SEPARATOR, '', $modulePath);
130
+        $modulePath = $path.$module;
131
+        $modulePath = str_replace(CORE_DIR.DIRECTORY_SEPARATOR, '', $modulePath);
132 132
 
133 133
         $configGenerator = $this->getConfigGenerator($modulePath);
134 134
 
@@ -138,8 +138,8 @@  discard block
 block discarded – undo
138 138
         $configTemplate = $this->tpl->dump("generator/config.propel.template.twig", array(
139 139
             "module" => $module,
140 140
         ));
141
-        $this->writeTemplateToFile($configTemplate, CORE_DIR . DIRECTORY_SEPARATOR . $modulePath . DIRECTORY_SEPARATOR . "Config" .
142
-            DIRECTORY_SEPARATOR . "config.php", true);
141
+        $this->writeTemplateToFile($configTemplate, CORE_DIR.DIRECTORY_SEPARATOR.$modulePath.DIRECTORY_SEPARATOR."Config".
142
+            DIRECTORY_SEPARATOR."config.php", true);
143 143
         Logger::log("Generado config genérico para propel");
144 144
     }
145 145
 
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
     private function generateBaseApiTemplate($module, $modPath, $force = false, $apiClass = "")
155 155
     {
156 156
         $created = true;
157
-        $modelPath = $modPath . $module . DIRECTORY_SEPARATOR . 'Models';
158
-        $apiPath = $modPath . $module . DIRECTORY_SEPARATOR . 'Api';
157
+        $modelPath = $modPath.$module.DIRECTORY_SEPARATOR.'Models';
158
+        $apiPath = $modPath.$module.DIRECTORY_SEPARATOR.'Api';
159 159
         if (file_exists($modelPath)) {
160 160
             $dir = dir($modelPath);
161 161
             $this->generateApiFiles($module, $force, $apiClass, $dir, $apiPath);
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
         //Generamos el fichero de configuración
174 174
         Logger::log("Generamos fichero vacío de configuración");
175 175
         return $this->writeTemplateToFile("<?php\n\t",
176
-            $modPath . DIRECTORY_SEPARATOR . "Config" . DIRECTORY_SEPARATOR . "config.php",
176
+            $modPath.DIRECTORY_SEPARATOR."Config".DIRECTORY_SEPARATOR."config.php",
177 177
             $force);
178 178
     }
179 179
 
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
             "db" => $this->config->get("db_name"),
195 195
         ));
196 196
         return $this->writeTemplateToFile($schema,
197
-            $modPath . DIRECTORY_SEPARATOR . "Config" . DIRECTORY_SEPARATOR . "schema.xml",
197
+            $modPath.DIRECTORY_SEPARATOR."Config".DIRECTORY_SEPARATOR."schema.xml",
198 198
             $force);
199 199
     }
200 200
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
             "namespace" => preg_replace('/(\\\|\/)/', '', $module),
213 213
         ));
214 214
         return $this->writeTemplateToFile($buildProperties,
215
-            $modPath . DIRECTORY_SEPARATOR . "Config" . DIRECTORY_SEPARATOR . "propel.yml",
215
+            $modPath.DIRECTORY_SEPARATOR."Config".DIRECTORY_SEPARATOR."propel.yml",
216 216
             $force);
217 217
     }
218 218
 
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             "module" => $module,
231 231
         ));
232 232
         return $this->writeTemplateToFile($index,
233
-            $modPath . DIRECTORY_SEPARATOR . "Templates" . DIRECTORY_SEPARATOR . "index.html.twig",
233
+            $modPath.DIRECTORY_SEPARATOR."Templates".DIRECTORY_SEPARATOR."index.html.twig",
234 234
             $force);
235 235
     }
236 236
 
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         ));
261 261
 
262 262
         return $this->writeTemplateToFile($controller,
263
-            $modPath . DIRECTORY_SEPARATOR . 'base' . DIRECTORY_SEPARATOR . "{$api}BaseApi.php", true);
263
+            $modPath.DIRECTORY_SEPARATOR.'base'.DIRECTORY_SEPARATOR."{$api}BaseApi.php", true);
264 264
     }
265 265
 
266 266
     /**
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             "package" => $package,
286 286
         ));
287 287
 
288
-        return $this->writeTemplateToFile($controller, $modPath . DIRECTORY_SEPARATOR . "{$api}.php", $force);
288
+        return $this->writeTemplateToFile($controller, $modPath.DIRECTORY_SEPARATOR."{$api}.php", $force);
289 289
     }
290 290
 
291 291
     /**
@@ -302,15 +302,15 @@  discard block
 block discarded – undo
302 302
         $base = $dir->path;
303 303
         while ($file = $dir->read()) {
304 304
             if (!in_array(strtolower($file), ['.', '..', 'base', 'map'])) {
305
-                if (is_dir($base . DIRECTORY_SEPARATOR . $file)) {
306
-                    $this->generateApiFiles($module, $force, $apiClass, dir($base . DIRECTORY_SEPARATOR . $file), $apiPath . DIRECTORY_SEPARATOR . $file, $file);
307
-                } else if (!preg_match('/Query\.php$/i', $file)
305
+                if (is_dir($base.DIRECTORY_SEPARATOR.$file)) {
306
+                    $this->generateApiFiles($module, $force, $apiClass, dir($base.DIRECTORY_SEPARATOR.$file), $apiPath.DIRECTORY_SEPARATOR.$file, $file);
307
+                }else if (!preg_match('/Query\.php$/i', $file)
308 308
                     && !preg_match('/I18n\.php$/i', $file)
309 309
                     && preg_match('/\.php$/i', $file)
310 310
                 ) {
311 311
                     $filename = str_replace(".php", "", $file);
312 312
                     $this->log->addLog("Generamos Api BASES para {$filename}");
313
-                    if($this->checkIfIsModel($module, $filename, $package)) {
313
+                    if ($this->checkIfIsModel($module, $filename, $package)) {
314 314
                         $this->createApiBaseFile($module, $apiPath, $filename, $apiClass, $package);
315 315
                         $this->createApi($module, $apiPath, $force, $filename, $package);
316 316
                     }
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
             $parts[] = $package;
334 334
         }
335 335
         $parts[] = $filename;
336
-        $namespace = '\\' . implode('\\', $parts);
336
+        $namespace = '\\'.implode('\\', $parts);
337 337
         $reflectorClass = new \ReflectionClass($namespace);
338 338
         $isModel = $reflectorClass->isInstantiable();
339 339
         return $isModel;
Please login to merge, or discard this patch.
src/services/DocumentorService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public function extractApiEndpoints(array $module)
46 46
     {
47
-        $modulePath = $module['path'] . DIRECTORY_SEPARATOR . 'Api';
47
+        $modulePath = $module['path'].DIRECTORY_SEPARATOR.'Api';
48 48
         $moduleName = $module['name'];
49 49
         $endpoints = [];
50 50
         if (file_exists($modulePath)) {
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
                 /** @var SplFileInfo $file */
55 55
                 foreach ($finder as $file) {
56 56
                     $filename = str_replace([$modulePath, '/'], ['', '\\'], $file->getPathname());
57
-                    $namespace = "\\{$moduleName}\\Api" . str_replace('.php', '', $filename);
57
+                    $namespace = "\\{$moduleName}\\Api".str_replace('.php', '', $filename);
58 58
                     $info = $this->extractApiInfo($namespace, $moduleName);
59 59
                     if (!empty($info)) {
60 60
                         $endpoints[$namespace] = $info;
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
                         if (NULL !== $mInfo) {
85 85
                             $info[] = $mInfo;
86 86
                         }
87
-                    } catch (Exception $e) {
87
+                    }catch (Exception $e) {
88 88
                         Logger::log($e->getMessage(), LOG_ERR);
89 89
                     }
90 90
                 }
Please login to merge, or discard this patch.
src/base/extension/CustomTranslateExtension.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     {
49 49
         // Gather always the base translations
50 50
         $standardTranslations = [];
51
-        self::$filename = implode(DIRECTORY_SEPARATOR, [LOCALE_DIR, 'custom', self::$locale . '.json']);
51
+        self::$filename = implode(DIRECTORY_SEPARATOR, [LOCALE_DIR, 'custom', self::$locale.'.json']);
52 52
         if (file_exists(self::$filename)) {
53 53
             $standardTranslations = json_decode(file_get_contents(self::$filename), true);
54 54
         }
@@ -66,32 +66,32 @@  discard block
 block discarded – undo
66 66
         $session = Security::getInstance();
67 67
         self::$locale = I18nHelper::extractLocale($session->getSessionKey(I18nHelper::PSFS_SESSION_LANGUAGE_KEY));
68 68
         $version = $session->getSessionKey(self::LOCALE_CACHED_VERSION);
69
-        $configVersion = self::$locale . '_' . Config::getParam('cache.var', 'v1');
69
+        $configVersion = self::$locale.'_'.Config::getParam('cache.var', 'v1');
70 70
         if ($forceReload) {
71 71
             Inspector::stats('[translationsCheckLoad] Force translations reload', Inspector::SCOPE_DEBUG);
72 72
             self::dropInstance();
73 73
             $version = null;
74 74
             self::$translations = [];
75 75
         }
76
-        if(count(self::$translations) === 0) {
76
+        if (count(self::$translations) === 0) {
77 77
             Inspector::stats('[translationsCheckLoad] Extracting translations', Inspector::SCOPE_DEBUG);
78 78
             self::$generate = (boolean)Config::getParam('i18n.autogenerate', false);
79
-            if(null !== $version && $version === $configVersion) {
79
+            if (null !== $version && $version === $configVersion) {
80 80
                 Inspector::stats('[translationsCheckLoad] Translations loaded from session', Inspector::SCOPE_DEBUG);
81 81
                 self::$translations = $session->getSessionKey(self::LOCALE_CACHED_TAG);
82
-            } else {
82
+            }else {
83 83
                 if (!$useBase) {
84 84
                     $customKey = $customKey ?: $session->getSessionKey(self::CUSTOM_LOCALE_SESSION_KEY);
85 85
                 }
86 86
                 $standardTranslations = self::extractBaseTranslations();
87 87
                 // If the project has custom translations, gather them
88 88
                 if (null !== $customKey) {
89
-                    Logger::log('[' . self::class . '] Custom key detected: ' . $customKey, LOG_INFO);
90
-                    self::$filename = implode(DIRECTORY_SEPARATOR, [LOCALE_DIR, 'custom', $customKey, self::$locale . '.json']);
89
+                    Logger::log('['.self::class.'] Custom key detected: '.$customKey, LOG_INFO);
90
+                    self::$filename = implode(DIRECTORY_SEPARATOR, [LOCALE_DIR, 'custom', $customKey, self::$locale.'.json']);
91 91
                 }
92 92
                 // Finally we merge base and custom translations to complete all the i18n set
93 93
                 if (file_exists(self::$filename)) {
94
-                    Logger::log('[' . self::class . '] Custom locale detected: ' . $customKey . ' [' . self::$locale . ']', LOG_INFO);
94
+                    Logger::log('['.self::class.'] Custom locale detected: '.$customKey.' ['.self::$locale.']', LOG_INFO);
95 95
                     self::$translations = array_merge($standardTranslations, json_decode(file_get_contents(self::$filename), true));
96 96
                     $session->setSessionKey(self::LOCALE_CACHED_TAG, self::$translations);
97 97
                     $session->setSessionKey(self::LOCALE_CACHED_VERSION, $configVersion);
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     public function getFilters()
118 118
     {
119 119
         return array(
120
-            new TwigFilter('trans', function ($message) {
120
+            new TwigFilter('trans', function($message) {
121 121
                 return self::_($message);
122 122
             }),
123 123
         );
@@ -139,12 +139,12 @@  discard block
 block discarded – undo
139 139
      */
140 140
     public static function _($message, $customKey = null, $forceReload = false)
141 141
     {
142
-        if(0 === count(self::$translations) || $forceReload) {
142
+        if (0 === count(self::$translations) || $forceReload) {
143 143
             self::translationsCheckLoad($customKey, $forceReload);
144 144
         }
145 145
         if (is_array(self::$translations) && array_key_exists($message, self::$translations)) {
146 146
             $translation = self::$translations[$message];
147
-        } else {
147
+        }else {
148 148
             $translation = gettext($message);
149 149
         }
150 150
         if (self::$generate) {
Please login to merge, or discard this patch.
src/base/types/traits/Api/DocumentorHelperTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             $payload = $this->extractModelFields($namespace);
92 92
             $reflector = new ReflectionClass($namespace);
93 93
             $shortName = $reflector->getShortName();
94
-        } else {
94
+        }else {
95 95
             $namespace = $model;
96 96
             $shortName = $model;
97 97
         }
@@ -170,10 +170,10 @@  discard block
 block discarded – undo
170 170
                     if ($module === $requestModule && !preg_match('/^ROOT/i', $module)) {
171 171
                         $modules = [
172 172
                             'name' => $module,
173
-                            'path' => realpath(dirname($info['base'] . DIRECTORY_SEPARATOR . '..')),
173
+                            'path' => realpath(dirname($info['base'].DIRECTORY_SEPARATOR.'..')),
174 174
                         ];
175 175
                     }
176
-                } catch (Exception $e) {
176
+                }catch (Exception $e) {
177 177
                     $modules[] = $e->getMessage();
178 178
                 }
179 179
             }
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
             } elseif (null !== $reflector && $reflector->isSubclassOf(self::DTO_INTERFACE)) {
217 217
                 $payload = $this->extractDtoProperties($namespace);
218 218
             }
219
-        } catch (Exception $e) {
219
+        }catch (Exception $e) {
220 220
             Logger::log($e->getMessage(), LOG_ERR);
221 221
         }
222 222
 
Please login to merge, or discard this patch.
src/base/types/traits/Api/SwaggerFormaterTrait.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
         $formatted = [
87 87
             "swagger" => "2.0",
88 88
             "host" => preg_replace('/^(http|https)\:\/\/(.*)\/$/i', '$2', Router::getInstance()->getRoute('', true)),
89
-            "basePath" => '/' . $module['name'] . '/api',
89
+            "basePath" => '/'.$module['name'].'/api',
90 90
             "schemes" => [Request::getInstance()->getServer('HTTPS') === 'on' ? 'https' : 'http'],
91 91
             "info" => [
92
-                "title" => t('Documentación API módulo ') . $module['name'],
92
+                "title" => t('Documentación API módulo ').$module['name'],
93 93
                 "version" => Config::getParam('api.version', '1.0.0'),
94 94
                 "contact" => [
95 95
                     "name" => Config::getParam("author", "Fran López"),
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         foreach ($endpoints as $model) {
102 102
             foreach ($model as $endpoint) {
103 103
                 if (!preg_match('/^\/(admin|api)\//i', $endpoint['url']) && strlen($endpoint['url'])) {
104
-                    $url = preg_replace('/\/' . $module['name'] . '\/api/i', '', $endpoint['url']);
104
+                    $url = preg_replace('/\/'.$module['name'].'\/api/i', '', $endpoint['url']);
105 105
                     $description = $endpoint['description'];
106 106
                     $method = strtolower($endpoint['method']);
107 107
                     $paths[$url][$method] = [
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
             }
143 143
         }
144 144
         ksort($dtos);
145
-        uasort($paths, function ($path1, $path2) {
145
+        uasort($paths, function($path1, $path2) {
146 146
             $key1 = array_keys($path1)[0];
147 147
             $key2 = array_keys($path2)[0];
148 148
             return strcmp($path1[$key1]['tags'][0], $path2[$key2]['tags'][0]);
@@ -166,13 +166,13 @@  discard block
 block discarded – undo
166 166
                     $modelDto['objects'][$dtoName][$param] = [
167 167
                         'type' => 'array',
168 168
                         'items' => [
169
-                            '$ref' => '#/definitions/' . $info['type'],
169
+                            '$ref' => '#/definitions/'.$info['type'],
170 170
                         ]
171 171
                     ];
172
-                } else {
172
+                }else {
173 173
                     $modelDto['objects'][$dtoName][$param] = [
174 174
                         'type' => 'object',
175
-                        '$ref' => '#/definitions/' . $info['type'],
175
+                        '$ref' => '#/definitions/'.$info['type'],
176 176
                     ];
177 177
                 }
178 178
                 $modelDto['objects'][$info['class']] = $info['properties'];
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
                 if (array_key_exists('objects', $paramDto)) {
181 181
                     $modelDto['objects'] = array_merge($modelDto['objects'], $paramDto['objects']);
182 182
                 }
183
-            } else {
183
+            }else {
184 184
                 $modelDto['objects'][$dtoName][$param] = $info;
185 185
             }
186 186
         }
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
                     $return = $this->extractReturn($modelNamespace, $docComments);
212 212
                     $url = array_pop($route);
213 213
                     $methodInfo = [
214
-                        'url' => str_replace('/' . $module . '/api', '', $url),
214
+                        'url' => str_replace('/'.$module.'/api', '', $url),
215 215
                         'method' => $info['http'],
216 216
                         'description' => $info['label'],
217 217
                         'return' => $return,
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
                     $this->setRequestParams($method, $methodInfo, $modelNamespace, $docComments);
223 223
                     $this->setQueryParams($method, $methodInfo);
224 224
                     $this->setRequestHeaders($reflection, $methodInfo);
225
-                } catch (Exception $e) {
225
+                }catch (Exception $e) {
226 226
                     Logger::log($e->getMessage(), LOG_ERR);
227 227
                 }
228 228
             }
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
             foreach ($method->getParameters() as $parameter) {
323 323
                 $parameterName = $parameter->getName();
324 324
                 $types = [];
325
-                preg_match_all('/\@param\ (.*)\ \$' . $parameterName . '$/im', $docComments, $types);
325
+                preg_match_all('/\@param\ (.*)\ \$'.$parameterName.'$/im', $docComments, $types);
326 326
                 if (count($types) > 1 && count($types[1]) > 0) {
327 327
                     $methodInfo['parameters'][$parameterName] = $types[1][0];
328 328
                 }
Please login to merge, or discard this patch.
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/types/helpers/RequestHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
                 if (!headers_sent()) {
46 46
                     // TODO include this headers in Template class output method
47 47
                     header('Access-Control-Allow-Credentials: true');
48
-                    header('Access-Control-Allow-Origin: ' . Request::getInstance()->getServer('HTTP_ORIGIN', '*'));
48
+                    header('Access-Control-Allow-Origin: '.Request::getInstance()->getServer('HTTP_ORIGIN', '*'));
49 49
                     header('Vary: Origin');
50 50
                     header('Access-Control-Allow-Methods: GET, POST, DELETE, PUT, PATCH, OPTIONS, HEAD');
51
-                    header('Access-Control-Allow-Headers: ' . implode(', ', self::getCorsHeaders()));
51
+                    header('Access-Control-Allow-Headers: '.implode(', ', self::getCorsHeaders()));
52 52
                 }
53 53
                 if (Request::getInstance()->getMethod() === Request::VERB_OPTIONS) {
54 54
                     Logger::log('Returning OPTIONS header confirmation for CORS pre flight requests', LOG_DEBUG);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                         return $ip;
79 79
                     }
80 80
                 }
81
-            } else {
81
+            }else {
82 82
                 if (self::validateIpAddress($_SERVER['HTTP_X_FORWARDED_FOR'])) {
83 83
                     return $_SERVER['HTTP_X_FORWARDED_FOR'];
84 84
                 }
Please login to merge, or discard this patch.
src/services/AdminServices.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $platform = trim(Config::getInstance()->get('platform.name'));
35 35
         header('HTTP/1.1 401 Unauthorized');
36
-        header('WWW-Authenticate: Basic Realm="' . $platform . '"');
36
+        header('WWW-Authenticate: Basic Realm="'.$platform.'"');
37 37
         echo t('Zona restringida');
38 38
         exit();
39 39
     }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                             $admin['class'] = 'primary';
76 76
                             break;
77 77
                     }
78
-                } else {
78
+                }else {
79 79
                     $admin['class'] = 'primary';
80 80
                 }
81 81
             }
Please login to merge, or discard this patch.