@@ -96,7 +96,7 @@ |
||
96 | 96 | new Config(); |
97 | 97 | if (!Config::loadConfig() || !Config::connectToDatabase()) { |
98 | 98 | // Si falla la carga de la configuración, es que hay que generar el archivo. |
99 | - $run=new EditConfig(); |
|
99 | + $run = new EditConfig(); |
|
100 | 100 | $run->main(); |
101 | 101 | die(); |
102 | 102 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | { |
65 | 65 | $messages = self::$messages; |
66 | 66 | |
67 | - usort($messages, function ($itemA, $itemB) { |
|
67 | + usort($messages, function($itemA, $itemB) { |
|
68 | 68 | if ($itemA['time'] === $itemB['time']) { |
69 | 69 | return 0; |
70 | 70 | } |
@@ -118,15 +118,15 @@ discard block |
||
118 | 118 | $data = Yaml::parseFile($yamlSourceFilename); |
119 | 119 | |
120 | 120 | $result = []; |
121 | - foreach ($data['fields']??[] as $key => $datum) { |
|
121 | + foreach ($data['fields'] ?? [] as $key => $datum) { |
|
122 | 122 | $datum['key'] = $key; |
123 | 123 | $result['fields'][$key] = Schema::normalize($datum); |
124 | - if ($result['fields'][$key]['type']==='autoincrement') { |
|
124 | + if ($result['fields'][$key]['type'] === 'autoincrement') { |
|
125 | 125 | // TODO: Ver cómo tendría que ser la primary key |
126 | 126 | $result['indexes']['primary'] = $key; |
127 | 127 | } |
128 | 128 | } |
129 | - foreach ($data['indexes']??[] as $key=>$datum) { |
|
129 | + foreach ($data['indexes'] ?? [] as $key=>$datum) { |
|
130 | 130 | $datum['key'] = $key; |
131 | 131 | $result['indexes'][$key] = $datum; |
132 | 132 | } |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | return $result; |
191 | 191 | } |
192 | 192 | |
193 | - private static function checkTable(string $tableName, bool $create=true): array |
|
193 | + private static function checkTable(string $tableName, bool $create = true): array |
|
194 | 194 | { |
195 | 195 | $structure = self::getFieldsAndIndexes($tableName); |
196 | 196 | //$structure['fields'] = self::getFields($tableName); // Del yaml |
@@ -40,7 +40,7 @@ |
||
40 | 40 | debug_message('No se ha podido crear la carpeta ' . $path); |
41 | 41 | } |
42 | 42 | } |
43 | - return $path . $filename . '.yaml';; |
|
43 | + return $path . $filename . '.yaml'; ; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | public static function loadYamlFile(string $filename): array |