Code Duplication    Length = 4-7 lines in 2 locations

src/PhpSpreadsheet/Reader/Xlsx.php 2 locations

@@ 1063-1066 (lines=4) @@
1060
                                            }
1061
                                            //    Standard filters are always an OR join, so no join rule needs to be set
1062
                                            //    Entries can be either filter elements
1063
                                            foreach ($filters->filter as $filterRule) {
1064
                                                //    Operator is undefined, but always treated as EQUAL
1065
                                                $column->createRule()->setRule(null, (string) $filterRule['val'])->setRuleType(Column\Rule::AUTOFILTER_RULETYPE_FILTER);
1066
                                            }
1067
                                            //    Or Date Group elements
1068
                                            foreach ($filters->dateGroupItem as $dateGroupItem) {
1069
                                                $column->createRule()->setRule(
@@ 1094-1100 (lines=7) @@
1091
                                            if ((isset($customFilters['and'])) && ($customFilters['and'] == 1)) {
1092
                                                $column->setJoin(Column::AUTOFILTER_COLUMN_JOIN_AND);
1093
                                            }
1094
                                            foreach ($customFilters->customFilter as $filterRule) {
1095
                                                $column->createRule()->setRule(
1096
                                                    (string) $filterRule['operator'],
1097
                                                    (string) $filterRule['val']
1098
                                                )
1099
                                                ->setRuleType(Column\Rule::AUTOFILTER_RULETYPE_CUSTOMFILTER);
1100
                                            }
1101
                                        }
1102
                                        //    Check for dynamic filters
1103
                                        if ($filterColumn->dynamicFilter) {