Code Duplication    Length = 4-7 lines in 2 locations

src/PhpSpreadsheet/Reader/Excel2007.php 2 locations

@@ 1084-1087 (lines=4) @@
1081
                                            }
1082
                                            //    Standard filters are always an OR join, so no join rule needs to be set
1083
                                            //    Entries can be either filter elements
1084
                                            foreach ($filters->filter as $filterRule) {
1085
                                                //    Operator is undefined, but always treated as EQUAL
1086
                                                $column->createRule()->setRule(null, (string) $filterRule["val"])->setRuleType(\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_FILTER);
1087
                                            }
1088
                                            //    Or Date Group elements
1089
                                            foreach ($filters->dateGroupItem as $dateGroupItem) {
1090
                                                $column->createRule()->setRule(
@@ 1115-1121 (lines=7) @@
1112
                                            if ((isset($customFilters["and"])) && ($customFilters["and"] == 1)) {
1113
                                                $column->setJoin(\PhpSpreadsheet\Worksheet\AutoFilter\Column::AUTOFILTER_COLUMN_JOIN_AND);
1114
                                            }
1115
                                            foreach ($customFilters->customFilter as $filterRule) {
1116
                                                $column->createRule()->setRule(
1117
                                                    (string) $filterRule["operator"],
1118
                                                    (string) $filterRule["val"]
1119
                                                )
1120
                                                ->setRuleType(\PhpSpreadsheet\Worksheet\AutoFilter\Column\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
1121
                                            }
1122
                                        }
1123
                                        //    Check for dynamic filters
1124
                                        if ($filterColumn->dynamicFilter) {