Passed
Push — main ( 007459...ee4a7c )
by Thierry
02:34
created
translations/gl.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -273,7 +273,7 @@
 block discarded – undo
273 273
     'Modify' => 'Modificar',
274 274
     'Loading' => 'Cargando',
275 275
     'Load more data' => 'Cargar máis datos',
276
-    '%d / ' => array('%d / ','%d / '),
276
+    '%d / ' => array('%d / ', '%d / '),
277 277
     'Limit rows' => 'Limitar filas',
278 278
     'Default value' => 'Valor por defecto',
279 279
     'Full table scan' => 'Escaneo completo da táboa',
Please login to merge, or discard this patch.
src/Package.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
     {
71 71
         // Check in server options
72 72
         $serverAccess = $this->getOption("servers.$server.access.server", null);
73
-        if($serverAccess === true || $serverAccess === false)
73
+        if ($serverAccess === true || $serverAccess === false)
74 74
         {
75 75
             return $serverAccess;
76 76
         }
Please login to merge, or discard this patch.
src/Db/Facades/QueryFacade.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function insertItem(string $table, array $queryOptions): array
160 160
     {
161
-        list($fields, ,) = $this->getFields($table, $queryOptions);
161
+        list($fields,,) = $this->getFields($table, $queryOptions);
162 162
 
163 163
         // From edit.inc.php
164 164
         $values = [];
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      */
189 189
     public function updateItem(string $table, array $queryOptions): array
190 190
     {
191
-        list($fields, $where, ) = $this->getFields($table, $queryOptions);
191
+        list($fields, $where,) = $this->getFields($table, $queryOptions);
192 192
 
193 193
         // From edit.inc.php
194 194
         $indexes = $this->driver->indexes($table);
Please login to merge, or discard this patch.
src/Db/Facades/Traits/QueryInputTrait.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,8 +62,7 @@  discard block
 block discarded – undo
62 62
     private function getEnumItemValue(string $val, int $i, $value): array
63 63
     {
64 64
         $val = stripcslashes(str_replace("''", "'", $val));
65
-        $checked = (is_int($value) ? $value == $i + 1 :
66
-            (is_array($value) ? in_array($i+1, $value) : $value === $val));
65
+        $checked = (is_int($value) ? $value == $i + 1 : (is_array($value) ? in_array($i + 1, $value) : $value === $val));
67 66
         return ['value' => $i + 1, 'checked' => $checked, 'text' => $this->utils->str->html($val)];
68 67
     }
69 68
 
@@ -82,7 +81,7 @@  discard block
 block discarded – undo
82 81
                 'text' => '<i>' . $this->utils->trans->lang('original') . '</i>'];
83 82
         }
84 83
         if ($field->null) {
85
-            $values[] =  ['value' => '', 'checked' => $value === null && !$select, 'text' => '<i>NULL</i>'];
84
+            $values[] = ['value' => '', 'checked' => $value === null && !$select, 'text' => '<i>NULL</i>'];
86 85
         }
87 86
 
88 87
         // From functions.inc.php (function enum_input())
Please login to merge, or discard this patch.
src/Db/Facades/Traits/QueryTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         if ($row === null) {
122 122
             return !$update && $field->autoIncrement ? "" : (isset($queryOptions["select"]) ? false : $default);
123 123
         }
124
-        if ($row[$name] != "" && $this->driver->jush() == "sql" && preg_match("~enum|set~", $field->type) ) {
124
+        if ($row[$name] != "" && $this->driver->jush() == "sql" && preg_match("~enum|set~", $field->type)) {
125 125
             return is_array($row[$name]) ? array_sum($row[$name]) : +$row[$name];
126 126
         }
127 127
         return is_bool($row[$name]) ? +$row[$name] : $row[$name];
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
             return "SQL";
142 142
         }
143 143
         if ($queryOptions["save"]) {
144
-            return (string)$queryOptions["function"][$name];
144
+            return (string) $queryOptions["function"][$name];
145 145
         }
146 146
         if ($update && preg_match('~^CURRENT_TIMESTAMP~i', $field->onUpdate)) {
147 147
             return 'now';
Please login to merge, or discard this patch.
src/Db/Facades/Traits/SelectTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     {
26 26
         return [
27 27
             'select' => $select,
28
-            'values' => (array)$options["columns"],
28
+            'values' => (array) $options["columns"],
29 29
             'columns' => $columns,
30 30
             'functions' => $this->driver->functions(),
31 31
             'grouping' => $this->driver->grouping(),
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         }
50 50
         return [
51 51
             // 'where' => $where,
52
-            'values' => (array)$options["where"],
52
+            'values' => (array) $options["where"],
53 53
             'columns' => $columns,
54 54
             'indexes' => $indexes,
55 55
             'operators' => $this->driver->operators(),
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
     private function getSortingOptions(array $columns, array $options): array
69 69
     {
70 70
         $values = [];
71
-        $descs = (array)$options["desc"];
72
-        foreach ((array)$options["order"] as $key => $value) {
71
+        $descs = (array) $options["desc"];
72
+        foreach ((array) $options["order"] as $key => $value) {
73 73
             $values[] = [
74 74
                 'col' => $value,
75 75
                 'desc' => $descs[$key] ?? 0,
Please login to merge, or discard this patch.
src/Db/Facades/Traits/TableTrait.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,8 +120,7 @@
 block discarded – undo
120 120
         }
121 121
         $foreignKey = $this->foreignKeys[$field->type] ?? null;
122 122
         //! Can collide with user defined type
123
-        $typeField = ($foreignKey === null ? $field :
124
-            TableFieldEntity::make($this->referencableTables[$foreignKey]));
123
+        $typeField = ($foreignKey === null ? $field : TableFieldEntity::make($this->referencableTables[$foreignKey]));
125 124
         $processedField = $this->driver->processField($field, $typeField);
126 125
         $origField = $this->fields[$field->name] ?? null;
127 126
         $this->after = '';
Please login to merge, or discard this patch.
src/Db/Facades/Traits/TableDataDumpTrait.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,8 +49,7 @@  discard block
 block discarded – undo
49 49
                 $row[$key] = '"' . str_replace('"', '""', $val) . '"';
50 50
             }
51 51
         }
52
-        $separator = $this->options['format'] === 'csv' ? ',' :
53
-            ($this->options['format'] === 'tsv' ? "\t" : ';');
52
+        $separator = $this->options['format'] === 'csv' ? ',' : ($this->options['format'] === 'tsv' ? "\t" : ';');
54 53
         $this->queries[] = implode($separator, $row);
55 54
     }
56 55
 
@@ -143,7 +142,7 @@  discard block
 block discarded – undo
143 142
         }
144 143
         if (!$this->insert) {
145 144
             $this->insert = 'INSERT INTO ' . $this->driver->escapeTableName($table) . ' (' .
146
-                implode(', ', array_map(function ($key) {
145
+                implode(', ', array_map(function($key) {
147 146
                     return $this->driver->escapeId($key);
148 147
                 }, $keys)) . ') VALUES';
149 148
         }
Please login to merge, or discard this patch.
src/Db/Facades/UserFacade.php 1 patch
Spacing   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -176,8 +176,7 @@  discard block
 block discarded – undo
176 176
         foreach ($grants as $object => $grant) {
177 177
             //! separate db, table, columns, PROCEDURE|FUNCTION, routine
178 178
             $headers[] = $object === '*.*' ?
179
-                '<input type="hidden" name="objects[' . $i . ']" value="*.*" />*.*' :
180
-                '<input name="objects[' . $i . ']" value="' . $this->utils->str->html($object) . '" autocapitalize="off" />';
179
+                '<input type="hidden" name="objects[' . $i . ']" value="*.*" />*.*' : '<input name="objects[' . $i . ']" value="' . $this->utils->str->html($object) . '" autocapitalize="off" />';
181 180
             $i++;
182 181
         }
183 182
 
@@ -230,8 +229,7 @@  discard block
 block discarded – undo
230 229
         foreach ($userEntity->grants as $object => $grant) {
231 230
             //! separate db, table, columns, PROCEDURE|FUNCTION, routine
232 231
             $headers[] = $object === '*.*' ?
233
-                '<input type="hidden" name="objects[' . $i . ']" value="*.*" />*.*' :
234
-                '<input name="objects[' . $i . ']" value="' .
232
+                '<input type="hidden" name="objects[' . $i . ']" value="*.*" />*.*' : '<input name="objects[' . $i . ']" value="' .
235 233
                     $this->utils->str->html($object) . '" autocapitalize="off" />';
236 234
             $i++;
237 235
         }
@@ -247,11 +245,11 @@  discard block
 block discarded – undo
247 245
             ],
248 246
             'pass' => [
249 247
                 'label' => $this->utils->trans->lang('Password'),
250
-                'value' => $userEntity->password ,
248
+                'value' => $userEntity->password,
251 249
             ],
252 250
             'hashed' => [
253 251
                 'label' => $this->utils->trans->lang('Hashed'),
254
-                'value' => ($userEntity->password  !== ''),
252
+                'value' => ($userEntity->password !== ''),
255 253
             ],
256 254
         ];
257 255
 
Please login to merge, or discard this patch.