Code Duplication    Length = 4-7 lines in 2 locations

src/PhpSpreadsheet/Reader/Excel2007.php 2 locations

@@ 1042-1045 (lines=4) @@
1039
                                            }
1040
                                            //    Standard filters are always an OR join, so no join rule needs to be set
1041
                                            //    Entries can be either filter elements
1042
                                            foreach ($filters->filter as $filterRule) {
1043
                                                //    Operator is undefined, but always treated as EQUAL
1044
                                                $column->createRule()->setRule(null, (string) $filterRule['val'])->setRuleType(\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_FILTER);
1045
                                            }
1046
                                            //    Or Date Group elements
1047
                                            foreach ($filters->dateGroupItem as $dateGroupItem) {
1048
                                                $column->createRule()->setRule(
@@ 1073-1079 (lines=7) @@
1070
                                            if ((isset($customFilters['and'])) && ($customFilters['and'] == 1)) {
1071
                                                $column->setJoin(\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND);
1072
                                            }
1073
                                            foreach ($customFilters->customFilter as $filterRule) {
1074
                                                $column->createRule()->setRule(
1075
                                                    (string) $filterRule['operator'],
1076
                                                    (string) $filterRule['val']
1077
                                                )
1078
                                                ->setRuleType(\PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
1079
                                            }
1080
                                        }
1081
                                        //    Check for dynamic filters
1082
                                        if ($filterColumn->dynamicFilter) {