Completed
Branch master (2f51c0)
by
unknown
19:47 queued 19:47
created
core/libraries/form_sections/inputs/EE_Year_Input.input.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -12,17 +12,17 @@
 block discarded – undo
12 12
 class EE_Year_Input extends EE_Select_Input
13 13
 {
14 14
 
15
-    public function __construct($input_settings = array(), $four_digit_year = true, $years_behind = 100, $years_ahead = 0)
16
-    {
17
-        if ($four_digit_year) {
18
-            $current_year_int = intval(date('Y'));
19
-        } else {
20
-            $current_year_int = intval(date('y'));
21
-        }
22
-        $answer_options = array();
23
-        for ($start = $current_year_int - $years_behind; $start <= ($current_year_int + $years_ahead); $start++) {
24
-            $answer_options[ $start ] = $start;
25
-        }
26
-        parent::__construct($answer_options, $input_settings);
27
-    }
15
+	public function __construct($input_settings = array(), $four_digit_year = true, $years_behind = 100, $years_ahead = 0)
16
+	{
17
+		if ($four_digit_year) {
18
+			$current_year_int = intval(date('Y'));
19
+		} else {
20
+			$current_year_int = intval(date('y'));
21
+		}
22
+		$answer_options = array();
23
+		for ($start = $current_year_int - $years_behind; $start <= ($current_year_int + $years_ahead); $start++) {
24
+			$answer_options[ $start ] = $start;
25
+		}
26
+		parent::__construct($answer_options, $input_settings);
27
+	}
28 28
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
         }
22 22
         $answer_options = array();
23 23
         for ($start = $current_year_int - $years_behind; $start <= ($current_year_int + $years_ahead); $start++) {
24
-            $answer_options[ $start ] = $start;
24
+            $answer_options[$start] = $start;
25 25
         }
26 26
         parent::__construct($answer_options, $input_settings);
27 27
     }
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Password_Input.input.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -10,14 +10,14 @@
 block discarded – undo
10 10
 {
11 11
 
12 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('password'));
19
-        $this->_set_normalization_strategy(new EE_Text_Normalization());
20
-        parent::__construct($input_settings);
21
-        $this->set_html_class($this->html_class() . 'password');
22
-    }
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('password'));
19
+		$this->_set_normalization_strategy(new EE_Text_Normalization());
20
+		parent::__construct($input_settings);
21
+		$this->set_html_class($this->html_class() . 'password');
22
+	}
23 23
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,6 +18,6 @@
 block discarded – undo
18 18
         $this->_set_display_strategy(new EE_Text_Input_Display_Strategy('password'));
19 19
         $this->_set_normalization_strategy(new EE_Text_Normalization());
20 20
         parent::__construct($input_settings);
21
-        $this->set_html_class($this->html_class() . 'password');
21
+        $this->set_html_class($this->html_class().'password');
22 22
     }
23 23
 }
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Credit_Card_Month_Input.input.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -12,21 +12,21 @@
 block discarded – undo
12 12
 class EE_Credit_Card_Month_Input extends EE_Month_Input
13 13
 {
14 14
 
15
-    /**
16
-     * @param bool  $leading_zero
17
-     * @param array $input_settings
18
-     * @param bool $january_is_month_1
19
-     */
20
-    public function __construct(
21
-        $leading_zero = false,
22
-        $input_settings = array(),
23
-        $january_is_month_1 = true
24
-    ) {
25
-        $this->set_sensitive_data_removal_strategy(new EE_All_Sensitive_Data_Removal());
26
-        parent::__construct(
27
-            $leading_zero,
28
-            $input_settings,
29
-            $january_is_month_1
30
-        );
31
-    }
15
+	/**
16
+	 * @param bool  $leading_zero
17
+	 * @param array $input_settings
18
+	 * @param bool $january_is_month_1
19
+	 */
20
+	public function __construct(
21
+		$leading_zero = false,
22
+		$input_settings = array(),
23
+		$january_is_month_1 = true
24
+	) {
25
+		$this->set_sensitive_data_removal_strategy(new EE_All_Sensitive_Data_Removal());
26
+		parent::__construct(
27
+			$leading_zero,
28
+			$input_settings,
29
+			$january_is_month_1
30
+		);
31
+	}
32 32
 }
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Email_Input.input.php 2 patches
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -9,21 +9,21 @@
 block discarded – undo
9 9
 class EE_Email_Input extends EE_Form_Input_Base
10 10
 {
11 11
 
12
-    /**
13
-     * @param array $input_settings
14
-     */
15
-    public function __construct($input_settings = array())
16
-    {
17
-        $this->_set_display_strategy(new EE_Text_Input_Display_Strategy('email'));
18
-        $this->_set_normalization_strategy(new EE_Text_Normalization());
19
-        $this->_add_validation_strategy(
20
-            new EE_Email_Validation_Strategy(
21
-                isset($input_settings['validation_error_message'])
22
-                    ? $input_settings['validation_error_message']
23
-                    : null
24
-            )
25
-        );
26
-        parent::__construct($input_settings);
27
-        $this->set_html_class($this->html_class() . ' email');
28
-    }
12
+	/**
13
+	 * @param array $input_settings
14
+	 */
15
+	public function __construct($input_settings = array())
16
+	{
17
+		$this->_set_display_strategy(new EE_Text_Input_Display_Strategy('email'));
18
+		$this->_set_normalization_strategy(new EE_Text_Normalization());
19
+		$this->_add_validation_strategy(
20
+			new EE_Email_Validation_Strategy(
21
+				isset($input_settings['validation_error_message'])
22
+					? $input_settings['validation_error_message']
23
+					: null
24
+			)
25
+		);
26
+		parent::__construct($input_settings);
27
+		$this->set_html_class($this->html_class() . ' email');
28
+	}
29 29
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,6 +24,6 @@
 block discarded – undo
24 24
             )
25 25
         );
26 26
         parent::__construct($input_settings);
27
-        $this->set_html_class($this->html_class() . ' email');
27
+        $this->set_html_class($this->html_class().' email');
28 28
     }
29 29
 }
Please login to merge, or discard this patch.
core/libraries/form_sections/inputs/EE_Select_Input.input.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -13,20 +13,20 @@
 block discarded – undo
13 13
 class EE_Select_Input extends EE_Form_Input_With_Options_Base
14 14
 {
15 15
 
16
-    /**
17
-     * @param array $answer_options
18
-     * @param array $input_settings
19
-     */
20
-    public function __construct($answer_options, $input_settings = array())
21
-    {
22
-        $this->_set_display_strategy(new EE_Select_Display_Strategy($answer_options));
23
-        $this->_add_validation_strategy(
24
-            new EE_Enum_Validation_Strategy(
25
-                isset($input_settings['validation_error_message'])
26
-                    ? $input_settings['validation_error_message']
27
-                    : null
28
-            )
29
-        );
30
-        parent::__construct($answer_options, $input_settings);
31
-    }
16
+	/**
17
+	 * @param array $answer_options
18
+	 * @param array $input_settings
19
+	 */
20
+	public function __construct($answer_options, $input_settings = array())
21
+	{
22
+		$this->_set_display_strategy(new EE_Select_Display_Strategy($answer_options));
23
+		$this->_add_validation_strategy(
24
+			new EE_Enum_Validation_Strategy(
25
+				isset($input_settings['validation_error_message'])
26
+					? $input_settings['validation_error_message']
27
+					: null
28
+			)
29
+		);
30
+		parent::__construct($answer_options, $input_settings);
31
+	}
32 32
 }
Please login to merge, or discard this patch.
libraries/form_sections/strategies/EE_Form_Input_Strategy_Base.strategy.php 1 patch
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -9,40 +9,40 @@
 block discarded – undo
9 9
 abstract class EE_Form_Input_Strategy_Base
10 10
 {
11 11
 
12
-    /**
13
-     * Form Input to display
14
-     *
15
-     * @var EE_Form_Input_Base
16
-     */
17
-    protected $_input;
12
+	/**
13
+	 * Form Input to display
14
+	 *
15
+	 * @var EE_Form_Input_Base
16
+	 */
17
+	protected $_input;
18 18
 
19 19
 
20 20
 
21
-    public function __construct()
22
-    {
23
-    }
21
+	public function __construct()
22
+	{
23
+	}
24 24
 
25 25
 
26 26
 
27
-    /**
28
-     * The form input on which this strategy is to perform
29
-     *
30
-     * @param EE_Form_Input_Base $form_input
31
-     */
32
-    public function _construct_finalize(EE_Form_Input_Base $form_input)
33
-    {
34
-        $this->_input = $form_input;
35
-    }
27
+	/**
28
+	 * The form input on which this strategy is to perform
29
+	 *
30
+	 * @param EE_Form_Input_Base $form_input
31
+	 */
32
+	public function _construct_finalize(EE_Form_Input_Base $form_input)
33
+	{
34
+		$this->_input = $form_input;
35
+	}
36 36
 
37 37
 
38 38
 
39
-    /**
40
-     * Gets this strategy's input
41
-     *
42
-     * @return EE_Form_Input_Base
43
-     */
44
-    public function get_input()
45
-    {
46
-        return $this->_input;
47
-    }
39
+	/**
40
+	 * Gets this strategy's input
41
+	 *
42
+	 * @return EE_Form_Input_Base
43
+	 */
44
+	public function get_input()
45
+	{
46
+		return $this->_input;
47
+	}
48 48
 }
Please login to merge, or discard this patch.
strategies/display/EE_Submit_Input_Display_Strategy.strategy.php 2 patches
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -12,29 +12,29 @@
 block discarded – undo
12 12
 class EE_Submit_Input_Display_Strategy extends EE_Display_Strategy_Base
13 13
 {
14 14
 
15
-    /**
16
-     * @return string of html to display the input
17
-     */
18
-    public function display()
19
-    {
20
-        $default_value = $this->_input->get_default();
21
-        if ($this->_input->get_normalization_strategy() instanceof EE_Normalization_Strategy_Base) {
22
-            $default_value = $this->_input->get_normalization_strategy()->unnormalize($default_value);
23
-        }
24
-        $html = $this->_opening_tag('input');
25
-        $html .= $this->_attributes_string(
26
-            array_merge(
27
-                $this->_standard_attributes_array(),
28
-                array(
29
-                    'type'  => 'submit',
30
-                    'value' => $default_value,
31
-                    // overwrite the standard id with the backwards compatible one
32
-                    'id' => $this->_input->html_id() . '-submit',
33
-                    'class' => $this->_input->html_class() . ' ' . $this->_input->button_css_attributes()
34
-                )
35
-            )
36
-        );
37
-        $html .= $this->_close_tag();
38
-        return $html;
39
-    }
15
+	/**
16
+	 * @return string of html to display the input
17
+	 */
18
+	public function display()
19
+	{
20
+		$default_value = $this->_input->get_default();
21
+		if ($this->_input->get_normalization_strategy() instanceof EE_Normalization_Strategy_Base) {
22
+			$default_value = $this->_input->get_normalization_strategy()->unnormalize($default_value);
23
+		}
24
+		$html = $this->_opening_tag('input');
25
+		$html .= $this->_attributes_string(
26
+			array_merge(
27
+				$this->_standard_attributes_array(),
28
+				array(
29
+					'type'  => 'submit',
30
+					'value' => $default_value,
31
+					// overwrite the standard id with the backwards compatible one
32
+					'id' => $this->_input->html_id() . '-submit',
33
+					'class' => $this->_input->html_class() . ' ' . $this->_input->button_css_attributes()
34
+				)
35
+			)
36
+		);
37
+		$html .= $this->_close_tag();
38
+		return $html;
39
+	}
40 40
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@
 block discarded – undo
29 29
                     'type'  => 'submit',
30 30
                     'value' => $default_value,
31 31
                     // overwrite the standard id with the backwards compatible one
32
-                    'id' => $this->_input->html_id() . '-submit',
33
-                    'class' => $this->_input->html_class() . ' ' . $this->_input->button_css_attributes()
32
+                    'id' => $this->_input->html_id().'-submit',
33
+                    'class' => $this->_input->html_class().' '.$this->_input->button_css_attributes()
34 34
                 )
35 35
             )
36 36
         );
Please login to merge, or discard this patch.
form_sections/strategies/display/EE_Number_Input_Display_Strategy.php 1 patch
Indentation   +93 added lines, -93 removed lines patch added patch discarded remove patch
@@ -11,109 +11,109 @@
 block discarded – undo
11 11
 class EE_Number_Input_Display_Strategy extends EE_Display_Strategy_Base
12 12
 {
13 13
 
14
-    /**
15
-     * minimum value for number field
16
-     *
17
-     * @var int|null $min
18
-     */
19
-    protected $min;
14
+	/**
15
+	 * minimum value for number field
16
+	 *
17
+	 * @var int|null $min
18
+	 */
19
+	protected $min;
20 20
 
21
-    /**
22
-     * maximum value for number field
23
-     *
24
-     * @var int|null $max
25
-     */
26
-    protected $max;
21
+	/**
22
+	 * maximum value for number field
23
+	 *
24
+	 * @var int|null $max
25
+	 */
26
+	protected $max;
27 27
 
28 28
 
29
-    /**
30
-     * This is used to set the "step" attribute for the html5 number input.
31
-     * Controls the increments on the input when incrementing or decrementing the value.
32
-     * Note:  Although the step attribute allows for the string "any" to be used, Firefox and Chrome will interpret that
33
-     * to increment by 1.  So although "any" is accepted as a value, it is converted to 1.
34
-     * @var float
35
-     */
36
-    protected $step;
29
+	/**
30
+	 * This is used to set the "step" attribute for the html5 number input.
31
+	 * Controls the increments on the input when incrementing or decrementing the value.
32
+	 * Note:  Although the step attribute allows for the string "any" to be used, Firefox and Chrome will interpret that
33
+	 * to increment by 1.  So although "any" is accepted as a value, it is converted to 1.
34
+	 * @var float
35
+	 */
36
+	protected $step;
37 37
 
38 38
 
39
-    /**
40
-     * EE_Number_Input_Display_Strategy constructor.
41
-     * Null is the default value for the incoming arguments because 0 is a valid value.  So we use null
42
-     * to indicate NOT setting this attribute.
43
-     *
44
-     * @param int|null $min
45
-     * @param int|null $max
46
-     * @param int|null $step
47
-     * @throws InvalidArgumentException
48
-     */
49
-    public function __construct($min = null, $max = null, $step = null)
50
-    {
51
-        $this->min = is_numeric($min) || $min === null
52
-            ? $min
53
-            : $this->throwValidationException('min', $min);
54
-        $this->max = is_numeric($max) || $max === null
55
-            ? $max
56
-            : $this->throwValidationException('max', $max);
57
-        $step = $step === 'any' ? 1 : $step;
58
-        $this->step = is_numeric($step) || $step === null
59
-            ? $step
60
-            : $this->throwValidationException('step', $step);
61
-    }
39
+	/**
40
+	 * EE_Number_Input_Display_Strategy constructor.
41
+	 * Null is the default value for the incoming arguments because 0 is a valid value.  So we use null
42
+	 * to indicate NOT setting this attribute.
43
+	 *
44
+	 * @param int|null $min
45
+	 * @param int|null $max
46
+	 * @param int|null $step
47
+	 * @throws InvalidArgumentException
48
+	 */
49
+	public function __construct($min = null, $max = null, $step = null)
50
+	{
51
+		$this->min = is_numeric($min) || $min === null
52
+			? $min
53
+			: $this->throwValidationException('min', $min);
54
+		$this->max = is_numeric($max) || $max === null
55
+			? $max
56
+			: $this->throwValidationException('max', $max);
57
+		$step = $step === 'any' ? 1 : $step;
58
+		$this->step = is_numeric($step) || $step === null
59
+			? $step
60
+			: $this->throwValidationException('step', $step);
61
+	}
62 62
 
63 63
 
64
-    private function throwValidationException($argument_label, $argument_value)
65
-    {
66
-        throw new InvalidArgumentException(
67
-            sprintf(
68
-                esc_html__(
69
-                    'The %1$s parameter value for %2$s must be numeric or null, %3$s was passed into the constructor.',
70
-                    'event_espresso'
71
-                ),
72
-                $argument_label,
73
-                __CLASS__,
74
-                $argument_value
75
-            )
76
-        );
77
-    }
64
+	private function throwValidationException($argument_label, $argument_value)
65
+	{
66
+		throw new InvalidArgumentException(
67
+			sprintf(
68
+				esc_html__(
69
+					'The %1$s parameter value for %2$s must be numeric or null, %3$s was passed into the constructor.',
70
+					'event_espresso'
71
+				),
72
+				$argument_label,
73
+				__CLASS__,
74
+				$argument_value
75
+			)
76
+		);
77
+	}
78 78
 
79 79
 
80 80
 
81
-    /**
82
-     * @return string of html to display the field
83
-     */
84
-    public function display()
85
-    {
86
-        $input = $this->_opening_tag('input');
87
-        $input .= $this->_attributes_string(
88
-            array_merge(
89
-                $this->_standard_attributes_array(),
90
-                $this->getNumberInputAttributes()
91
-            )
92
-        );
93
-        $input .= $this->_close_tag();
94
-        return $input;
95
-    }
81
+	/**
82
+	 * @return string of html to display the field
83
+	 */
84
+	public function display()
85
+	{
86
+		$input = $this->_opening_tag('input');
87
+		$input .= $this->_attributes_string(
88
+			array_merge(
89
+				$this->_standard_attributes_array(),
90
+				$this->getNumberInputAttributes()
91
+			)
92
+		);
93
+		$input .= $this->_close_tag();
94
+		return $input;
95
+	}
96 96
 
97 97
 
98
-    /**
99
-     * Return the attributes specific to this display strategy
100
-     * @return array
101
-     */
102
-    private function getNumberInputAttributes()
103
-    {
104
-        $attributes = array(
105
-            'type' => 'number',
106
-            'value' => $this->_input->raw_value_in_form()
107
-        );
108
-        if ($this->min !== null) {
109
-            $attributes['min'] = $this->min;
110
-        }
111
-        if ($this->max !== null) {
112
-            $attributes['max'] = $this->max;
113
-        }
114
-        if ($this->step !== null) {
115
-            $attributes['step'] = $this->step;
116
-        }
117
-        return $attributes;
118
-    }
98
+	/**
99
+	 * Return the attributes specific to this display strategy
100
+	 * @return array
101
+	 */
102
+	private function getNumberInputAttributes()
103
+	{
104
+		$attributes = array(
105
+			'type' => 'number',
106
+			'value' => $this->_input->raw_value_in_form()
107
+		);
108
+		if ($this->min !== null) {
109
+			$attributes['min'] = $this->min;
110
+		}
111
+		if ($this->max !== null) {
112
+			$attributes['max'] = $this->max;
113
+		}
114
+		if ($this->step !== null) {
115
+			$attributes['step'] = $this->step;
116
+		}
117
+		return $attributes;
118
+	}
119 119
 }
Please login to merge, or discard this patch.
form_sections/strategies/display/EE_Hidden_Display_Strategy.strategy.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -11,13 +11,13 @@
 block discarded – undo
11 11
  */
12 12
 class EE_Hidden_Display_Strategy extends EE_Display_Strategy_Base
13 13
 {
14
-    /**
15
-     *
16
-     * @return string of html to display the HIDDEN field
17
-     */
18
-    public function display()
19
-    {
20
-        $input = $this->_input;
21
-        return "<input type='hidden' id='{$input->html_id()}' name='{$input->html_name()}' class='{$input->html_class()}' style='{$input->html_style()}' value='{$input->raw_value_in_form()}' {$input->other_html_attributes()}/>";
22
-    }
14
+	/**
15
+	 *
16
+	 * @return string of html to display the HIDDEN field
17
+	 */
18
+	public function display()
19
+	{
20
+		$input = $this->_input;
21
+		return "<input type='hidden' id='{$input->html_id()}' name='{$input->html_name()}' class='{$input->html_class()}' style='{$input->html_style()}' value='{$input->raw_value_in_form()}' {$input->other_html_attributes()}/>";
22
+	}
23 23
 }
Please login to merge, or discard this patch.