Passed
Push — main ( 3e7f40...759879 )
by Thierry
02:03
created
src/Db/Util.php 2 patches
Spacing   +5 added lines, -8 removed lines patch added patch discarded remove patch
@@ -449,9 +449,8 @@  discard block
 block discarded – undo
449 449
         \preg_match_all("~'((?:[^']|'')*)'~", $field->length, $matches);
450 450
         foreach ($matches[1] as $i => $val) {
451 451
             $val = \stripcslashes(\str_replace("''", "'", $val));
452
-            $checked = (\is_int($value) ? $value == $i + 1 :
453
-                (\is_array($value) ? \in_array($i+1, $value) : $value === $val));
454
-            $inputs[] = "<label><input type='$type'$attrs value='" . ($i+1) . "'" .
452
+            $checked = (\is_int($value) ? $value == $i + 1 : (\is_array($value) ? \in_array($i + 1, $value) : $value === $val));
453
+            $inputs[] = "<label><input type='$type'$attrs value='" . ($i + 1) . "'" .
455 454
                 ($checked ? ' checked' : '') . '>' . $this->html($val) . '</label>';
456 455
         }
457 456
 
@@ -515,8 +514,7 @@  discard block
 block discarded – undo
515 514
         }
516 515
         $enumLength = $this->driver->enumLength();
517 516
         return (\preg_match("~^\\s*\\(?\\s*$enumLength(?:\\s*,\\s*$enumLength)*+\\s*\\)?\\s*\$~", $length) &&
518
-            \preg_match_all("~$enumLength~", $length, $matches) ? '(' . \implode(',', $matches[0]) . ')' :
519
-            \preg_replace('~^[0-9].*~', '(\0)', \preg_replace('~[^-0-9,+()[\]]~', '', $length))
517
+            \preg_match_all("~$enumLength~", $length, $matches) ? '(' . \implode(',', $matches[0]) . ')' : \preg_replace('~^[0-9].*~', '(\0)', \preg_replace('~[^-0-9,+()[\]]~', '', $length))
520 518
         );
521 519
     }
522 520
 
@@ -703,7 +701,7 @@  discard block
 block discarded – undo
703 701
         $expressions = [];
704 702
         foreach ($indexes as $i => $index) {
705 703
             if ($index->type == 'FULLTEXT' && $this->input->values['fulltext'][$i] != '') {
706
-                $columns = \array_map(function ($column) {
704
+                $columns = \array_map(function($column) {
707 705
                     return $this->driver->escapeId($column);
708 706
                 }, $index->columns);
709 707
                 $expressions[] = 'MATCH (' . \implode(', ', $columns) . ') AGAINST (' .
@@ -818,8 +816,7 @@  discard block
 block discarded – undo
818 816
      */
819 817
     private function _selectValue($value, string $link, string $type, $original): string
820 818
     {
821
-        $clause = ($value === null ? '<i>NULL</i>' :
822
-            (\preg_match('~char|binary|boolean~', $type) && !\preg_match('~var~', $type) ?
819
+        $clause = ($value === null ? '<i>NULL</i>' : (\preg_match('~char|binary|boolean~', $type) && !\preg_match('~var~', $type) ?
823 820
             "<code>$value</code>" : $value));
824 821
         if (\preg_match('~blob|bytea|raw|file~', $type) && !$this->isUtf8($value)) {
825 822
             $clause = '<i>' . $this->trans->lang('%d byte(s)', \strlen($original)) . '</i>';
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -858,8 +858,7 @@
 block discarded – undo
858 858
         if ($link === '') {
859 859
             if ($this->isMail($value)) {
860 860
                 $link = "mailto:$value";
861
-            }
862
-            elseif ($this->isUrl($value)) {
861
+            } elseif ($this->isUrl($value)) {
863 862
                 $link = $value; // IE 11 and all modern browsers hide referrer
864 863
             }
865 864
         }
Please login to merge, or discard this patch.
src/DbAdmin/TableSelectAdmin.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         return [
32 32
             'select' => $select,
33
-            'values' => (array)$options["columns"],
33
+            'values' => (array) $options["columns"],
34 34
             'columns' => $columns,
35 35
             'functions' => $this->driver->functions(),
36 36
             'grouping' => $this->driver->grouping(),
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         }
55 55
         return [
56 56
             // 'where' => $where,
57
-            'values' => (array)$options["where"],
57
+            'values' => (array) $options["where"],
58 58
             'columns' => $columns,
59 59
             'indexes' => $indexes,
60 60
             'operators' => $this->driver->operators(),
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
     private function getSortingOptions(array $columns, array $options): array
74 74
     {
75 75
         $values = [];
76
-        $descs = (array)$options["desc"];
77
-        foreach ((array)$options["order"] as $key => $value) {
76
+        $descs = (array) $options["desc"];
77
+        foreach ((array) $options["order"] as $key => $value) {
78 78
             $values[] = [
79 79
                 'col' => $value,
80 80
                 'desc' => $descs[$key] ?? 0,
@@ -415,8 +415,8 @@  discard block
 block discarded – undo
415 415
      */
416 416
     public function execSelect(string $table, array $queryOptions): array
417 417
     {
418
-        list(, $query, $select, $fields, , , $indexes, $where, $group, , $limit, $page,
419
-            $textLength, , $unselected) = $this->prepareSelect($table, $queryOptions);
418
+        list(, $query, $select, $fields,,, $indexes, $where, $group,, $limit, $page,
419
+            $textLength,, $unselected) = $this->prepareSelect($table, $queryOptions);
420 420
 
421 421
         $error = null;
422 422
         // From driver.inc.php
Please login to merge, or discard this patch.