Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 2858-2868 (lines=11) @@
2855
2856
                // error style
2857
                $errorStyle = $dataValidation->getErrorStyle();
2858
                switch ($errorStyle) {
2859
                    case DataValidation::STYLE_STOP:
2860
                        $errorStyle = 0x00;
2861
                        break;
2862
                    case DataValidation::STYLE_WARNING:
2863
                        $errorStyle = 0x01;
2864
                        break;
2865
                    case DataValidation::STYLE_INFORMATION:
2866
                        $errorStyle = 0x02;
2867
                        break;
2868
                }
2869
2870
                $options |= $errorStyle << 4;
2871

src/PhpSpreadsheet/Reader/Xls.php 1 location

@@ 4690-4700 (lines=11) @@
4687
4688
        // bit: 4-6; mask: 0x00000070; error type
4689
        $errorStyle = (0x00000070 & $options) >> 4;
4690
        switch ($errorStyle) {
4691
            case 0x00:
4692
                $errorStyle = DataValidation::STYLE_STOP;
4693
                break;
4694
            case 0x01:
4695
                $errorStyle = DataValidation::STYLE_WARNING;
4696
                break;
4697
            case 0x02:
4698
                $errorStyle = DataValidation::STYLE_INFORMATION;
4699
                break;
4700
        }
4701
4702
        // bit: 7; mask: 0x00000080; 1= formula is explicit (only applies to list)
4703
        // I have only seen cases where this is 1