Code Duplication    Length = 14-14 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 1 location

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

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