Code Duplication    Length = 4-7 lines in 2 locations

src/PhpSpreadsheet/Reader/Xlsx.php 2 locations

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