Code Duplication    Length = 6-6 lines in 2 locations

lib/PDF.php 2 locations

@@ 251-256 (lines=6) @@
248
            $buffer .= '<thead>';
249
        $buffer .= '<tr>';
250
        $i = 0;
251
        foreach ($headers as &$col) {
252
            $width = ($w and isset($w[$i])) ? (';width:'.$w[$i].'mm') : '';
253
            $align = isset($a[$i]) ? $a[$i] : 'center';
254
            $buffer .= '<th style="border-right:1px solid #333;border-bottom:1px solid #333;text-align:'.$align.$width.'"><strong>'.strip_tags($col).'</strong></th>';
255
            $i++;
256
        }
257
        $buffer .= '</tr>';
258
        if ($thead)
259
            $buffer .= '</thead>';
@@ 266-271 (lines=6) @@
263
        foreach ($data as &$row) {
264
            $buffer .= '<tr>';
265
            $i = 0;
266
            foreach ($row as &$col) {
267
                $width = ($w and isset($w[$i])) ? (';width:'.$w[$i].'mm') : '';
268
                $align = isset($a[$i]) ? $a[$i] : 'center';
269
                $buffer .= '<td style="border-right:1px solid #333;text-align:'.$align.$width.'">'.$col.'</td>';
270
                $i++;
271
            }
272
            $buffer .= '</tr>';
273
        }
274
        if ($thead)