Passed
Push — main ( 998275...f73d7e )
by Thierry
23:55 queued 21:28
created
src/Package.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
     {
199 199
         $servers = $this->getConfig()->getOption('servers', []);
200 200
         $default = $this->getConfig()->getOption('default', '');
201
-        if(\array_key_exists($default, $servers))
201
+        if (\array_key_exists($default, $servers))
202 202
         {
203 203
             return $default;
204 204
         }
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
      */
238 238
     public function getReadyScript()
239 239
     {
240
-        if(!($server = $this->getDefaultServer()))
240
+        if (!($server = $this->getDefaultServer()))
241 241
         {
242 242
             return '';
243 243
         }
Please login to merge, or discard this patch.
src/Db/Admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             if ($this->driver->jush() == "sql" &&
72 72
                 preg_match('~char|text~', $fields[$key]->type) && preg_match("~[^ -@]~", $value)) {
73 73
                 // not just [a-z] to catch non-ASCII characters
74
-                $clauses[] = "$column = " . $this->driver->quote($value) . " COLLATE " . $this->driver−>charset() . "_bin";
74
+                $clauses[] = "$column = " . $this->driver->quote($value) . " COLLATE " . $this->driver− > charset() . "_bin";
75 75
             }
76 76
         }
77 77
         $nulls = $where["null"] ?? [];
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
                     }
138 138
                 }
139 139
                 if (\preg_match("~ IDENTIFIED BY PASSWORD '([^']+)~", $row[0], $match)) {
140
-                    $password  = $match[1];
140
+                    $password = $match[1];
141 141
                 }
142 142
             }
143 143
         }
Please login to merge, or discard this patch.
src/Db/Util.php 2 patches
Spacing   +5 added lines, -8 removed lines patch added patch discarded remove patch
@@ -517,9 +517,8 @@  discard block
 block discarded – undo
517 517
         \preg_match_all("~'((?:[^']|'')*)'~", $field->length, $matches);
518 518
         foreach ($matches[1] as $i => $val) {
519 519
             $val = \stripcslashes(\str_replace("''", "'", $val));
520
-            $checked = (\is_int($value) ? $value == $i + 1 :
521
-                (\is_array($value) ? \in_array($i+1, $value) : $value === $val));
522
-            $inputs[] = "<label><input type='$type'$attrs value='" . ($i+1) . "'" .
520
+            $checked = (\is_int($value) ? $value == $i + 1 : (\is_array($value) ? \in_array($i + 1, $value) : $value === $val));
521
+            $inputs[] = "<label><input type='$type'$attrs value='" . ($i + 1) . "'" .
523 522
                 ($checked ? ' checked' : '') . '>' . $this->html($this->editValue($val, $field)) . '</label>';
524 523
         }
525 524
 
@@ -583,8 +582,7 @@  discard block
 block discarded – undo
583 582
         }
584 583
         $enumLength = $this->driver->enumLength;
585 584
         return (\preg_match("~^\\s*\\(?\\s*$enumLength(?:\\s*,\\s*$enumLength)*+\\s*\\)?\\s*\$~", $length) &&
586
-            \preg_match_all("~$enumLength~", $length, $matches) ? "(" . \implode(",", $matches[0]) . ")" :
587
-            \preg_replace('~^[0-9].*~', '(\0)', \preg_replace('~[^-0-9,+()[\]]~', '', $length))
585
+            \preg_match_all("~$enumLength~", $length, $matches) ? "(" . \implode(",", $matches[0]) . ")" : \preg_replace('~^[0-9].*~', '(\0)', \preg_replace('~[^-0-9,+()[\]]~', '', $length))
588 586
         );
589 587
     }
590 588
 
@@ -755,7 +753,7 @@  discard block
 block discarded – undo
755 753
         $expressions = [];
756 754
         foreach ($indexes as $i => $index) {
757 755
             if ($index->type == "FULLTEXT" && $this->input->values["fulltext"][$i] != "") {
758
-                $columns = \array_map(function ($column) {
756
+                $columns = \array_map(function($column) {
759 757
                     return $this->driver->escapeId($column);
760 758
                 }, $index->columns);
761 759
                 $expressions[] = "MATCH (" . \implode(", ", $columns) . ") AGAINST (" .
@@ -873,8 +871,7 @@  discard block
 block discarded – undo
873 871
      */
874 872
     private function _selectValue(string $value, string $link, string $type, string $original)
875 873
     {
876
-        $clause = ($value === null ? "<i>NULL</i>" :
877
-            (\preg_match("~char|binary|boolean~", $type) && !\preg_match("~var~", $type) ?
874
+        $clause = ($value === null ? "<i>NULL</i>" : (\preg_match("~char|binary|boolean~", $type) && !\preg_match("~var~", $type) ?
878 875
             "<code>$value</code>" : $value));
879 876
         if (\preg_match('~blob|bytea|raw|file~', $type) && !$this->isUtf8($value)) {
880 877
             $clause = "<i>" . $this->trans->lang('%d byte(s)', \strlen($original)) . "</i>";
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -913,11 +913,9 @@
 block discarded – undo
913 913
         if ($link === null) {
914 914
             if ($this->isMail($value)) {
915 915
                 $link = "mailto:$value";
916
-            }
917
-            elseif ($this->isUrl($value)) {
916
+            } elseif ($this->isUrl($value)) {
918 917
                 $link = $value; // IE 11 and all modern browsers hide referrer
919
-            }
920
-            else {
918
+            } else {
921 919
                 $link = '';
922 920
             }
923 921
         }
Please login to merge, or discard this patch.
src/Db/Translator.php 1 patch
Spacing   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -127,11 +127,9 @@
 block discarded – undo
127 127
                 // different forms for 1, 2-4 except 12-14, other
128 128
                 : ($this->language == 'pl' ? ($number % 10 > 1 && $number % 10 < 5 && $number / 10 % 10 != 1 ? 1 : 2)
129 129
                 // different forms for 1, 2, 3-4, other
130
-                : ($this->language == 'sl' ? ($number % 100 == 1 ? 0 : ($number % 100 == 2 ? 1 :
131
-                    ($number % 100 == 3 || $number % 100 == 4 ? 2 : 3)))
130
+                : ($this->language == 'sl' ? ($number % 100 == 1 ? 0 : ($number % 100 == 2 ? 1 : ($number % 100 == 3 || $number % 100 == 4 ? 2 : 3)))
132 131
                 // different forms for 1, 12-19, other
133
-                : ($this->language == 'lt' ? ($number % 10 == 1 && $number % 100 != 11 ? 0 :
134
-                    ($number % 10 > 1 && $number / 10 % 10 != 1 ? 1 : 2))
132
+                : ($this->language == 'lt' ? ($number % 10 == 1 && $number % 100 != 11 ? 0 : ($number % 10 > 1 && $number / 10 % 10 != 1 ? 1 : 2))
135 133
                 // different forms for 1 except 11, 2-4 except 12-14, other
136 134
                 : ($this->language == 'bs' || $this->language == 'ru' || $this->language == 'sr' || $this->language == 'uk' ?
137 135
                     ($number % 10 == 1 && $number % 100 != 11 ? 0
Please login to merge, or discard this patch.
config/config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
         __DIR__ . '/../app/Ajax' => [
6 6
             'namespace' => 'Lagdo\\DbAdmin\\App\\Ajax',
7 7
             'autoload' => false,
8
-            'classes' => require( __DIR__ . '/classes.php'),
8
+            'classes' => require(__DIR__ . '/classes.php'),
9 9
         ],
10 10
     ],
11 11
     'views' => [
Please login to merge, or discard this patch.
templates/views/bootstrap3/database/add.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@
 block discarded – undo
11 11
                         <div class="col-md-8">
12 12
                             <select name="collation" class="form-control">
13 13
                                 <option value="" selected>(collation)</option>
14
-<?php foreach($this->collations as $group => $collations): ?>
14
+<?php foreach ($this->collations as $group => $collations): ?>
15 15
                                 <optgroup label="<?php echo $group ?>">
16
-<?php foreach($collations as $collation): ?>
16
+<?php foreach ($collations as $collation): ?>
17 17
                                     <option><?php echo $collation ?></option>
18 18
 <?php endforeach ?>
19 19
                                 </optgroup>
Please login to merge, or discard this patch.
templates/views/bootstrap3/table/select/columns-show.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
         <!-- <div class="row row-no-gutters">
2
-<?php $i = 0; foreach($this->options['select'] as $key => $value): ?>
2
+<?php $i = 0; foreach ($this->options['select'] as $key => $value): ?>
3 3
             <div class="col-md-7">
4 4
                 <input class="form-control" name="columns[<?php
5 5
                     echo $i ?>][fun]" value="<?php echo $this->options['values'][$key]['fun'] ?>" />
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 <?php $i++; endforeach ?>
12 12
         </div> -->
13 13
         <div class="row row-no-gutters">
14
-<?php $i = 0; foreach($this->options['values'] as $value): ?>
14
+<?php $i = 0; foreach ($this->options['values'] as $value): ?>
15 15
             <div class="col-md-7">
16 16
                 <input class="form-control" name="columns[<?php
17 17
                     echo $i ?>][fun]" value="<?php echo $value['fun'] ?>" />
Please login to merge, or discard this patch.
templates/views/bootstrap3/table/select/sorting-show.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
         <div class="row row-no-gutters">
2
-<?php $i = 0; foreach($this->options['values'] as $value): ?>
2
+<?php $i = 0; foreach ($this->options['values'] as $value): ?>
3 3
             <div class="col-md-6">
4 4
                 <input class="form-control" name="order[<?php
5 5
                     echo $i ?>]" value="<?php echo $value['col'] ?>" />
Please login to merge, or discard this patch.
templates/views/bootstrap3/table/select/filters-show.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
         <div class="row row-no-gutters">
2
-<?php $i = 0; foreach($this->options['values'] as $value): ?>
2
+<?php $i = 0; foreach ($this->options['values'] as $value): ?>
3 3
             <div class="col-md-4">
4 4
                 <input class="form-control" name="where[<?php
5 5
                     echo $i ?>][col]" value="<?php echo $value['col'] ?>" />
Please login to merge, or discard this patch.