Passed
Branch main (4f3c5a)
by Thierry
02:54
created
templates/views/bootstrap3/sql/export.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -6,10 +6,10 @@  discard block
 block discarded – undo
6 6
                     <label for="output" class="col-md-3 control-label"><?php
7 7
                         echo $this->options['output']['label'] ?></label>
8 8
                     <div class="col-md-8">
9
-<?php foreach($this->options['output']['options'] as $value => $label): ?>
9
+<?php foreach ($this->options['output']['options'] as $value => $label): ?>
10 10
                         <label class="radio-inline">
11 11
                             <input type="radio" name="output" value="<?php echo $value ?>" <?php
12
-                                if($this->options['output']['value'] === $value): ?>checked <?php
12
+                                if ($this->options['output']['value'] === $value): ?>checked <?php
13 13
                                 endif ?>/> <?php echo $label ?>
14 14
                         </label>
15 15
 <?php endforeach ?>
@@ -19,48 +19,48 @@  discard block
 block discarded – undo
19 19
                     <label for="format" class="col-md-3 control-label"><?php
20 20
                         echo $this->options['format']['label'] ?></label>
21 21
                     <div class="col-md-8">
22
-<?php foreach($this->options['format']['options'] as $value => $label): ?>
22
+<?php foreach ($this->options['format']['options'] as $value => $label): ?>
23 23
                         <label class="radio-inline">
24 24
                             <input type="radio" name="format" value="<?php echo $value ?>" <?php
25
-                                if($this->options['format']['value'] === $value): ?>checked <?php
25
+                                if ($this->options['format']['value'] === $value): ?>checked <?php
26 26
                                 endif ?>/> <?php echo $label ?>
27 27
                         </label>
28 28
 <?php endforeach ?>
29 29
                     </div>
30 30
                 </div>
31
-<?php if(array_key_exists('db_style', $this->options)): ?>
31
+<?php if (array_key_exists('db_style', $this->options)): ?>
32 32
                 <div class="form-group">
33 33
                     <label for="db_style" class="col-md-3 control-label"><?php
34 34
                         echo $this->options['db_style']['label'] ?></label>
35 35
                     <div class="col-md-8">
36 36
                         <select name="db_style" class="form-control">
37
-<?php foreach($this->options['db_style']['options'] as $label): ?>
37
+<?php foreach ($this->options['db_style']['options'] as $label): ?>
38 38
                             <option <?php
39
-                                if($this->options['db_style']['value'] == $label): ?>selected<?php
39
+                                if ($this->options['db_style']['value'] == $label): ?>selected<?php
40 40
                                 endif ?>> <?php echo $label ?></option>
41 41
 <?php endforeach ?>
42 42
                         </select>
43 43
                     </div>
44 44
                 </div>
45
-<?php if(array_key_exists('routines', $this->options) || array_key_exists('events', $this->options)): ?>
45
+<?php if (array_key_exists('routines', $this->options) || array_key_exists('events', $this->options)): ?>
46 46
                 <div class="form-group">
47 47
                     <label class="col-md-3 control-label">&nbsp;</label>
48
-<?php if(array_key_exists('routines', $this->options)): ?>
48
+<?php if (array_key_exists('routines', $this->options)): ?>
49 49
                     <div class="col-md-4">
50 50
                         <div class="checkbox">
51 51
                             <label><input type="checkbox" name="routines" value="<?php
52 52
                                 echo $this->options['routines']['value'] ?>" <?php
53
-                                if($this->options['routines']['checked']): ?>checked <?php
53
+                                if ($this->options['routines']['checked']): ?>checked <?php
54 54
                                 endif ?>/> <?php echo $this->options['routines']['label'] ?></label>
55 55
                         </div>
56 56
                     </div>
57 57
 <?php endif ?>
58
-<?php if(array_key_exists('events', $this->options)): ?>
58
+<?php if (array_key_exists('events', $this->options)): ?>
59 59
                     <div class="col-md-4">
60 60
                         <div class="checkbox">
61 61
                             <label><input type="checkbox" name="events" value="<?php
62 62
                                 echo $this->options['events']['value'] ?>" <?php
63
-                                if($this->options['events']['checked']): ?>checked <?php
63
+                                if ($this->options['events']['checked']): ?>checked <?php
64 64
                                 endif ?>/> <?php echo $this->options['events']['label'] ?></label>
65 65
                         </div>
66 66
                     </div>
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
                         echo $this->options['table_style']['label'] ?></label>
74 74
                     <div class="col-md-8">
75 75
                         <select name="table_style" class="form-control">
76
-<?php foreach($this->options['table_style']['options'] as $label): ?>
76
+<?php foreach ($this->options['table_style']['options'] as $label): ?>
77 77
                             <option <?php
78
-                                if($this->options['table_style']['value'] == $label): ?>selected<?php
78
+                                if ($this->options['table_style']['value'] == $label): ?>selected<?php
79 79
                                 endif ?>> <?php echo $label ?></option>
80 80
 <?php endforeach ?>
81 81
                         </select>
@@ -87,16 +87,16 @@  discard block
 block discarded – undo
87 87
                         <div class="checkbox">
88 88
                             <label><input type="checkbox" name="auto_increment" value="<?php
89 89
                                 echo $this->options['auto_increment']['value'] ?>" <?php
90
-                                if($this->options['auto_increment']['checked']): ?>checked <?php
90
+                                if ($this->options['auto_increment']['checked']): ?>checked <?php
91 91
                                 endif ?>/> <?php echo $this->options['auto_increment']['label'] ?></label>
92 92
                         </div>
93 93
                     </div>
94
-<?php if(array_key_exists('triggers', $this->options)): ?>
94
+<?php if (array_key_exists('triggers', $this->options)): ?>
95 95
                     <div class="col-md-4">
96 96
                         <div class="checkbox">
97 97
                             <label><input type="checkbox" name="triggers" value="<?php
98 98
                                 echo $this->options['triggers']['value'] ?>" <?php
99
-                                if($this->options['triggers']['checked']): ?>checked <?php
99
+                                if ($this->options['triggers']['checked']): ?>checked <?php
100 100
                                 endif ?>/> <?php echo $this->options['triggers']['label'] ?></label>
101 101
                         </div>
102 102
                     </div>
@@ -107,9 +107,9 @@  discard block
 block discarded – undo
107 107
                         echo $this->options['data_style']['label'] ?></label>
108 108
                     <div class="col-md-8">
109 109
                         <select name="data_style" class="form-control">
110
-<?php foreach($this->options['data_style']['options'] as $label): ?>
110
+<?php foreach ($this->options['data_style']['options'] as $label): ?>
111 111
                             <option <?php
112
-                                if($this->options['data_style']['value'] == $label): ?>selected<?php
112
+                                if ($this->options['data_style']['value'] == $label): ?>selected<?php
113 113
                                 endif ?>> <?php echo $label ?></option>
114 114
 <?php endforeach ?>
115 115
                         </select>
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             </div>
126 126
             <div class="col-md-4">
127 127
                 <div class="table-responsive">
128
-<?php if(isset($this->databases)): ?>
128
+<?php if (isset($this->databases)): ?>
129 129
                     <table class="table table-bordered">
130 130
                         <thead>
131 131
                             <tr>
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                             </tr>
143 143
                         </thead>
144 144
                         <tbody>
145
-<?php foreach($this->databases['details'] as $database): ?>
145
+<?php foreach ($this->databases['details'] as $database): ?>
146 146
                             <tr>
147 147
                                 <td>
148 148
                                     <input type="checkbox" name="database_list[]" class="<?php
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                         </tbody>
161 161
                     </table>
162 162
 <?php endif ?>
163
-<?php if(isset($this->tables)): ?>
163
+<?php if (isset($this->tables)): ?>
164 164
                     <table class="table table-bordered">
165 165
                         <thead>
166 166
                             <tr>
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
                             </tr>
178 178
                         </thead>
179 179
                         <tbody>
180
-<?php foreach($this->tables['details'] as $table): ?>
180
+<?php foreach ($this->tables['details'] as $table): ?>
181 181
                             <tr>
182 182
                                 <td>
183 183
                                     <input type="checkbox" name="table_list[]" class="<?php
Please login to merge, or discard this patch.
templates/views/bootstrap3/sql/results.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,44 +1,44 @@
 block discarded – undo
1
-<?php foreach($this->results as $result): ?>
1
+<?php foreach ($this->results as $result): ?>
2 2
             <div class="row">
3
-<?php if(count($result['errors']) > 0): ?>
3
+<?php if (count($result['errors']) > 0): ?>
4 4
                 <div class="panel panel-danger">
5 5
                     <div class="panel-heading">
6 6
                         <?php echo $result['query'] ?>
7 7
                     </div>
8 8
                     <div class="panel-body" style="padding:5px 15px">
9
-<?php foreach($result['errors'] as $error): ?>
9
+<?php foreach ($result['errors'] as $error): ?>
10 10
                         <p style="margin:0"><?php echo $error ?></p>
11 11
 <?php endforeach ?>
12 12
                     </div>
13 13
                 </div>
14 14
 <?php endif ?>
15
-<?php if(count($result['messages']) > 0): ?>
15
+<?php if (count($result['messages']) > 0): ?>
16 16
                 <div class="panel panel-info">
17 17
                     <div class="panel-heading">
18 18
                         <?php echo $result['query'] ?>
19 19
                     </div>
20 20
                     <div class="panel-body" style="padding:5px 15px">
21
-<?php foreach($result['messages'] as $message): ?>
21
+<?php foreach ($result['messages'] as $message): ?>
22 22
                         <p style="margin:0"><?php echo $message ?></p>
23 23
 <?php endforeach ?>
24 24
                     </div>
25 25
                 </div>
26 26
 <?php endif ?>
27 27
 
28
-<?php if(($result['select'])): ?>
28
+<?php if (($result['select'])): ?>
29 29
                 <div class="table-responsive">
30 30
                     <table class="table table-bordered">
31 31
                         <thead>
32 32
                             <tr>
33
-<?php foreach($result['select']['headers'] as $header): ?>
33
+<?php foreach ($result['select']['headers'] as $header): ?>
34 34
                                 <th><?php echo $header ?></th>
35 35
 <?php endforeach ?>
36 36
                             </tr>
37 37
                         </thead>
38 38
                         <tbody>
39
-<?php foreach($result['select']['details'] as $details): ?>
39
+<?php foreach ($result['select']['details'] as $details): ?>
40 40
                             <tr>
41
-<?php foreach($details as $detail): ?>
41
+<?php foreach ($details as $detail): ?>
42 42
                                 <td><?php echo $detail ?></td>
43 43
 <?php endforeach ?>
44 44
                             </tr>
Please login to merge, or discard this patch.
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/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.