Code Duplication    Length = 14-14 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 1 location

@@ 4840-4853 (lines=14) @@
4837
4838
        // bit: 4-6; mask: 0x00000070; error type
4839
        $errorStyle = (0x00000070 & $options) >> 4;
4840
        switch ($errorStyle) {
4841
            case 0x00:
4842
                $errorStyle = DataValidation::STYLE_STOP;
4843
4844
                break;
4845
            case 0x01:
4846
                $errorStyle = DataValidation::STYLE_WARNING;
4847
4848
                break;
4849
            case 0x02:
4850
                $errorStyle = DataValidation::STYLE_INFORMATION;
4851
4852
                break;
4853
        }
4854
4855
        // bit: 7; mask: 0x00000080; 1= formula is explicit (only applies to list)
4856
        // I have only seen cases where this is 1

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

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