Passed
Branchmaster (cbacc4)
by Plamen
01:42
created
thead.php 1 patch
Spacing   +6 added lines, -10 removed lines patch added patch discarded remove patch
@@ -45,9 +45,8 @@  discard block
 block discarded – undo
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,19 +81,17 @@  discard block
 block discarded – undo
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
         if (($del = isset($arg['type']) && $arg['type'] == 'delete')) {
90 88
             $sort = null;
91 89
         } else {
92 90
             $sort = !isset($arg['sort']) || $arg['sort'] !== false ?
93
-                    (isset($arg['sort']) ? $arg['sort'] : $col) :
94
-                    null;
91
+                    (isset($arg['sort']) ? $arg['sort'] : $col) : null;
95 92
         }
96 93
 
97
-        return array_diff_key((array) $arg, ['sort', 'type', 'width']);
94
+        return array_diff_key((array)$arg, ['sort', 'type', 'width']);
98 95
     }
99 96
 
100 97
     private static function th($i, $attr, $sort, $del, $lbl)
@@ -106,8 +103,7 @@  discard block
 block discarded – undo
106 103
         if (!$del) {
107 104
             if ($sort == self::$t['order']['col']) {
108 105
                 $span = self::$t['order']['dir'] === 'desc' ?
109
-                        self::config('UTF8_DESC_SYMBOL') :
110
-                        self::config('UTF8_ASC_SYMBOL');
106
+                        self::config('UTF8_DESC_SYMBOL') : self::config('UTF8_ASC_SYMBOL');
111 107
             } else {
112 108
                 $span = "";
113 109
             }
Please login to merge, or discard this patch.