Code Duplication    Length = 39-46 lines in 2 locations

module/Cv/src/Cv/Form/SearchFormFieldset.php 1 location

@@ 19-64 (lines=46) @@
16
17
    protected $locationEngineType = 'photon';
18
19
    public function init()
20
    {
21
        $this->addTextElement(
22
            'Search',
23
            /*@translate*/
24
            'Search for Applicant Name'
25
        );
26
27
        $this->add(
28
            array(
29
                'name' => 'l',
30
                'type' => 'Location',
31
                'options' => array(
32
                    'label' => /*@translate*/
33
                        'Location',
34
                    'engine_type' => $this->locationEngineType,
35
                ),
36
            )
37
        );
38
39
        $this->add(
40
            array(
41
                'name' => 'd',
42
                'type' => 'Zend\Form\Element\Select',
43
                'options' => array(
44
                    'label' => /*@translate*/
45
                        'Distance',
46
                    'value_options' => [
47
                        '5' => '5 km',
48
                        '10' => '10 km',
49
                        '20' => '20 km',
50
                        '50' => '50 km',
51
                        '100' => '100 km'
52
                    ],
53
54
                ),
55
                'attributes' => [
56
                    'value' => '10', // default distance
57
                    'data-searchbox' => -1,  // hide the search box
58
                    'data-allowclear' => 'false', // allow to clear a selected value
59
                    'data-placeholder' => /*@translate*/
60
                        'Distance',
61
                ]
62
            )
63
        );
64
    }
65
}

module/Jobs/src/Jobs/Form/ListFilterLocationFieldset.php 1 location

@@ 37-75 (lines=39) @@
34
        }
35
    }
36
37
    public function init()
38
    {
39
        $this->parentInit();
40
41
        $this->add(
42
            array(
43
                'name'    => 'l',
44
                'type'    => 'Location',
45
                'options' => array(
46
                    'label'       => /*@translate*/ 'Location',
47
                    'engine_type' => $this->locationEngineType,
48
                ),
49
            )
50
        );
51
52
        $this->add(
53
            array(
54
                'name'    => 'd',
55
                'type'    => 'Zend\Form\Element\Select',
56
                'options' => array(
57
                    'label'         => /*@translate*/ 'Distance',
58
                    'value_options' => [
59
                        '5'   => '5 km',
60
                        '10'  => '10 km',
61
                        '20'  => '20 km',
62
                        '50'  => '50 km',
63
                        '100' => '100 km'
64
                    ],
65
66
                ),
67
                'attributes' => [
68
                    'value' => '10', // default distance
69
                    'data-searchbox'  => -1,  // hide the search box
70
                    'data-allowclear' => 'false', // allow to clear a selected value
71
                    'data-placeholder'  => /*@translate*/ 'Distance',
72
                ]
73
            )
74
        );
75
    }
76
77
    /**
78
     * @codeCoverageIgnore