Passed
Push — main ( c0ed3d...4f3c5a )
by Thierry
08:13
created
templates/views/bootstrap4/table/select/results.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,12 +2,15 @@
 block discarded – undo
2 2
     <thead>
3 3
         <tr>
4 4
 <?php foreach($this->headers as $header): ?>
5
-            <th><?php if(is_array($header)) echo $header['key'] ?></th>
5
+            <th><?php if(is_array($header)) {
6
+    echo $header['key'] ?></th>
6 7
 <?php endforeach ?>
7 8
         </tr>
8 9
     </thead>
9 10
     <tbody>
10
-<?php $rowId = 0; foreach($this->rows as $row): ?>
11
+<?php $rowId = 0;
12
+}
13
+foreach($this->rows as $row): ?>
11 14
         <tr>
12 15
             <th>
13 16
                 <div class="btn-group" role="group" data-row-id="<?php echo $rowId++ ?>">
Please login to merge, or discard this patch.
templates/views/bootstrap4/table/edit.php 1 patch
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.
templates/views/bootstrap3/table/select/results.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,12 +2,15 @@
 block discarded – undo
2 2
     <thead>
3 3
         <tr>
4 4
 <?php foreach($this->headers as $header): ?>
5
-            <th><?php if(is_array($header)) echo $header['key'] ?></th>
5
+            <th><?php if(is_array($header)) {
6
+    echo $header['key'] ?></th>
6 7
 <?php endforeach ?>
7 8
         </tr>
8 9
     </thead>
9 10
     <tbody>
10
-<?php $rowId = 0; foreach($this->rows as $row): ?>
11
+<?php $rowId = 0;
12
+}
13
+foreach($this->rows as $row): ?>
11 14
         <tr>
12 15
             <th>
13 16
                 <div class="btn-group" role="group" data-row-id="<?php echo $rowId++ ?>">
Please login to merge, or discard this patch.
templates/views/bootstrap3/table/edit.php 1 patch
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.
src/DbAdmin/ExportAdmin.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -526,8 +526,7 @@
 block discarded – undo
526 526
                 }
527 527
 
528 528
                 $this->dumpTablesAndViews($database);
529
-            }
530
-            catch (\Exception $e) {
529
+            } catch (\Exception $e) {
531 530
                 return $e->getMessage();
532 531
             }
533 532
         }
Please login to merge, or discard this patch.
src/Db/Util.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -924,11 +924,9 @@
 block discarded – undo
924 924
         if ($link === '') {
925 925
             if ($this->isMail($value)) {
926 926
                 $link = "mailto:$value";
927
-            }
928
-            elseif ($this->isUrl($value)) {
927
+            } elseif ($this->isUrl($value)) {
929 928
                 $link = $value; // IE 11 and all modern browsers hide referrer
930
-            }
931
-            else {
929
+            } else {
932 930
                 $link = '';
933 931
             }
934 932
         }
Please login to merge, or discard this patch.
src/DbAdmin/CommandAdmin.php 2 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -325,8 +325,7 @@
 block discarded – undo
325 325
             try {
326 326
                 \ini_set('memory_limit', \max($this->util->iniBytes('memory_limit'),
327 327
                     2 * \strlen($queries) + \memory_get_usage() + 8e6));
328
-            }
329
-            catch(\Exception $e) {
328
+            } catch(\Exception $e) {
330 329
                 // Do nothing if the option is not modified.
331 330
             }
332 331
         }
Please login to merge, or discard this patch.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * @param mixed $value
39 39
      *
40 40
      * @return string
41
-    */
41
+     */
42 42
     // protected function editLink($value)
43 43
     // {
44 44
     //     $link = '';
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      * @param array $types
66 66
      *
67 67
      * @return string
68
-    */
68
+     */
69 69
     protected function values(array $row, array $blobs, array $types)
70 70
     {
71 71
         $values = [];
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      * @param int $limit
93 93
      *
94 94
      * @return string
95
-    */
95
+     */
96 96
     private function message($statement, int $limit)
97 97
     {
98 98
         $numRows = $statement->rowCount();
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @param array $orgtables
112 112
      *
113 113
      * @return string
114
-    */
114
+     */
115 115
     // protected function indexes($field, array $orgtables)
116 116
     // {
117 117
     //     static $links = []; // colno => orgtable - create links from these columns
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      * @param int $limit
149 149
      *
150 150
      * @return array
151
-    */
151
+     */
152 152
     protected function select($statement, $limit = 0)
153 153
     {
154 154
         $blobs = []; // colno => bool - display bytes for blobs
Please login to merge, or discard this patch.