Code Duplication    Length = 8-8 lines in 2 locations

core/libraries/form_sections/inputs/EE_File_Input.input.php 2 locations

@@ 36-43 (lines=8) @@
33
     */
34
    public function __construct($options = array())
35
    {
36
        if (isset($options['allowed_file_extensions'])) {
37
            if (!is_array($options['allowed_file_extensions'])) {
38
                throw new InvalidArgumentException(esc_html__('A valid allowed_file_extensions array was not provided to EE_File_Input', 'event_espresso'));
39
            }
40
            $this->allowed_file_extensions = $options['allowed_file_extensions'];
41
        } else {
42
            $this->allowed_file_extensions = ['csv'];
43
        }
44
        if (isset($options['allowed_mime_types'])) {
45
            if (!is_array($options['allowed_mime_types'])) {
46
                throw new InvalidArgumentException(esc_html__('A valid allowed_mime_types array was not provided to EE_File_Input', 'event_espresso'));
@@ 44-51 (lines=8) @@
41
        } else {
42
            $this->allowed_file_extensions = ['csv'];
43
        }
44
        if (isset($options['allowed_mime_types'])) {
45
            if (!is_array($options['allowed_mime_types'])) {
46
                throw new InvalidArgumentException(esc_html__('A valid allowed_mime_types array was not provided to EE_File_Input', 'event_espresso'));
47
            }
48
            $this->allowed_mime_types = $options['allowed_file_extensions'];
49
        } else {
50
            $this->allowed_mime_types = ['text/csv'];
51
        }
52
53
        $this->_set_display_strategy(new EE_File_Input_Display_Strategy());
54
        $this->_set_normalization_strategy(new EE_File_Normalization());