@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $list = []; |
55 | 55 | foreach ($attributes as $key => $value) { |
56 | 56 | if (is_bool($value)) { |
57 | - if ((bool) $value) { |
|
57 | + if ((bool)$value) { |
|
58 | 58 | $list[] = $key; |
59 | 59 | } |
60 | 60 | } else if (empty($value) && !is_int($value)) { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | extract($vars); |
76 | 76 | ob_start(); |
77 | 77 | require $template; |
78 | - return (string) ob_get_clean(); |
|
78 | + return (string)ob_get_clean(); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | protected static function paging(&$v) |
@@ -90,13 +90,12 @@ discard block |
||
90 | 90 | |
91 | 91 | $limit = 10; |
92 | 92 | |
93 | - $v['start'] = $v['page'] > ($limit / 2) ? |
|
94 | - ($v['page'] - $limit / 2) : |
|
95 | - 1; |
|
93 | + $v['start'] = $v['page'] > ($limit/2) ? |
|
94 | + ($v['page'] - $limit/2) : 1; |
|
96 | 95 | |
97 | - if ($v['page'] > ($v['pages'] - ($limit / 2))) { |
|
96 | + if ($v['page'] > ($v['pages'] - ($limit/2))) { |
|
98 | 97 | $v['final'] = $v['pages']; |
99 | - } else if ($v['page'] > ($limit / 2)) { |
|
98 | + } else if ($v['page'] > ($limit/2)) { |
|
100 | 99 | $v['final'] = $v['start'] + $limit; |
101 | 100 | } else { |
102 | 101 | $v['final'] = $limit; |
@@ -118,9 +117,9 @@ discard block |
||
118 | 117 | } |
119 | 118 | $jump2show = function($m) use ($direction) { |
120 | 119 | if ($m >= 1000000) { |
121 | - return ($direction . ($m / 1000000) . "M"); |
|
120 | + return ($direction . ($m/1000000) . "M"); |
|
122 | 121 | } else if ($m >= 1000) { |
123 | - return ($direction . ($m / 1000) . "K"); |
|
122 | + return ($direction . ($m/1000) . "K"); |
|
124 | 123 | } else { |
125 | 124 | return ($direction . $m); |
126 | 125 | } |
@@ -137,7 +136,7 @@ discard block |
||
137 | 136 | $html = $direction === '-' ? $add . $html : $html . $add; |
138 | 137 | } |
139 | 138 | |
140 | - return $jump_exists ? self::pagingJumps($html, ($m * 10)) : $html; |
|
139 | + return $jump_exists ? self::pagingJumps($html, ($m*10)) : $html; |
|
141 | 140 | } |
142 | 141 | |
143 | 142 | protected static function filterValues(&$f, &$opts = []) |
@@ -187,8 +186,7 @@ discard block |
||
187 | 186 | { |
188 | 187 | if (($col = filter_input(INPUT_GET, 'col', FILTER_VALIDATE_INT))) { |
189 | 188 | return isset(self::$cols[$col][2]['sort']) ? |
190 | - self::$cols[$col][2]['sort'] : |
|
191 | - self::$cols[$col][1]; |
|
189 | + self::$cols[$col][2]['sort'] : self::$cols[$col][1]; |
|
192 | 190 | } |
193 | 191 | return self::$t['order']['col']; |
194 | 192 | } |
@@ -197,8 +195,7 @@ discard block |
||
197 | 195 | { |
198 | 196 | $reset = filter_has_var(INPUT_GET, 'col') ? 'asc' : null; |
199 | 197 | return in_array(filter_input(INPUT_GET, 'ord'), ['asc', 'desc']) ? |
200 | - filter_input(INPUT_GET, 'ord') : |
|
201 | - ($reset ?: self::$t['order']['dir']); |
|
198 | + filter_input(INPUT_GET, 'ord') : ($reset ?: self::$t['order']['dir']); |
|
202 | 199 | } |
203 | 200 | |
204 | 201 | protected static function requestExport() |
@@ -210,7 +207,6 @@ discard block |
||
210 | 207 | protected static function requestPage() |
211 | 208 | { |
212 | 209 | return filter_has_var(INPUT_GET, 'pg') && self::$export == false ? |
213 | - (int) filter_input(INPUT_GET, 'pg', FILTER_SANITIZE_NUMBER_INT) : |
|
214 | - self::$t['page']; |
|
210 | + (int)filter_input(INPUT_GET, 'pg', FILTER_SANITIZE_NUMBER_INT) : self::$t['page']; |
|
215 | 211 | } |
216 | 212 | } |