Passed
Push — master ( 87f610...286eca )
by Plamen
02:07
created
table.php 1 patch
Spacing   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,8 +25,7 @@  discard block
 block discarded – undo
25 25
     public static function prepare($setOrCheck = false)
26 26
     {
27 27
         //@see  http://php.net/manual/es/function.filter-input.php#77307
28
-        $uri = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL) ?:
29
-                filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
28
+        $uri = filter_input(INPUT_SERVER, 'REQUEST_URI', FILTER_SANITIZE_URL) ?: filter_var($_SERVER['REQUEST_URI'], FILTER_SANITIZE_URL);
30 29
 
31 30
         $extension = pathinfo(strtok($uri, '?'), PATHINFO_EXTENSION);
32 31
 
@@ -79,7 +78,7 @@  discard block
 block discarded – undo
79 78
 
80 79
         $filter = self::requestFilter();
81 80
         $order = [self::$t['order']['col'] => self::$t['order']['dir']];
82
-        $offset = (self::$t['page'] - 1) * self::$t['paging'];
81
+        $offset = (self::$t['page'] - 1)*self::$t['paging'];
83 82
         $limit = [$offset, self::$t['paging']];
84 83
         self::$t['q'] = self::q($q, $filter, $order, $limit, true);
85 84
 
Please login to merge, or discard this patch.
thead.php 1 patch
Spacing   +4 added lines, -7 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@  discard block
 block discarded – undo
46 46
     private static function tagAttributes($tag, $items)
47 47
     {
48 48
         $attr = $tag === 'div' ?
49
-                ['id' => $items . '-list', 'class' => 'table'] :
50
-                ['id' => $items . '-table', 'data-table' => 'js', 
49
+                ['id' => $items . '-list', 'class' => 'table'] : ['id' => $items . '-table', 'data-table' => 'js', 
51 50
                 'data-sort-a' => self::config('UTF8_ASC_SYMBOL'),
52 51
                 'data-sort-d' => self::config('UTF8_DESC_SYMBOL')];
53 52
         if (array_key_exists($tag, self::$attributes)) {
@@ -84,8 +83,7 @@  discard block
 block discarded – undo
84 83
         if (isset($arg['width'])) { // Width attribute -> style
85 84
             $width = 'width:' . $arg['width'] . ';';
86 85
             $arg['style'] = isset($arg['style']) ?
87
-                    $width . $arg['style'] :
88
-                    $width;
86
+                    $width . $arg['style'] : $width;
89 87
         }
90 88
 
91 89
         if (($del = isset($arg['type']) && $arg['type'] == 'delete')) {
@@ -94,7 +92,7 @@  discard block
 block discarded – undo
94 92
             $sort = isset($arg['sort']) ? $arg['sort'] : $col;
95 93
         }
96 94
 
97
-        return array_diff_key((array) $arg, ['sort', 'type', 'width']);
95
+        return array_diff_key((array)$arg, ['sort', 'type', 'width']);
98 96
     }
99 97
 
100 98
     private static function th($i, $attr, $sort, $del, $lbl)
@@ -106,8 +104,7 @@  discard block
 block discarded – undo
106 104
         if (!$del) {
107 105
             if ($sort == self::$t['order']['col']) {
108 106
                 $span = self::$t['order']['dir'] === 'desc' ?
109
-                        self::config('UTF8_DESC_SYMBOL') :
110
-                        self::config('UTF8_ASC_SYMBOL');
107
+                        self::config('UTF8_DESC_SYMBOL') : self::config('UTF8_ASC_SYMBOL');
111 108
             } else {
112 109
                 $span = "";
113 110
             }
Please login to merge, or discard this patch.
trait_table_request.php 1 patch
Spacing   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,8 +38,7 @@  discard block
 block discarded – undo
38 38
     {
39 39
         if (($col = filter_input(INPUT_GET, 'col', FILTER_VALIDATE_INT))) {
40 40
             return isset(self::$cols[$col][2]['sort']) ?
41
-                    self::$cols[$col][2]['sort'] :
42
-                    self::$cols[$col][1];
41
+                    self::$cols[$col][2]['sort'] : self::$cols[$col][1];
43 42
         }
44 43
         return self::$t['order']['col'];
45 44
     }
@@ -48,8 +47,7 @@  discard block
 block discarded – undo
48 47
     {
49 48
         $reset = filter_has_var(INPUT_GET, 'col') ? 'asc' : null;
50 49
         return in_array(filter_input(INPUT_GET, 'ord'), ['asc', 'desc']) ?
51
-                filter_input(INPUT_GET, 'ord') :
52
-                ($reset ?: self::$t['order']['dir']);
50
+                filter_input(INPUT_GET, 'ord') : ($reset ?: self::$t['order']['dir']);
53 51
     }
54 52
 
55 53
     private static function requestExport()
@@ -61,7 +59,6 @@  discard block
 block discarded – undo
61 59
     private static function requestPage()
62 60
     {
63 61
         return filter_has_var(INPUT_GET, 'pg') && self::$export == false ?
64
-                (int)filter_input(INPUT_GET, 'pg', FILTER_SANITIZE_NUMBER_INT) :
65
-                self::$t['page'];
62
+                (int)filter_input(INPUT_GET, 'pg', FILTER_SANITIZE_NUMBER_INT) : self::$t['page'];
66 63
     }
67 64
 }
Please login to merge, or discard this patch.