Code Duplication    Length = 14-14 lines in 2 locations

src/PhpSpreadsheet/Writer/Xls/Worksheet.php 1 location

@@ 2736-2749 (lines=14) @@
2733
2734
                // error style
2735
                $errorStyle = 0x00;
2736
                switch ($dataValidation->getErrorStyle()) {
2737
                    case DataValidation::STYLE_STOP:
2738
                        $errorStyle = 0x00;
2739
2740
                        break;
2741
                    case DataValidation::STYLE_WARNING:
2742
                        $errorStyle = 0x01;
2743
2744
                        break;
2745
                    case DataValidation::STYLE_INFORMATION:
2746
                        $errorStyle = 0x02;
2747
2748
                        break;
2749
                }
2750
2751
                $options |= $errorStyle << 4;
2752

src/PhpSpreadsheet/Reader/Xls.php 1 location

@@ 4850-4863 (lines=14) @@
4847
4848
        // bit: 4-6; mask: 0x00000070; error type
4849
        $errorStyle = (0x00000070 & $options) >> 4;
4850
        switch ($errorStyle) {
4851
            case 0x00:
4852
                $errorStyle = DataValidation::STYLE_STOP;
4853
4854
                break;
4855
            case 0x01:
4856
                $errorStyle = DataValidation::STYLE_WARNING;
4857
4858
                break;
4859
            case 0x02:
4860
                $errorStyle = DataValidation::STYLE_INFORMATION;
4861
4862
                break;
4863
        }
4864
4865
        // bit: 7; mask: 0x00000080; 1= formula is explicit (only applies to list)
4866
        // I have only seen cases where this is 1