Code Duplication    Length = 5-5 lines in 3 locations

src/PhpSpreadsheet/Writer/HTML.php 3 locations

@@ 413-417 (lines=5) @@
410
411
        // Fetch sheets
412
        $sheets = array();
413
        if (is_null($this->sheetIndex)) {
414
            $sheets = $this->spreadsheet->getAllSheets();
415
        } else {
416
            $sheets[] = $this->spreadsheet->getSheet($this->sheetIndex);
417
        }
418
419
        // Construct HTML
420
        $html = '';
@@ 527-531 (lines=5) @@
524
525
        // Fetch sheets
526
        $sheets = array();
527
        if (is_null($this->sheetIndex)) {
528
            $sheets = $this->spreadsheet->getAllSheets();
529
        } else {
530
            $sheets[] = $this->spreadsheet->getSheet($this->sheetIndex);
531
        }
532
533
        // Construct HTML
534
        $html = '';
@@ 847-851 (lines=5) @@
844
845
        // Fetch sheets
846
        $sheets = array();
847
        if (is_null($this->sheetIndex)) {
848
            $sheets = $this->spreadsheet->getAllSheets();
849
        } else {
850
            $sheets[] = $this->spreadsheet->getSheet($this->sheetIndex);
851
        }
852
853
        // Build styles per sheet
854
        foreach ($sheets as $sheet) {