Completed
Branch BUG/fatal-with-paypal-debug-li... (3a6198)
by
unknown
17:52 queued 09:26
created

EE_Email_Confirm_Input   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 5

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 22 3
1
<?php
2
/**
3
 * EE_Email_Confirm_Input
4
 *
5
 * @package         Event Espresso
6
 * @subpackage
7
 * @since           4.10.5.p
8
 * @author          Rafael Goulart
9
 */
10
class EE_Email_Confirm_Input extends EE_Form_Input_Base
11
{
12
13
    /**
14
     * @param array $input_settings
15
     */
16
    public function __construct($input_settings = array())
17
    {
18
        $this->_set_display_strategy(new EE_Text_Input_Display_Strategy('email'));
19
        $this->_set_normalization_strategy(new EE_Text_Normalization());
20
        $this->_add_validation_strategy(
21
            new EE_Email_Validation_Strategy(
22
                isset($input_settings['validation_error_message'])
23
                    ? $input_settings['validation_error_message']
24
                    : null
25
            )
26
        );
27
        $this->_add_validation_strategy(
28
            new EE_Equal_To_Validation_Strategy(
29
                isset($input_settings['validation_error_message'])
30
                    ? $input_settings['validation_error_message']
31
                    : null,
32
                '#' . str_replace('email_confirm', 'email', $input_settings['html_id'])
33
            )
34
        );
35
        parent::__construct($input_settings);
36
        $this->set_html_class($this->html_class() . ' email');
37
    }
38
}
39