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