Code Duplication    Length = 8-9 lines in 2 locations

src/PhpSpreadsheet/Writer/HTML.php 2 locations

@@ 1136-1144 (lines=9) @@
1133
        $highestColumnIndex = \PhpOffice\PhpSpreadsheet\Cell::columnIndexFromString($pSheet->getHighestColumn()) - 1;
1134
        $i = -1;
1135
        while ($i++ < $highestColumnIndex) {
1136
            if (!$this->isPdf) {
1137
                if (!$this->useInlineCss) {
1138
                    $html .= '        <col class="col' . $i . '">' . PHP_EOL;
1139
                } else {
1140
                    $style = isset($this->cssStyles['table.sheet' . $sheetIndex . ' col.col' . $i]) ?
1141
                        $this->assembleCSS($this->cssStyles['table.sheet' . $sheetIndex . ' col.col' . $i]) : '';
1142
                    $html .= '        <col style="' . $style . '">' . PHP_EOL;
1143
                }
1144
            }
1145
        }
1146
1147
        return $html;
@@ 1201-1208 (lines=8) @@
1198
            }
1199
1200
            // Write row start
1201
            if (!$this->useInlineCss) {
1202
                $html .= '          <tr class="row' . $pRow . '">' . PHP_EOL;
1203
            } else {
1204
                $style = isset($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow])
1205
                    ? $this->assembleCSS($this->cssStyles['table.sheet' . $sheetIndex . ' tr.row' . $pRow]) : '';
1206
1207
                $html .= '          <tr style="' . $style . '">' . PHP_EOL;
1208
            }
1209
1210
            // Write cells
1211
            $colNum = 0;