Passed
Branch main (9c812e)
by Thierry
03:26
created
src/DbAdmin/UserAdmin.php 1 patch
Spacing   +4 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
         foreach ($grants as $object => $grant) {
61 61
             //! separate db, table, columns, PROCEDURE|FUNCTION, routine
62 62
             $headers[] = $object === '*.*' ?
63
-                '<input type="hidden" name="objects[' . $i . ']" value="*.*" />*.*' :
64
-                '<input name="objects[' . $i . ']" value="' . $this->util->html($object) . '" autocapitalize="off" />';
63
+                '<input type="hidden" name="objects[' . $i . ']" value="*.*" />*.*' : '<input name="objects[' . $i . ']" value="' . $this->util->html($object) . '" autocapitalize="off" />';
65 64
             $i++;
66 65
         }
67 66
 
@@ -116,8 +115,7 @@  discard block
 block discarded – undo
116 115
         foreach ($grants as $object => $grant) {
117 116
             //! separate db, table, columns, PROCEDURE|FUNCTION, routine
118 117
             $headers[] = $object === '*.*' ?
119
-                '<input type="hidden" name="objects[' . $i . ']" value="*.*" />*.*' :
120
-                '<input name="objects[' . $i . ']" value="' .
118
+                '<input type="hidden" name="objects[' . $i . ']" value="*.*" />*.*' : '<input name="objects[' . $i . ']" value="' .
121 119
                     $this->util->html($object) . '" autocapitalize="off" />';
122 120
             $i++;
123 121
         }
@@ -135,11 +133,11 @@  discard block
 block discarded – undo
135 133
             ],
136 134
             'pass' => [
137 135
                 'label' => $this->trans->lang('Password'),
138
-                'value' => $password ,
136
+                'value' => $password,
139 137
             ],
140 138
             'hashed' => [
141 139
                 'label' => $this->trans->lang('Hashed'),
142
-                'value' => ($password  != ''),
140
+                'value' => ($password != ''),
143 141
             ],
144 142
         ];
145 143
 
Please login to merge, or discard this patch.
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/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.
templates/views/bootstrap3/table/edit.php 2 patches
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,8 @@  discard block
 block discarded – undo
26 26
 <?php if(is_string($collations)): ?>
27 27
                     <option <?php if($this->table->collation === $collations): ?>selected<?php
28 28
                         endif ?>><?php echo $collations ?></option>
29
-<?php else: ?>
29
+<?php else {
30
+    : ?>
30 31
                     <optgroup label="<?php echo $group ?>">
31 32
 <?php foreach($collations as $collation): ?>
32 33
                         <option <?php if($this->table->collation === $collation): ?>selected<?php
@@ -61,7 +62,9 @@  discard block
 block discarded – undo
61 62
 <?php endif ?>
62 63
             </div>
63 64
         </div>
64
-<?php $index = 0; foreach($this->fields as $field): ?>
65
+<?php $index = 0;
66
+}
67
+foreach($this->fields as $field): ?>
65 68
 <?php echo $this->render('adminer::views::table/column', [
66 69
     'trans' => $this->trans,
67 70
     'class' => $this->formId . '-column',
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -7,29 +7,29 @@  discard block
 block discarded – undo
7 7
                 <input type="text" name="name" class="form-control" value="<?php
8 8
                     echo $this->table->name ?>" placeholder="Name" />
9 9
             </div>
10
-<?php if($this->engines): ?>
10
+<?php if ($this->engines): ?>
11 11
             <div class="col-md-2 adminer-edit-table-engine">
12 12
                 <select name="engine" class="form-control">
13 13
                     <option value="">(engine)</option>
14
-<?php foreach($this->engines as $group => $engine): ?>
15
-                    <option <?php if(!strcasecmp($this->table->engine, $engine)): ?>selected<?php
14
+<?php foreach ($this->engines as $group => $engine): ?>
15
+                    <option <?php if (!strcasecmp($this->table->engine, $engine)): ?>selected<?php
16 16
                         endif ?>><?php echo $engine ?></option>
17 17
 <?php endforeach ?>
18 18
                 </select>
19 19
             </div>
20 20
 <?php endif ?>
21
-<?php if($this->collations): ?>
21
+<?php if ($this->collations): ?>
22 22
             <div class="col-md-3 adminer-edit-table-collation">
23 23
                 <select name="collation" class="form-control">
24 24
                     <option value="" selected>(collation)</option>
25
-<?php foreach($this->collations as $group => $collations): ?>
26
-<?php if(is_string($collations)): ?>
27
-                    <option <?php if($this->table->collation === $collations): ?>selected<?php
25
+<?php foreach ($this->collations as $group => $collations): ?>
26
+<?php if (is_string($collations)): ?>
27
+                    <option <?php if ($this->table->collation === $collations): ?>selected<?php
28 28
                         endif ?>><?php echo $collations ?></option>
29 29
 <?php else: ?>
30 30
                     <optgroup label="<?php echo $group ?>">
31
-<?php foreach($collations as $collation): ?>
32
-                        <option <?php if($this->table->collation === $collation): ?>selected<?php
31
+<?php foreach ($collations as $collation): ?>
32
+                        <option <?php if ($this->table->collation === $collation): ?>selected<?php
33 33
                             endif ?>><?php echo $collation ?></option>
34 34
 <?php endforeach ?>
35 35
                     </optgroup>
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                 </select>
39 39
             </div>
40 40
 <?php endif ?>
41
-<?php if($this->support['comment']): ?>
41
+<?php if ($this->support['comment']): ?>
42 42
             <div class="col-md-4 adminer-table-column-middle">
43 43
                 <input name="comment" class="form-control" value="<?php
44 44
                     echo $this->table->comment ?>" placeholder="<?php
@@ -50,18 +50,18 @@  discard block
 block discarded – undo
50 50
             <label class="col-md-3 adminer-table-column-left"><?php echo $this->trans->lang('Column') ?></label>
51 51
             <label class="col-md-1 adminer-table-column-null-header" for="autoIncrementCol">
52 52
                 <input type="radio" name="autoIncrementCol" value="0" <?php
53
-                    if(!$this->options['hasAutoIncrement']): ?>checked <?php endif ?>/>AI-P
53
+                    if (!$this->options['hasAutoIncrement']): ?>checked <?php endif ?>/>AI-P
54 54
             </label>
55 55
             <label class="col-md-7 adminer-table-column-middle"><?php echo $this->trans->lang('Options') ?></label>
56 56
             <div class="col-md-1 adminer-table-column-buttons-header">
57
-<?php if($this->support['columns']): ?>
57
+<?php if ($this->support['columns']): ?>
58 58
                 <button type="button" class="btn btn-primary btn-sm" id="adminer-table-column-add">
59 59
                     <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
60 60
                 </button>
61 61
 <?php endif ?>
62 62
             </div>
63 63
         </div>
64
-<?php $index = 0; foreach($this->fields as $field): ?>
64
+<?php $index = 0; foreach ($this->fields as $field): ?>
65 65
 <?php echo $this->render('adminer::views::table/column', [
66 66
     'trans' => $this->trans,
67 67
     'class' => $this->formId . '-column',
Please login to merge, or discard this patch.