Code Duplication    Length = 11-12 lines in 2 locations

lib/Filter/DateFilter.php 1 location

@@ 47-58 (lines=12) @@
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function configureOptions(OptionsResolver $options)
48
    {
49
        $options->setDefault('comparators', $this->getComparatorMap());
50
        $options->setDefault('data_class', DateFilterData::class);
51
        $options->setDefault('empty_data', function (FormInterface $form) {
52
            return new DateFilterData(
53
                $form->get('apply')->getData(),
54
                $form->get('comparator')->getData(),
55
                $form->get('value')->getData()
56
            );
57
        });
58
    }
59
60
    protected function getComparatorMap(): array
61
    {

lib/Filter/NumberFilter.php 1 location

@@ 47-57 (lines=11) @@
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function configureOptions(OptionsResolver $options)
48
    {
49
        $options->setDefault('comparators', $this->getComparatorMap());
50
        $options->setDefault('data_class', NumberFilterData::class);
51
        $options->setDefault('empty_data', function (FormInterface $form) {
52
            return new NumberFilterData(
53
                $form->get('comparator')->getData(),
54
                $form->get('value')->getData()
55
            );
56
        });
57
    }
58
59
    protected function getComparatorMap(): array
60
    {