@@ -198,15 +198,7 @@ protected function buildFooter()
198198 */
199199 protected function buildHeader ()
200200 {
201- $ labels = \array_map (function (array $ colInfo ) {
202- $ label = $ this ->dumper ->valDumper ->dump ($ colInfo ['key ' ], array (
203- 'tagName ' => null ,
204- ));
205- if (!empty ($ colInfo ['class ' ])) {
206- $ label .= ' ' . $ this ->dumper ->valDumper ->markupIdentifier ($ colInfo ['class ' ], 'className ' );
207- }
208- return $ label ;
209- }, $ this ->options ['tableInfo ' ]['columns ' ]);
201+ $ labels = \array_map ([$ this , 'buildHeaderLabel ' ], $ this ->options ['tableInfo ' ]['columns ' ]);
210202 $ keyLabel = $ this ->options ['tableInfo ' ]['commonRowInfo ' ]['keyOutput ' ]
211203 ? ($ this ->options ['tableInfo ' ]['indexLabel ' ]
212204 ? '<th class="text-right"> ' . $ this ->options ['tableInfo ' ]['indexLabel ' ] . '</th> '
@@ -218,11 +210,35 @@ protected function buildHeader()
218210 . ($ this ->options ['tableInfo ' ]['haveObjRow ' ]
219211 ? '<th> </th> '
220212 : '' )
221- . ' <th scope="col"> ' . \implode ('</th><th scope="col"> ' , $ labels ) . ' </th> '
213+ . \implode ('' , $ labels )
222214 . '</tr> ' . "\n"
223215 . '</thead> ' . "\n" ;
224216 }
225217
218+ /**
219+ * Build header label th tag
220+ *
221+ * @param array $colInfo Column information
222+ *
223+ * @return string
224+ */
225+ protected function buildHeaderLabel ($ colInfo )
226+ {
227+ $ type = $ this ->debug ->abstracter ->type ->getType ($ colInfo ['key ' ]);
228+ $ label = $ this ->dumper ->valDumper ->dump ($ colInfo ['key ' ], array (
229+ 'tagName ' => null ,
230+ ));
231+ if (!empty ($ colInfo ['class ' ])) {
232+ $ label .= ' ' . $ this ->dumper ->valDumper ->markupIdentifier ($ colInfo ['class ' ], 'className ' );
233+ }
234+ return $ this ->debug ->html ->buildTag ('th ' , array (
235+ 'class ' => $ type [0 ] !== 'string '
236+ ? 't_ ' . $ type [0 ]
237+ : null ,
238+ 'scope ' => 'col ' ,
239+ ), $ label );
240+ }
241+
226242 /**
227243 * Returns table row
228244 *
0 commit comments