Passed
Branchmaster (893a8b)
by Plamen
01:33
created
thead.php 1 patch
Spacing   +6 added lines, -10 removed lines patch added patch discarded remove patch
@@ -48,9 +48,8 @@  discard block
 block discarded – undo
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
         }
@@ -77,8 +76,7 @@  discard block
 block discarded – undo
77 76
                 if (isset($arg['width'])) { // Width attribute -> style
78 77
                     $width = 'width:' . $arg['width'] . ';';
79 78
                     $arg['style'] = isset($arg['style']) ?
80
-                            $width . $arg['style'] :
81
-                            $width;
79
+                            $width . $arg['style'] : $width;
82 80
                 }
83 81
                 
84 82
                 if (($del = isset($arg['type']) && $arg['type'] == 'delete')) {
@@ -89,10 +87,9 @@  discard block
 block discarded – undo
89 87
                 }
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
-                $attr = array_diff_key((array) $arg, ['sort', 'type', 'width']);
92
+                $attr = array_diff_key((array)$arg, ['sort', 'type', 'width']);
96 93
 
97 94
                 $ths[] = self::th($i, $attr, $sort, $del, $lbl);
98 95
             }
@@ -109,8 +106,7 @@  discard block
 block discarded – undo
109 106
         if (!$del) {
110 107
             if ($sort == self::$t['order']['col']) {
111 108
                 $span = self::$t['order']['dir'] === 'desc' ?
112
-                        self::config('UTF8_DESC_SYMBOL') :
113
-                        self::config('UTF8_ASC_SYMBOL');
109
+                        self::config('UTF8_DESC_SYMBOL') : self::config('UTF8_ASC_SYMBOL');
114 110
             } else {
115 111
                 $span = "";
116 112
             }
Please login to merge, or discard this patch.