Code Duplication    Length = 11-11 lines in 2 locations

src/PhpSpreadsheet/Reader/Excel5.php 1 location

@@ 4749-4759 (lines=11) @@
4746
4747
        // bit: 4-6; mask: 0x00000070; error type
4748
        $errorStyle = (0x00000070 & $options) >> 4;
4749
        switch ($errorStyle) {
4750
            case 0x00:
4751
                $errorStyle = \PhpSpreadsheet\Cell\DataValidation::STYLE_STOP;
4752
                break;
4753
            case 0x01:
4754
                $errorStyle = \PhpSpreadsheet\Cell\DataValidation::STYLE_WARNING;
4755
                break;
4756
            case 0x02:
4757
                $errorStyle = \PhpSpreadsheet\Cell\DataValidation::STYLE_INFORMATION;
4758
                break;
4759
        }
4760
4761
        // bit: 7; mask: 0x00000080; 1= formula is explicit (only applies to list)
4762
        // I have only seen cases where this is 1

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

@@ 2824-2834 (lines=11) @@
2821
2822
                // error style
2823
                $errorStyle = $dataValidation->getType();
2824
                switch ($errorStyle) {
2825
                    case \PhpSpreadsheet\Cell\DataValidation::STYLE_STOP:
2826
                        $errorStyle = 0x00;
2827
                        break;
2828
                    case \PhpSpreadsheet\Cell\DataValidation::STYLE_WARNING:
2829
                        $errorStyle = 0x01;
2830
                        break;
2831
                    case \PhpSpreadsheet\Cell\DataValidation::STYLE_INFORMATION:
2832
                        $errorStyle = 0x02;
2833
                        break;
2834
                }
2835
                $options |= $errorStyle << 4;
2836
2837
                // explicit formula?