Completed
Branch FET/allow-prices-to-be-more-pr... (276f1f)
by
unknown
16:59 queued 13:36
created
form_sections/strategies/layout/EE_Fieldset_Section_Layout.strategy.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     public function __construct($options = array())
37 37
     {
38 38
         foreach ($options as $key => $value) {
39
-            $key = '_' . $key;
39
+            $key = '_'.$key;
40 40
             if (property_exists($this, $key)) {
41 41
                 $this->{$key} = $value;
42 42
             }
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
                 . '" style="'
61 61
                 . $this->_form_section->html_style()
62 62
                 . '">';
63
-        $html .= '<legend class="' . $this->legend_class() . '">' . $this->legend_text() . '</legend>';
63
+        $html .= '<legend class="'.$this->legend_class().'">'.$this->legend_text().'</legend>';
64 64
         return $html;
65 65
     }
66 66
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function layout_form_end()
75 75
     {
76
-        return EEH_HTML::nl(-1) . '</fieldset>';
76
+        return EEH_HTML::nl(-1).'</fieldset>';
77 77
     }
78 78
 
79 79
 
Please login to merge, or discard this patch.
Indentation   +103 added lines, -103 removed lines patch added patch discarded remove patch
@@ -11,107 +11,107 @@
 block discarded – undo
11 11
  */
12 12
 class EE_Fieldset_Section_Layout extends EE_Div_Per_Section_Layout
13 13
 {
14
-    /**
15
-     * legend_class
16
-     *
17
-     * @var string
18
-     */
19
-    protected $_legend_class;
20
-
21
-    /**
22
-     * legend_text
23
-     *
24
-     * @var string
25
-     */
26
-    protected $_legend_text;
27
-
28
-
29
-
30
-    /**
31
-     *    construct
32
-     *
33
-     * @param array $options
34
-     */
35
-    public function __construct($options = array())
36
-    {
37
-        foreach ($options as $key => $value) {
38
-            $key = '_' . $key;
39
-            if (property_exists($this, $key)) {
40
-                $this->{$key} = $value;
41
-            }
42
-        }
43
-    }
44
-
45
-
46
-
47
-    /**
48
-     * opening div tag for a form
49
-     *
50
-     * @return string
51
-     */
52
-    public function layout_form_begin()
53
-    {
54
-        $html = EEH_HTML::nl(1)
55
-                . '<fieldset id="'
56
-                . $this->_form_section->html_id()
57
-                . '" class="'
58
-                . $this->_form_section->html_class()
59
-                . '" style="'
60
-                . $this->_form_section->html_style()
61
-                . '">';
62
-        $html .= '<legend class="' . $this->legend_class() . '">' . $this->legend_text() . '</legend>';
63
-        return $html;
64
-    }
65
-
66
-
67
-
68
-    /**
69
-     * closing div tag for a form
70
-     *
71
-     * @return string
72
-     */
73
-    public function layout_form_end()
74
-    {
75
-        return EEH_HTML::nl(-1) . '</fieldset>';
76
-    }
77
-
78
-
79
-
80
-    /**
81
-     * @param string $legend_class
82
-     */
83
-    public function set_legend_class($legend_class)
84
-    {
85
-        $this->_legend_class = $legend_class;
86
-    }
87
-
88
-
89
-
90
-    /**
91
-     * @return string
92
-     */
93
-    public function legend_class()
94
-    {
95
-        return $this->_legend_class;
96
-    }
97
-
98
-
99
-
100
-    /**
101
-     * @param string $legend_text
102
-     */
103
-    public function set_legend_text($legend_text)
104
-    {
105
-        $this->_legend_text = $legend_text;
106
-    }
107
-
108
-
109
-
110
-    /**
111
-     * @return string
112
-     */
113
-    public function legend_text()
114
-    {
115
-        return $this->_legend_text;
116
-    }
14
+	/**
15
+	 * legend_class
16
+	 *
17
+	 * @var string
18
+	 */
19
+	protected $_legend_class;
20
+
21
+	/**
22
+	 * legend_text
23
+	 *
24
+	 * @var string
25
+	 */
26
+	protected $_legend_text;
27
+
28
+
29
+
30
+	/**
31
+	 *    construct
32
+	 *
33
+	 * @param array $options
34
+	 */
35
+	public function __construct($options = array())
36
+	{
37
+		foreach ($options as $key => $value) {
38
+			$key = '_' . $key;
39
+			if (property_exists($this, $key)) {
40
+				$this->{$key} = $value;
41
+			}
42
+		}
43
+	}
44
+
45
+
46
+
47
+	/**
48
+	 * opening div tag for a form
49
+	 *
50
+	 * @return string
51
+	 */
52
+	public function layout_form_begin()
53
+	{
54
+		$html = EEH_HTML::nl(1)
55
+				. '<fieldset id="'
56
+				. $this->_form_section->html_id()
57
+				. '" class="'
58
+				. $this->_form_section->html_class()
59
+				. '" style="'
60
+				. $this->_form_section->html_style()
61
+				. '">';
62
+		$html .= '<legend class="' . $this->legend_class() . '">' . $this->legend_text() . '</legend>';
63
+		return $html;
64
+	}
65
+
66
+
67
+
68
+	/**
69
+	 * closing div tag for a form
70
+	 *
71
+	 * @return string
72
+	 */
73
+	public function layout_form_end()
74
+	{
75
+		return EEH_HTML::nl(-1) . '</fieldset>';
76
+	}
77
+
78
+
79
+
80
+	/**
81
+	 * @param string $legend_class
82
+	 */
83
+	public function set_legend_class($legend_class)
84
+	{
85
+		$this->_legend_class = $legend_class;
86
+	}
87
+
88
+
89
+
90
+	/**
91
+	 * @return string
92
+	 */
93
+	public function legend_class()
94
+	{
95
+		return $this->_legend_class;
96
+	}
97
+
98
+
99
+
100
+	/**
101
+	 * @param string $legend_text
102
+	 */
103
+	public function set_legend_text($legend_text)
104
+	{
105
+		$this->_legend_text = $legend_text;
106
+	}
107
+
108
+
109
+
110
+	/**
111
+	 * @return string
112
+	 */
113
+	public function legend_text()
114
+	{
115
+		return $this->_legend_text;
116
+	}
117 117
 }
Please login to merge, or discard this patch.
form_sections/strategies/layout/EE_Admin_Two_Column_Layout.strategy.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function layout_form_begin($additional_args = array())
17 17
     {
18
-        $this->_form_section->set_html_class($this->_form_section->html_class() . ' form-table');
18
+        $this->_form_section->set_html_class($this->_form_section->html_class().' form-table');
19 19
         return parent::layout_form_begin($additional_args);
20 20
     }
21 21
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             || $input->get_display_strategy() instanceof EE_Text_Input_Display_Strategy
53 53
             || $input->get_display_strategy() instanceof EE_Admin_File_Uploader_Display_Strategy
54 54
         ) {
55
-            $input->set_html_class($input->html_class() . ' large-text');
55
+            $input->set_html_class($input->html_class().' large-text');
56 56
         }
57 57
         if ($input instanceof EE_Text_Area_Input) {
58 58
             $input->set_rows(4);
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
         $input_html = $input->get_html_for_input();
62 62
         // maybe add errors and help text ?
63 63
         $input_html .= $input->get_html_for_errors() !== ''
64
-            ? EEH_HTML::nl() . $input->get_html_for_errors()
64
+            ? EEH_HTML::nl().$input->get_html_for_errors()
65 65
             : '';
66 66
         $input_html .= $input->get_html_for_help() !== ''
67
-            ? EEH_HTML::nl() . $input->get_html_for_help()
67
+            ? EEH_HTML::nl().$input->get_html_for_help()
68 68
             : '';
69 69
         // overriding parent to add wp admin specific things.
70 70
         $html = '';
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                     '',
79 79
                     '',
80 80
                     'scope="row"'
81
-                ) . EEH_HTML::td($input_html)
81
+                ).EEH_HTML::td($input_html)
82 82
             );
83 83
         }
84 84
         return $html;
Please login to merge, or discard this patch.
Indentation   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -6,63 +6,63 @@
 block discarded – undo
6 6
  */
7 7
 class EE_Admin_Two_Column_Layout extends EE_Two_Column_Layout
8 8
 {
9
-    /**
10
-     * Overriding the parent table layout to include <tbody> tags
11
-     *
12
-     * @param array $additional_args
13
-     * @return string
14
-     */
15
-    public function layout_form_begin($additional_args = array())
16
-    {
17
-        $this->_form_section->set_html_class($this->_form_section->html_class() . ' form-table');
18
-        return parent::layout_form_begin($additional_args);
19
-    }
9
+	/**
10
+	 * Overriding the parent table layout to include <tbody> tags
11
+	 *
12
+	 * @param array $additional_args
13
+	 * @return string
14
+	 */
15
+	public function layout_form_begin($additional_args = array())
16
+	{
17
+		$this->_form_section->set_html_class($this->_form_section->html_class() . ' form-table');
18
+		return parent::layout_form_begin($additional_args);
19
+	}
20 20
 
21 21
 
22 22
 
23
-    /**
24
-     * Lays out the row for the input, including label and errors
25
-     *
26
-     * @param EE_Form_Input_Base $input
27
-     * @return string
28
-     * @throws EE_Error
29
-     */
30
-    public function layout_input($input)
31
-    {
32
-        if (
33
-            $input->get_display_strategy() instanceof EE_Text_Area_Display_Strategy
34
-            || $input->get_display_strategy() instanceof EE_Text_Input_Display_Strategy
35
-            || $input->get_display_strategy() instanceof EE_Admin_File_Uploader_Display_Strategy
36
-        ) {
37
-            $input->set_html_class($input->html_class() . ' large-text');
38
-        }
39
-        if ($input instanceof EE_Text_Area_Input) {
40
-            $input->set_rows(4);
41
-            $input->set_cols(60);
42
-        }
43
-        $input_html = $input->get_html_for_input();
44
-        // maybe add errors and help text ?
45
-        $input_html .= $input->get_html_for_errors() !== ''
46
-            ? EEH_HTML::nl() . $input->get_html_for_errors()
47
-            : '';
48
-        $input_html .= $input->get_html_for_help() !== ''
49
-            ? EEH_HTML::nl() . $input->get_html_for_help()
50
-            : '';
51
-        // overriding parent to add wp admin specific things.
52
-        $html = '';
53
-        if ($input instanceof EE_Hidden_Input) {
54
-            $html .= EEH_HTML::no_row($input->get_html_for_input());
55
-        } else {
56
-            $html .= EEH_HTML::tr(
57
-                EEH_HTML::th(
58
-                    $input->get_html_for_label(),
59
-                    '',
60
-                    '',
61
-                    '',
62
-                    'scope="row"'
63
-                ) . EEH_HTML::td($input_html)
64
-            );
65
-        }
66
-        return $html;
67
-    }
23
+	/**
24
+	 * Lays out the row for the input, including label and errors
25
+	 *
26
+	 * @param EE_Form_Input_Base $input
27
+	 * @return string
28
+	 * @throws EE_Error
29
+	 */
30
+	public function layout_input($input)
31
+	{
32
+		if (
33
+			$input->get_display_strategy() instanceof EE_Text_Area_Display_Strategy
34
+			|| $input->get_display_strategy() instanceof EE_Text_Input_Display_Strategy
35
+			|| $input->get_display_strategy() instanceof EE_Admin_File_Uploader_Display_Strategy
36
+		) {
37
+			$input->set_html_class($input->html_class() . ' large-text');
38
+		}
39
+		if ($input instanceof EE_Text_Area_Input) {
40
+			$input->set_rows(4);
41
+			$input->set_cols(60);
42
+		}
43
+		$input_html = $input->get_html_for_input();
44
+		// maybe add errors and help text ?
45
+		$input_html .= $input->get_html_for_errors() !== ''
46
+			? EEH_HTML::nl() . $input->get_html_for_errors()
47
+			: '';
48
+		$input_html .= $input->get_html_for_help() !== ''
49
+			? EEH_HTML::nl() . $input->get_html_for_help()
50
+			: '';
51
+		// overriding parent to add wp admin specific things.
52
+		$html = '';
53
+		if ($input instanceof EE_Hidden_Input) {
54
+			$html .= EEH_HTML::no_row($input->get_html_for_input());
55
+		} else {
56
+			$html .= EEH_HTML::tr(
57
+				EEH_HTML::th(
58
+					$input->get_html_for_label(),
59
+					'',
60
+					'',
61
+					'',
62
+					'scope="row"'
63
+				) . EEH_HTML::td($input_html)
64
+			);
65
+		}
66
+		return $html;
67
+	}
68 68
 }
Please login to merge, or discard this patch.
form_sections/strategies/layout/EE_Admin_One_Column_Layout.strategy.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
         return EEH_HTML::table(
15 15
             '',
16 16
             $this->_form_section->html_id(),
17
-            $this->_form_section->html_class() . ' form-table',
17
+            $this->_form_section->html_class().' form-table',
18 18
             $this->_form_section->html_style()
19
-        ) . EEH_HTML::tbody();
19
+        ).EEH_HTML::tbody();
20 20
     }
21 21
 
22 22
 
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      */
29 29
     public function layout_form_end($additional_args = array())
30 30
     {
31
-        return EEH_HTML::tbodyx() . EEH_HTML::tablex($this->_form_section->html_id());
31
+        return EEH_HTML::tbodyx().EEH_HTML::tablex($this->_form_section->html_id());
32 32
     }
33 33
 
34 34
 
@@ -45,15 +45,15 @@  discard block
 block discarded – undo
45 45
             || $input->get_display_strategy() instanceof EE_Text_Input_Display_Strategy
46 46
             || $input->get_display_strategy() instanceof EE_Admin_File_Uploader_Display_Strategy
47 47
         ) {
48
-            $input->set_html_class($input->html_class() . ' large-text');
48
+            $input->set_html_class($input->html_class().' large-text');
49 49
         }
50 50
         $input_html = $input->get_html_for_input();
51 51
         // maybe add errors and help text ?
52 52
         $input_html .= $input->get_html_for_errors() !== ''
53
-            ? EEH_HTML::nl() . $input->get_html_for_errors()
53
+            ? EEH_HTML::nl().$input->get_html_for_errors()
54 54
             : '';
55 55
         $input_html .= $input->get_html_for_help() !== ''
56
-            ? EEH_HTML::nl() . $input->get_html_for_help()
56
+            ? EEH_HTML::nl().$input->get_html_for_help()
57 57
             : '';
58 58
         // overriding parent to add wp admin specific things.
59 59
         $html = '';
Please login to merge, or discard this patch.
Indentation   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -3,90 +3,90 @@
 block discarded – undo
3 3
 class EE_Admin_One_Column_Layout extends EE_Form_Section_Layout_Base
4 4
 {
5 5
 
6
-    /**
7
-     * Starts the form section
8
-     *
9
-     * @param array $additional_args
10
-     * @return string
11
-     */
12
-    public function layout_form_begin($additional_args = array())
13
-    {
14
-        return EEH_HTML::table(
15
-            '',
16
-            $this->_form_section->html_id(),
17
-            $this->_form_section->html_class() . ' form-table',
18
-            $this->_form_section->html_style()
19
-        ) . EEH_HTML::tbody();
20
-    }
6
+	/**
7
+	 * Starts the form section
8
+	 *
9
+	 * @param array $additional_args
10
+	 * @return string
11
+	 */
12
+	public function layout_form_begin($additional_args = array())
13
+	{
14
+		return EEH_HTML::table(
15
+			'',
16
+			$this->_form_section->html_id(),
17
+			$this->_form_section->html_class() . ' form-table',
18
+			$this->_form_section->html_style()
19
+		) . EEH_HTML::tbody();
20
+	}
21 21
 
22 22
 
23
-    /**
24
-     * Ends the form section
25
-     *
26
-     * @param array $additional_args
27
-     * @return string
28
-     */
29
-    public function layout_form_end($additional_args = array())
30
-    {
31
-        return EEH_HTML::tbodyx() . EEH_HTML::tablex($this->_form_section->html_id());
32
-    }
23
+	/**
24
+	 * Ends the form section
25
+	 *
26
+	 * @param array $additional_args
27
+	 * @return string
28
+	 */
29
+	public function layout_form_end($additional_args = array())
30
+	{
31
+		return EEH_HTML::tbodyx() . EEH_HTML::tablex($this->_form_section->html_id());
32
+	}
33 33
 
34 34
 
35
-    /**
36
-     * Lays out the row for the input, including label and errors
37
-     *
38
-     * @param EE_Form_Input_Base $input
39
-     * @return string
40
-     * @throws EE_Error
41
-     */
42
-    public function layout_input($input)
43
-    {
44
-        if (
45
-            $input->get_display_strategy() instanceof EE_Text_Area_Display_Strategy
46
-            || $input->get_display_strategy() instanceof EE_Text_Input_Display_Strategy
47
-            || $input->get_display_strategy() instanceof EE_Admin_File_Uploader_Display_Strategy
48
-        ) {
49
-            $input->set_html_class($input->html_class() . ' large-text');
50
-        }
51
-        $input_html = $input->get_html_for_input();
52
-        // maybe add errors and help text ?
53
-        $input_html .= $input->get_html_for_errors() !== ''
54
-            ? EEH_HTML::nl() . $input->get_html_for_errors()
55
-            : '';
56
-        $input_html .= $input->get_html_for_help() !== ''
57
-            ? EEH_HTML::nl() . $input->get_html_for_help()
58
-            : '';
59
-        // overriding parent to add wp admin specific things.
60
-        $html = '';
61
-        if ($input instanceof EE_Hidden_Input) {
62
-            $html .= EEH_HTML::no_row($input->get_html_for_input());
63
-        } else {
64
-            $html .= EEH_HTML::tr(
65
-                EEH_HTML::td(
66
-                    $input->get_html_for_label()
67
-                    . EEH_HTML::nl()
68
-                    . $input_html
69
-                )
70
-            );
71
-        }
72
-        return $html;
73
-    }
35
+	/**
36
+	 * Lays out the row for the input, including label and errors
37
+	 *
38
+	 * @param EE_Form_Input_Base $input
39
+	 * @return string
40
+	 * @throws EE_Error
41
+	 */
42
+	public function layout_input($input)
43
+	{
44
+		if (
45
+			$input->get_display_strategy() instanceof EE_Text_Area_Display_Strategy
46
+			|| $input->get_display_strategy() instanceof EE_Text_Input_Display_Strategy
47
+			|| $input->get_display_strategy() instanceof EE_Admin_File_Uploader_Display_Strategy
48
+		) {
49
+			$input->set_html_class($input->html_class() . ' large-text');
50
+		}
51
+		$input_html = $input->get_html_for_input();
52
+		// maybe add errors and help text ?
53
+		$input_html .= $input->get_html_for_errors() !== ''
54
+			? EEH_HTML::nl() . $input->get_html_for_errors()
55
+			: '';
56
+		$input_html .= $input->get_html_for_help() !== ''
57
+			? EEH_HTML::nl() . $input->get_html_for_help()
58
+			: '';
59
+		// overriding parent to add wp admin specific things.
60
+		$html = '';
61
+		if ($input instanceof EE_Hidden_Input) {
62
+			$html .= EEH_HTML::no_row($input->get_html_for_input());
63
+		} else {
64
+			$html .= EEH_HTML::tr(
65
+				EEH_HTML::td(
66
+					$input->get_html_for_label()
67
+					. EEH_HTML::nl()
68
+					. $input_html
69
+				)
70
+			);
71
+		}
72
+		return $html;
73
+	}
74 74
 
75 75
 
76
-    /**
77
-     * Lays out a row for the subsection
78
-     *
79
-     * @param EE_Form_Section_Proper $form_section
80
-     * @return string
81
-     */
82
-    public function layout_subsection($form_section)
83
-    {
84
-        if (
85
-            $form_section instanceof EE_Form_Section_Proper
86
-            || $form_section instanceof EE_Form_Section_HTML
87
-        ) {
88
-            return EEH_HTML::no_row($form_section->get_html());
89
-        }
90
-        return '';
91
-    }
76
+	/**
77
+	 * Lays out a row for the subsection
78
+	 *
79
+	 * @param EE_Form_Section_Proper $form_section
80
+	 * @return string
81
+	 */
82
+	public function layout_subsection($form_section)
83
+	{
84
+		if (
85
+			$form_section instanceof EE_Form_Section_Proper
86
+			|| $form_section instanceof EE_Form_Section_HTML
87
+		) {
88
+			return EEH_HTML::no_row($form_section->get_html());
89
+		}
90
+		return '';
91
+	}
92 92
 }
Please login to merge, or discard this patch.
core/libraries/form_sections/strategies/layout/EE_No_Layout.strategy.php 2 patches
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -61,28 +61,28 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $html = '';
63 63
         if ($input instanceof EE_Hidden_Input) {
64
-            $html .= EEH_HTML::nl() . $input->get_html_for_input();
64
+            $html .= EEH_HTML::nl().$input->get_html_for_input();
65 65
         } elseif ($input instanceof EE_Submit_Input) {
66 66
             $html .= $this->br();
67 67
             $html .= $input->get_html_for_input();
68 68
         } elseif ($input instanceof EE_Select_Input) {
69 69
             $html .= $this->br();
70
-            $html .= EEH_HTML::nl(1) . $input->get_html_for_label();
71
-            $html .= EEH_HTML::nl() . $input->get_html_for_errors();
72
-            $html .= EEH_HTML::nl() . $input->get_html_for_input();
73
-            $html .= EEH_HTML::nl() . $input->get_html_for_help();
70
+            $html .= EEH_HTML::nl(1).$input->get_html_for_label();
71
+            $html .= EEH_HTML::nl().$input->get_html_for_errors();
72
+            $html .= EEH_HTML::nl().$input->get_html_for_input();
73
+            $html .= EEH_HTML::nl().$input->get_html_for_help();
74 74
             $html .= $this->br();
75 75
         } elseif ($input instanceof EE_Form_Input_With_Options_Base) {
76 76
             $html .= $this->br();
77
-            $html .= EEH_HTML::nl() . $input->get_html_for_errors();
78
-            $html .= EEH_HTML::nl() . $input->get_html_for_input();
79
-            $html .= EEH_HTML::nl() . $input->get_html_for_help();
77
+            $html .= EEH_HTML::nl().$input->get_html_for_errors();
78
+            $html .= EEH_HTML::nl().$input->get_html_for_input();
79
+            $html .= EEH_HTML::nl().$input->get_html_for_help();
80 80
         } else {
81 81
             $html .= $this->br();
82
-            $html .= EEH_HTML::nl(1) . $input->get_html_for_label();
83
-            $html .= EEH_HTML::nl() . $input->get_html_for_errors();
84
-            $html .= EEH_HTML::nl() . $input->get_html_for_input();
85
-            $html .= EEH_HTML::nl() . $input->get_html_for_help();
82
+            $html .= EEH_HTML::nl(1).$input->get_html_for_label();
83
+            $html .= EEH_HTML::nl().$input->get_html_for_errors();
84
+            $html .= EEH_HTML::nl().$input->get_html_for_input();
85
+            $html .= EEH_HTML::nl().$input->get_html_for_help();
86 86
         }
87 87
         $html .= EEH_HTML::nl(-1);
88 88
         return $html;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     public function layout_subsection($form_section)
100 100
     {
101 101
         //      d( $form_section );
102
-        return EEH_HTML::nl(1) . $form_section->get_html() . EEH_HTML::nl(-1);
102
+        return EEH_HTML::nl(1).$form_section->get_html().EEH_HTML::nl(-1);
103 103
     }
104 104
 
105 105
 
Please login to merge, or discard this patch.
Indentation   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -10,117 +10,117 @@
 block discarded – undo
10 10
  */
11 11
 class EE_No_Layout extends EE_Div_Per_Section_Layout
12 12
 {
13
-    /**
14
-     * This is a flag indicating whether to use '<br>' tags after each input in the layout
15
-     * strategy.
16
-     *
17
-     * @var bool
18
-     */
19
-    protected $_use_break_tags = true;
20
-
21
-
22
-
23
-    /**
24
-     * EE_No_Layout constructor.
25
-     *
26
-     * @param array $options  Currently if this has a 'use_break_tags' key that is used to set the _use_break_tags
27
-     *                        property on the class.
28
-     */
29
-    public function __construct($options = array())
30
-    {
31
-        $this->_use_break_tags = is_array($options) && isset($options['use_break_tags'])
32
-            ? filter_var($options['use_break_tags'], FILTER_VALIDATE_BOOLEAN)
33
-            : $this->_use_break_tags;
34
-        parent::__construct();
35
-    }
36
-
37
-
38
-
39
-    /**
40
-     * Add line break at beginning of form
41
-     *
42
-     * @return string
43
-     */
44
-    public function layout_form_begin()
45
-    {
46
-        return EEH_HTML::nl(1);
47
-    }
48
-
49
-
50
-
51
-    /**
52
-     * Lays out the row for the input, including label and errors
53
-     *
54
-     * @param EE_Form_Input_Base $input
55
-     * @return string
56
-     * @throws \EE_Error
57
-     */
58
-    public function layout_input($input)
59
-    {
60
-        $html = '';
61
-        if ($input instanceof EE_Hidden_Input) {
62
-            $html .= EEH_HTML::nl() . $input->get_html_for_input();
63
-        } elseif ($input instanceof EE_Submit_Input) {
64
-            $html .= $this->br();
65
-            $html .= $input->get_html_for_input();
66
-        } elseif ($input instanceof EE_Select_Input) {
67
-            $html .= $this->br();
68
-            $html .= EEH_HTML::nl(1) . $input->get_html_for_label();
69
-            $html .= EEH_HTML::nl() . $input->get_html_for_errors();
70
-            $html .= EEH_HTML::nl() . $input->get_html_for_input();
71
-            $html .= EEH_HTML::nl() . $input->get_html_for_help();
72
-            $html .= $this->br();
73
-        } elseif ($input instanceof EE_Form_Input_With_Options_Base) {
74
-            $html .= $this->br();
75
-            $html .= EEH_HTML::nl() . $input->get_html_for_errors();
76
-            $html .= EEH_HTML::nl() . $input->get_html_for_input();
77
-            $html .= EEH_HTML::nl() . $input->get_html_for_help();
78
-        } else {
79
-            $html .= $this->br();
80
-            $html .= EEH_HTML::nl(1) . $input->get_html_for_label();
81
-            $html .= EEH_HTML::nl() . $input->get_html_for_errors();
82
-            $html .= EEH_HTML::nl() . $input->get_html_for_input();
83
-            $html .= EEH_HTML::nl() . $input->get_html_for_help();
84
-        }
85
-        $html .= EEH_HTML::nl(-1);
86
-        return $html;
87
-    }
88
-
89
-
90
-
91
-    /**
92
-     * Lays out a row for the subsection
93
-     *
94
-     * @param EE_Form_Section_Proper $form_section
95
-     * @return string
96
-     */
97
-    public function layout_subsection($form_section)
98
-    {
99
-        //      d( $form_section );
100
-        return EEH_HTML::nl(1) . $form_section->get_html() . EEH_HTML::nl(-1);
101
-    }
102
-
103
-
104
-
105
-    /**
106
-     * Add line break at end of form.
107
-     *
108
-     * @return string
109
-     */
110
-    public function layout_form_end()
111
-    {
112
-        return EEH_HTML::nl(-1);
113
-    }
114
-
115
-
116
-
117
-    /**
118
-     * This returns a break tag or an empty string depending on the value of the `_use_break_tags` property.
119
-     *
120
-     * @return string
121
-     */
122
-    protected function br()
123
-    {
124
-        return $this->_use_break_tags ? EEH_HTML::br() : '';
125
-    }
13
+	/**
14
+	 * This is a flag indicating whether to use '<br>' tags after each input in the layout
15
+	 * strategy.
16
+	 *
17
+	 * @var bool
18
+	 */
19
+	protected $_use_break_tags = true;
20
+
21
+
22
+
23
+	/**
24
+	 * EE_No_Layout constructor.
25
+	 *
26
+	 * @param array $options  Currently if this has a 'use_break_tags' key that is used to set the _use_break_tags
27
+	 *                        property on the class.
28
+	 */
29
+	public function __construct($options = array())
30
+	{
31
+		$this->_use_break_tags = is_array($options) && isset($options['use_break_tags'])
32
+			? filter_var($options['use_break_tags'], FILTER_VALIDATE_BOOLEAN)
33
+			: $this->_use_break_tags;
34
+		parent::__construct();
35
+	}
36
+
37
+
38
+
39
+	/**
40
+	 * Add line break at beginning of form
41
+	 *
42
+	 * @return string
43
+	 */
44
+	public function layout_form_begin()
45
+	{
46
+		return EEH_HTML::nl(1);
47
+	}
48
+
49
+
50
+
51
+	/**
52
+	 * Lays out the row for the input, including label and errors
53
+	 *
54
+	 * @param EE_Form_Input_Base $input
55
+	 * @return string
56
+	 * @throws \EE_Error
57
+	 */
58
+	public function layout_input($input)
59
+	{
60
+		$html = '';
61
+		if ($input instanceof EE_Hidden_Input) {
62
+			$html .= EEH_HTML::nl() . $input->get_html_for_input();
63
+		} elseif ($input instanceof EE_Submit_Input) {
64
+			$html .= $this->br();
65
+			$html .= $input->get_html_for_input();
66
+		} elseif ($input instanceof EE_Select_Input) {
67
+			$html .= $this->br();
68
+			$html .= EEH_HTML::nl(1) . $input->get_html_for_label();
69
+			$html .= EEH_HTML::nl() . $input->get_html_for_errors();
70
+			$html .= EEH_HTML::nl() . $input->get_html_for_input();
71
+			$html .= EEH_HTML::nl() . $input->get_html_for_help();
72
+			$html .= $this->br();
73
+		} elseif ($input instanceof EE_Form_Input_With_Options_Base) {
74
+			$html .= $this->br();
75
+			$html .= EEH_HTML::nl() . $input->get_html_for_errors();
76
+			$html .= EEH_HTML::nl() . $input->get_html_for_input();
77
+			$html .= EEH_HTML::nl() . $input->get_html_for_help();
78
+		} else {
79
+			$html .= $this->br();
80
+			$html .= EEH_HTML::nl(1) . $input->get_html_for_label();
81
+			$html .= EEH_HTML::nl() . $input->get_html_for_errors();
82
+			$html .= EEH_HTML::nl() . $input->get_html_for_input();
83
+			$html .= EEH_HTML::nl() . $input->get_html_for_help();
84
+		}
85
+		$html .= EEH_HTML::nl(-1);
86
+		return $html;
87
+	}
88
+
89
+
90
+
91
+	/**
92
+	 * Lays out a row for the subsection
93
+	 *
94
+	 * @param EE_Form_Section_Proper $form_section
95
+	 * @return string
96
+	 */
97
+	public function layout_subsection($form_section)
98
+	{
99
+		//      d( $form_section );
100
+		return EEH_HTML::nl(1) . $form_section->get_html() . EEH_HTML::nl(-1);
101
+	}
102
+
103
+
104
+
105
+	/**
106
+	 * Add line break at end of form.
107
+	 *
108
+	 * @return string
109
+	 */
110
+	public function layout_form_end()
111
+	{
112
+		return EEH_HTML::nl(-1);
113
+	}
114
+
115
+
116
+
117
+	/**
118
+	 * This returns a break tag or an empty string depending on the value of the `_use_break_tags` property.
119
+	 *
120
+	 * @return string
121
+	 */
122
+	protected function br()
123
+	{
124
+		return $this->_use_break_tags ? EEH_HTML::br() : '';
125
+	}
126 126
 }
Please login to merge, or discard this patch.
strategies/validation/EE_Many_Valued_Validation_Strategy.strategy.php 2 patches
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -13,58 +13,58 @@
 block discarded – undo
13 13
  */
14 14
 class EE_Many_Valued_Validation_Strategy extends EE_Validation_Strategy_Base
15 15
 {
16
-    protected $_individual_item_validation_strategies = array();
17
-    /**
18
-     *
19
-     * @param EE_Validation_Strategy_Base[] $individual_item_validation_strategies (or a single EE_Validation_Strategy_Base)
20
-     */
21
-    public function __construct($individual_item_validation_strategies)
22
-    {
23
-        if (! is_array($individual_item_validation_strategies)) {
24
-            $individual_item_validation_strategies = array($individual_item_validation_strategies);
25
-        }
26
-        $this->_individual_item_validation_strategies = $individual_item_validation_strategies;
27
-        parent::__construct();
28
-    }
16
+	protected $_individual_item_validation_strategies = array();
17
+	/**
18
+	 *
19
+	 * @param EE_Validation_Strategy_Base[] $individual_item_validation_strategies (or a single EE_Validation_Strategy_Base)
20
+	 */
21
+	public function __construct($individual_item_validation_strategies)
22
+	{
23
+		if (! is_array($individual_item_validation_strategies)) {
24
+			$individual_item_validation_strategies = array($individual_item_validation_strategies);
25
+		}
26
+		$this->_individual_item_validation_strategies = $individual_item_validation_strategies;
27
+		parent::__construct();
28
+	}
29 29
 
30 30
 
31 31
 
32
-    /**
33
-     * Applies all teh individual item validation strategies on each item in the array
34
-     * @param array $normalized_value
35
-     * @return boolean
36
-     */
37
-    public function validate($normalized_value)
38
-    {
39
-        if (is_array($normalized_value)) {
40
-            $items_to_validate = $normalized_value;
41
-        } else {
42
-            $items_to_validate = array($normalized_value);
43
-        }
44
-        foreach ($items_to_validate as $individual_item) {
45
-            foreach ($this->_individual_item_validation_strategies as $validation_strategy) {
46
-                if ($validation_strategy instanceof EE_Validation_Strategy_Base) {
47
-                    $validation_strategy->validate($individual_item);
48
-                }
49
-            }
50
-        }
51
-        return true;
52
-    }
32
+	/**
33
+	 * Applies all teh individual item validation strategies on each item in the array
34
+	 * @param array $normalized_value
35
+	 * @return boolean
36
+	 */
37
+	public function validate($normalized_value)
38
+	{
39
+		if (is_array($normalized_value)) {
40
+			$items_to_validate = $normalized_value;
41
+		} else {
42
+			$items_to_validate = array($normalized_value);
43
+		}
44
+		foreach ($items_to_validate as $individual_item) {
45
+			foreach ($this->_individual_item_validation_strategies as $validation_strategy) {
46
+				if ($validation_strategy instanceof EE_Validation_Strategy_Base) {
47
+					$validation_strategy->validate($individual_item);
48
+				}
49
+			}
50
+		}
51
+		return true;
52
+	}
53 53
 
54 54
 
55 55
 
56
-    /**
57
-     * Extends parent's _construct_finalize so we ALSO set the input
58
-     * on each sub-validation-strategy
59
-     * @param \EE_Form_Input_Base $form_input
60
-     */
61
-    public function _construct_finalize(\EE_Form_Input_Base $form_input)
62
-    {
63
-        parent::_construct_finalize($form_input);
64
-        foreach ($this->_individual_item_validation_strategies as $item_validation_strategy) {
65
-            if ($item_validation_strategy instanceof EE_Validation_Strategy_Base) {
66
-                $item_validation_strategy->_construct_finalize($form_input);
67
-            }
68
-        }
69
-    }
56
+	/**
57
+	 * Extends parent's _construct_finalize so we ALSO set the input
58
+	 * on each sub-validation-strategy
59
+	 * @param \EE_Form_Input_Base $form_input
60
+	 */
61
+	public function _construct_finalize(\EE_Form_Input_Base $form_input)
62
+	{
63
+		parent::_construct_finalize($form_input);
64
+		foreach ($this->_individual_item_validation_strategies as $item_validation_strategy) {
65
+			if ($item_validation_strategy instanceof EE_Validation_Strategy_Base) {
66
+				$item_validation_strategy->_construct_finalize($form_input);
67
+			}
68
+		}
69
+	}
70 70
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      */
21 21
     public function __construct($individual_item_validation_strategies)
22 22
     {
23
-        if (! is_array($individual_item_validation_strategies)) {
23
+        if ( ! is_array($individual_item_validation_strategies)) {
24 24
             $individual_item_validation_strategies = array($individual_item_validation_strategies);
25 25
         }
26 26
         $this->_individual_item_validation_strategies = $individual_item_validation_strategies;
Please login to merge, or discard this patch.
sensitive_data_removal/EE_Sensitive_Data_Removal_Base.strategy.php 1 patch
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -11,16 +11,16 @@
 block discarded – undo
11 11
  */
12 12
 abstract class EE_Sensitive_Data_Removal_Base extends EE_Form_Input_Strategy_Base
13 13
 {
14
-    /**
15
-     * Removes all the sensitive data from this normalized value.
16
-     * For example, should could 'mask' a credit card from
17
-     * '1234 1234 1234 1234' TO '**** **** **** 1234'.
18
-     * Or turn a ccv number from
19
-     * '123' to '***',
20
-     * or turn a password from
21
-     * 'CantHac7Th15' to '*************',
22
-     * or just leave htevalue as-is
23
-     * @return mixed
24
-     */
25
-    abstract public function remove_sensitive_data($normalized_value);
14
+	/**
15
+	 * Removes all the sensitive data from this normalized value.
16
+	 * For example, should could 'mask' a credit card from
17
+	 * '1234 1234 1234 1234' TO '**** **** **** 1234'.
18
+	 * Or turn a ccv number from
19
+	 * '123' to '***',
20
+	 * or turn a password from
21
+	 * 'CantHac7Th15' to '*************',
22
+	 * or just leave htevalue as-is
23
+	 * @return mixed
24
+	 */
25
+	abstract public function remove_sensitive_data($normalized_value);
26 26
 }
Please login to merge, or discard this patch.
sensitive_data_removal/EE_All_Sensitive_Data_Removal.strategy.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -11,23 +11,23 @@
 block discarded – undo
11 11
  */
12 12
 class EE_All_Sensitive_Data_Removal extends EE_Sensitive_Data_Removal_Base
13 13
 {
14
-    public function remove_sensitive_data($normalized_value)
15
-    {
16
-        switch (gettype($normalized_value)) {
17
-            case "boolean":
18
-                return false;
19
-            case "integer":
20
-            case "double":
21
-                return 0;
22
-            case "string":
23
-                return '';
24
-            case "array":
25
-                return array();
26
-            case "object":
27
-            case "resource":
28
-            case "NULL":
29
-            default:
30
-                return null;
31
-        }
32
-    }
14
+	public function remove_sensitive_data($normalized_value)
15
+	{
16
+		switch (gettype($normalized_value)) {
17
+			case "boolean":
18
+				return false;
19
+			case "integer":
20
+			case "double":
21
+				return 0;
22
+			case "string":
23
+				return '';
24
+			case "array":
25
+				return array();
26
+			case "object":
27
+			case "resource":
28
+			case "NULL":
29
+			default:
30
+				return null;
31
+		}
32
+	}
33 33
 }
Please login to merge, or discard this patch.
strategies/sensitive_data_removal/EE_No_Sensitive_Data_Removal.strategy.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
  */
12 12
 class EE_No_Sensitive_Data_Removal extends EE_Sensitive_Data_Removal_Base
13 13
 {
14
-    public function remove_sensitive_data($normalized_value)
15
-    {
16
-        return $normalized_value;
17
-    }
14
+	public function remove_sensitive_data($normalized_value)
15
+	{
16
+		return $normalized_value;
17
+	}
18 18
 }
Please login to merge, or discard this patch.
libraries/form_sections/base/EE_Form_Section_HTML_From_Template.form.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -11,11 +11,11 @@
 block discarded – undo
11 11
  */
12 12
 class EE_Form_Section_HTML_From_Template extends EE_Form_Section_HTML
13 13
 {
14
-    public function __construct($template_file, $args = array(), $options_array = array())
15
-    {
16
-        $html = EEH_Template::locate_template($template_file, $args);
14
+	public function __construct($template_file, $args = array(), $options_array = array())
15
+	{
16
+		$html = EEH_Template::locate_template($template_file, $args);
17 17
 
18 18
 //      echo " filepath:$template_file html $html";
19
-        parent::__construct($html, $options_array);
20
-    }
19
+		parent::__construct($html, $options_array);
20
+	}
21 21
 }
Please login to merge, or discard this patch.