@@ -48,9 +48,8 @@ discard block |
||
48 | 48 | |
49 | 49 | private static function tagAttributes($tag, $items) |
50 | 50 | { |
51 | - $attr = $tag==='div' ? |
|
52 | - ['id' => $items . '-list', 'class' => 'table'] : |
|
53 | - ['id' => $items . '-table', 'data-table' => 'js']; |
|
51 | + $attr = $tag === 'div' ? |
|
52 | + ['id' => $items . '-list', 'class' => 'table'] : ['id' => $items . '-table', 'data-table' => 'js']; |
|
54 | 53 | if (array_key_exists($tag, self::$attributes)) { |
55 | 54 | $attr += self::$attributes[$tag]; |
56 | 55 | } |
@@ -85,15 +84,13 @@ discard block |
||
85 | 84 | if (isset($arg['width'])) { // Width attribute -> style |
86 | 85 | $width = 'width:' . $arg['width'] . ';'; |
87 | 86 | $arg['style'] = isset($arg['style']) ? |
88 | - $width . $arg['style'] : |
|
89 | - $width; |
|
87 | + $width . $arg['style'] : $width; |
|
90 | 88 | } |
91 | 89 | |
92 | 90 | $sortable = !isset($arg['sort']) || $arg['sort'] !== false; |
93 | 91 | |
94 | 92 | $sort = $sortable ? |
95 | - (isset($arg['sort']) ? $arg['sort'] : $col) : |
|
96 | - null; |
|
93 | + (isset($arg['sort']) ? $arg['sort'] : $col) : null; |
|
97 | 94 | |
98 | 95 | if (($del = isset($arg['type']) && $arg['type'] == 'delete')) { |
99 | 96 | if (false === strpos($arg['style'], 'width:')) { |
@@ -102,7 +99,7 @@ discard block |
||
102 | 99 | $sort = null; |
103 | 100 | } |
104 | 101 | |
105 | - return array_diff_key((array) $arg, ['sort', 'type', 'width']); |
|
102 | + return array_diff_key((array)$arg, ['sort', 'type', 'width']); |
|
106 | 103 | } |
107 | 104 | |
108 | 105 | private static function th($i, $attr, $sort, $del, $lbl) |
@@ -114,8 +111,7 @@ discard block |
||
114 | 111 | if (!$del) { |
115 | 112 | if ($sort == self::$t['order']['col']) { |
116 | 113 | $span = self::$t['order']['dir'] === 'desc' ? |
117 | - self::config('UTF8_DESC_SYMBOL') : |
|
118 | - self::config('UTF8_ASC_SYMBOL'); |
|
114 | + self::config('UTF8_DESC_SYMBOL') : self::config('UTF8_ASC_SYMBOL'); |
|
119 | 115 | } else { |
120 | 116 | $span = ""; |
121 | 117 | } |