Completed
Branch BUG-10375-migrations-not-repor... (316a48)
by
unknown
157:38 queued 144:46
created
form_sections/strategies/display/EE_Text_Area_Display_Strategy.strategy.php 3 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 		//so in case teh IPN is arriving later, let's try to process an IPN!
91 91
 		if($_SERVER['REQUEST_METHOD'] == 'POST'){
92 92
 			return $this->handle_ipn($_POST, $transaction );
93
-		}else{
93
+		} else{
94 94
 			return parent::finalize_payment_for( $transaction );
95 95
 		}
96 96
 	}
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,9 +4,9 @@
 block discarded – undo
4 4
 
5 5
 
6 6
 	/**
7
-	*
8
-	* @return string of html to display the field
9
-	*/
7
+	 *
8
+	 * @return string of html to display the field
9
+	 */
10 10
 	function display(){
11 11
 		$input = $this->_input;
12 12
 		$raw_value = maybe_serialize($input->raw_value());
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-class EE_Text_Area_Display_Strategy extends EE_Display_Strategy_Base{
2
+class EE_Text_Area_Display_Strategy extends EE_Display_Strategy_Base {
3 3
 
4 4
 
5 5
 
@@ -7,32 +7,32 @@  discard block
 block discarded – undo
7 7
 	*
8 8
 	* @return string of html to display the field
9 9
 	*/
10
-	function display(){
10
+	function display() {
11 11
 		$input = $this->_input;
12 12
 		$raw_value = maybe_serialize($input->raw_value());
13
-		if( $input instanceof EE_Text_Area_Input ) {
13
+		if ($input instanceof EE_Text_Area_Input) {
14 14
 			$rows = $input->get_rows();
15 15
 			$cols = $input->get_cols();
16
-		}else{
16
+		} else {
17 17
 			$rows = 4;
18 18
 			$cols = 20;
19 19
 		}
20 20
 		$html = '<textarea';
21
-		$html .= ' id="' . $input->html_id() . '"';
22
-		$html .= ' name="' . $input->html_name() . '"';
23
-		$html .= ' class="' . $input->html_class() . '"' ;
24
-		$html .= ' style="' . $input->html_style() . '"';
21
+		$html .= ' id="'.$input->html_id().'"';
22
+		$html .= ' name="'.$input->html_name().'"';
23
+		$html .= ' class="'.$input->html_class().'"';
24
+		$html .= ' style="'.$input->html_style().'"';
25 25
 		$html .= $input->other_html_attributes();
26
-		$html .= ' rows= "' . $rows . '" cols="' . $cols . '">';
26
+		$html .= ' rows= "'.$rows.'" cols="'.$cols.'">';
27 27
 		$html .= $raw_value;
28 28
 		$html .= '</textarea>';
29
-		foreach ( $this->_input->get_validation_strategies() as $validation_strategy ) {
29
+		foreach ($this->_input->get_validation_strategies() as $validation_strategy) {
30 30
 			if (
31 31
 				$validation_strategy instanceof EE_Simple_HTML_Validation_Strategy
32 32
 				|| $validation_strategy instanceof EE_Full_HTML_Validation_Strategy
33 33
 			) {
34 34
 				$html .= sprintf(
35
-					__( '%1$s(allowed tags: %2$s)%3$s', 'event_espresso' ),
35
+					__('%1$s(allowed tags: %2$s)%3$s', 'event_espresso'),
36 36
 					'<p class="ee-question-desc">',
37 37
 					$validation_strategy->get_list_of_allowed_tags(),
38 38
 					'</p>'
Please login to merge, or discard this patch.
form_sections/strategies/layout/EE_Form_Section_Layout_Base.strategy.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 		//so in case teh IPN is arriving later, let's try to process an IPN!
91 91
 		if($_SERVER['REQUEST_METHOD'] == 'POST'){
92 92
 			return $this->handle_ipn($_POST, $transaction );
93
-		}else{
93
+		} else{
94 94
 			return parent::finalize_payment_for( $transaction );
95 95
 		}
96 96
 	}
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  * stating where the proper subsections should be placed (but usually leaving them to layout
9 9
  * their own headers and footers etc).
10 10
  */
11
-abstract class EE_Form_Section_Layout_Base{
11
+abstract class EE_Form_Section_Layout_Base {
12 12
 
13 13
 	/**
14 14
 	 * Form form section to lay out
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	/**
22 22
 	 * 	__construct
23 23
 	 */
24
-	function __construct(){
24
+	function __construct() {
25 25
 	}
26 26
 
27 27
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	 * The form section on which this strategy is to perform
31 31
 	 * @param EE_Form_Section_Proper $form
32 32
 	 */
33
-	function _construct_finalize(EE_Form_Section_Proper $form){
33
+	function _construct_finalize(EE_Form_Section_Proper $form) {
34 34
 		$this->_form_section = $form;
35 35
 	}
36 36
 
@@ -53,28 +53,28 @@  discard block
 block discarded – undo
53 53
 	 * Returns the HTML
54 54
 	 * @return string HTML for displaying
55 55
 	 */
56
-	function layout_form(){
56
+	function layout_form() {
57 57
 		$html = '';
58 58
 		// layout_form_begin
59 59
 		$html .= apply_filters(
60
-			'FHEE__EE_Form_Section_Layout_Base__layout_form__start__for_' . $this->_form_section->name(),
60
+			'FHEE__EE_Form_Section_Layout_Base__layout_form__start__for_'.$this->_form_section->name(),
61 61
 			$this->layout_form_begin(),
62 62
 			$this->_form_section
63 63
 		);
64 64
 		// layout_form_loop
65 65
 		$html .= apply_filters(
66
-			'FHEE__EE_Form_Section_Layout_Base__layout_form__loop__for_' . $this->_form_section->name(),
66
+			'FHEE__EE_Form_Section_Layout_Base__layout_form__loop__for_'.$this->_form_section->name(),
67 67
 			$this->layout_form_loop(),
68 68
 			$this->_form_section
69 69
 		);
70 70
 		// layout_form_end
71 71
 		$html .= apply_filters(
72
-			'FHEE__EE_Form_Section_Layout_Base__layout_form__end__for_' . $this->_form_section->name(),
72
+			'FHEE__EE_Form_Section_Layout_Base__layout_form__end__for_'.$this->_form_section->name(),
73 73
 			$this->layout_form_end(),
74 74
 			$this->_form_section
75 75
 		);
76 76
 
77
-		$html = $this->add_form_section_hooks_and_filters( $html );
77
+		$html = $this->add_form_section_hooks_and_filters($html);
78 78
 		return $html;
79 79
 	}
80 80
 
@@ -83,20 +83,20 @@  discard block
 block discarded – undo
83 83
 	/**
84 84
 	 * @return string
85 85
 	 */
86
-	function layout_form_loop(){
86
+	function layout_form_loop() {
87 87
 		$html = '';
88
-		foreach( $this->_form_section->subsections() as $name => $subsection ){
89
-			if ( $subsection instanceof EE_Form_Input_Base ){
88
+		foreach ($this->_form_section->subsections() as $name => $subsection) {
89
+			if ($subsection instanceof EE_Form_Input_Base) {
90 90
 				$html .= apply_filters(
91
-					'FHEE__EE_Form_Section_Layout_Base__layout_form__loop_for_input_' . $name . '__in_' . $this->_form_section->name(),
92
-					$this->layout_input( $subsection ),
91
+					'FHEE__EE_Form_Section_Layout_Base__layout_form__loop_for_input_'.$name.'__in_'.$this->_form_section->name(),
92
+					$this->layout_input($subsection),
93 93
 					$this->_form_section,
94 94
 					$subsection
95 95
 				);
96
-			} elseif ( $subsection instanceof EE_Form_Section_Base ){
96
+			} elseif ($subsection instanceof EE_Form_Section_Base) {
97 97
 				$html .= apply_filters(
98
-					'FHEE__EE_Form_Section_Layout_Base__layout_form__loop_for_non_input_' . $name . '__in_' . $this->_form_section->name(),
99
-					$this->layout_subsection( $subsection ),
98
+					'FHEE__EE_Form_Section_Layout_Base__layout_form__loop_for_non_input_'.$name.'__in_'.$this->_form_section->name(),
99
+					$this->layout_subsection($subsection),
100 100
 					$this->_form_section,
101 101
 					$subsection
102 102
 				);
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 	 * @param EE_Form_Section_Base $subsection
145 145
 	 * @return string html
146 146
 	 */
147
-	abstract function layout_subsection( $subsection );
147
+	abstract function layout_subsection($subsection);
148 148
 
149 149
 
150 150
 
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
 	 * @param EE_Form_Input_Base $input
154 154
 	 * @return string
155 155
 	 */
156
-	public function display_label($input){
157
-		$class = $input->required() ? 'ee-required-label ' . $input->html_label_class() : $input->html_label_class();
158
-		$label_text = $input->required() ? $input->html_label_text() . '<span class="ee-asterisk">*</span>' : $input->html_label_text();
159
-		return '<label id="' . $input->html_label_id() . '" class="' . $class . '" style="' . $input->html_label_style() . '" for="' . $input->html_name() . '">' .  $label_text . '</label>';
156
+	public function display_label($input) {
157
+		$class = $input->required() ? 'ee-required-label '.$input->html_label_class() : $input->html_label_class();
158
+		$label_text = $input->required() ? $input->html_label_text().'<span class="ee-asterisk">*</span>' : $input->html_label_text();
159
+		return '<label id="'.$input->html_label_id().'" class="'.$class.'" style="'.$input->html_label_style().'" for="'.$input->html_name().'">'.$label_text.'</label>';
160 160
 	}
161 161
 
162 162
 
@@ -169,10 +169,10 @@  discard block
 block discarded – undo
169 169
 	 * @param EE_Form_Input_Base $input
170 170
 	 * @return string
171 171
 	 */
172
-	public function display_errors($input){
173
-		if( $input->get_validation_errors() ){
174
-			return  "<label  id='" . $input->html_id() . "-error' class='error' for='{$input->html_name()}'>" . $input->get_validation_error_string() . "</label>";
175
-		}else{
172
+	public function display_errors($input) {
173
+		if ($input->get_validation_errors()) {
174
+			return  "<label  id='".$input->html_id()."-error' class='error' for='{$input->html_name()}'>".$input->get_validation_error_string()."</label>";
175
+		} else {
176 176
 			return '';
177 177
 		}
178 178
 	}
@@ -182,10 +182,10 @@  discard block
 block discarded – undo
182 182
 	 * @param EE_Form_Input_Base $input
183 183
 	 * @return string
184 184
 	 */
185
-	public function display_help_text( $input ){
186
-		if ( $input->html_help_text() != '' ) {
185
+	public function display_help_text($input) {
186
+		if ($input->html_help_text() != '') {
187 187
 			$tag = is_admin() ? 'p' : 'span';
188
-			return '<' . $tag . ' id="' . $input->html_id() . '-help" class="' . $input->html_help_class() . '" style="' . $input->html_help_style() . '">' . $input->html_help_text() . '</' . $tag . '>';
188
+			return '<'.$tag.' id="'.$input->html_id().'-help" class="'.$input->html_help_class().'" style="'.$input->html_help_style().'">'.$input->html_help_text().'</'.$tag.'>';
189 189
 		}
190 190
 		return '';
191 191
 	}
@@ -197,13 +197,13 @@  discard block
 block discarded – undo
197 197
 	 * @param string $html
198 198
 	 * @return string
199 199
 	 */
200
-	public function add_form_section_hooks_and_filters( $html ){
200
+	public function add_form_section_hooks_and_filters($html) {
201 201
 		// replace dashes and spaces with underscores
202
-		$hook_name = str_replace( array( '-', ' ' ), '_', $this->_form_section->html_id() );
203
-		do_action( 'AHEE__Form_Section_Layout__' . $hook_name, $this->_form_section );
204
-		$html = apply_filters( 'AFEE__Form_Section_Layout__' . $hook_name . '__html', $html, $this->_form_section );
205
-		$html .= EEH_HTML::nl() . '<!-- AHEE__Form_Section_Layout__' . $hook_name . '__html -->';
206
-		$html .= EEH_HTML::nl() . '<!-- AFEE__Form_Section_Layout__' . $hook_name . ' -->';
202
+		$hook_name = str_replace(array('-', ' '), '_', $this->_form_section->html_id());
203
+		do_action('AHEE__Form_Section_Layout__'.$hook_name, $this->_form_section);
204
+		$html = apply_filters('AFEE__Form_Section_Layout__'.$hook_name.'__html', $html, $this->_form_section);
205
+		$html .= EEH_HTML::nl().'<!-- AHEE__Form_Section_Layout__'.$hook_name.'__html -->';
206
+		$html .= EEH_HTML::nl().'<!-- AFEE__Form_Section_Layout__'.$hook_name.' -->';
207 207
 		return $html;
208 208
 	}
209 209
 
Please login to merge, or discard this patch.
libraries/form_sections/strategies/layout/EE_Template_Layout.strategy.php 2 patches
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 				$validation_error_message = $default_validation_strategy->get_validation_error_message();
43 43
 			}
44 44
 			throw new EE_Validation_Error( $validation_error_message, 'float_only' );
45
-		}else{
45
+		} else{
46 46
 			return floatval($normalized_value);
47 47
 		}
48 48
 	}
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	public function unnormalize($normalized_value) {
56 56
 		if( empty( $normalized_value ) ){
57 57
 			return '0.00';
58
-		}else{
58
+		} else{
59 59
 			return "$normalized_value";
60 60
 		}
61 61
 	}
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  *
22 22
  * ------------------------------------------------------------------------
23 23
  */
24
-class EE_Template_Layout extends EE_Div_Per_Section_Layout{
24
+class EE_Template_Layout extends EE_Div_Per_Section_Layout {
25 25
 
26 26
 	protected $_layout_template_file = NULL;
27 27
 	protected $_layout_begin_template_file = NULL;
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
 	 * 		@type array 	$_template_args
43 43
 	 * 	}
44 44
 	 */
45
-	public function __construct( $template_options = array() ) {
45
+	public function __construct($template_options = array()) {
46 46
 		// loop thru incoming options
47
-		foreach( $template_options as $key => $value ) {
47
+		foreach ($template_options as $key => $value) {
48 48
 			// add underscore to $key to match property names
49
-			$_key = '_' . $key;
50
-			if ( property_exists( $this, $_key )) {
49
+			$_key = '_'.$key;
50
+			if (property_exists($this, $_key)) {
51 51
 					$this->{$_key} = $value;
52 52
 			}
53 53
 		}
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 	 * @return string
66 66
 	 */
67 67
 	public function layout_form() {
68
-		if ( $this->_layout_template_file ) {
69
-			return EEH_Template::locate_template( $this->_layout_template_file, $this->template_args(), TRUE, TRUE );
68
+		if ($this->_layout_template_file) {
69
+			return EEH_Template::locate_template($this->_layout_template_file, $this->template_args(), TRUE, TRUE);
70 70
 		} else {
71 71
 			return parent::layout_form();
72 72
 		}
@@ -79,9 +79,9 @@  discard block
 block discarded – undo
79 79
 	 * @return string
80 80
 	 */
81 81
 	public function layout_form_begin() {
82
-		if($this->_layout_begin_template_file){
83
-			return EEH_Template::locate_template( $this->_layout_begin_template_file, $this->template_args(), TRUE, TRUE );
84
-		}else{
82
+		if ($this->_layout_begin_template_file) {
83
+			return EEH_Template::locate_template($this->_layout_begin_template_file, $this->template_args(), TRUE, TRUE);
84
+		} else {
85 85
 			return parent::layout_form_begin();
86 86
 		}
87 87
 	}
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
 	 * @param EE_Form_Input_Base $input
95 95
 	 * @return string
96 96
 	 */
97
-	public function layout_input( $input ) {
98
-		if($this->_input_template_file){
99
-			return EEH_Template::locate_template( $this->_input_template_file, array( 'input' => $input ), TRUE, TRUE );
97
+	public function layout_input($input) {
98
+		if ($this->_input_template_file) {
99
+			return EEH_Template::locate_template($this->_input_template_file, array('input' => $input), TRUE, TRUE);
100 100
 		}
101 101
 		return parent::layout_input($input);
102 102
 	}
@@ -109,11 +109,11 @@  discard block
 block discarded – undo
109 109
 	 * @param EE_Form_Section_Proper $form_section
110 110
 	 * @return string
111 111
 	 */
112
-	public function layout_subsection( $form_section ) {
113
-		if($this->_subsection_template_file){
114
-			return EEH_Template::locate_template( $this->_subsection_template_file, $this->template_args(), TRUE, TRUE );
112
+	public function layout_subsection($form_section) {
113
+		if ($this->_subsection_template_file) {
114
+			return EEH_Template::locate_template($this->_subsection_template_file, $this->template_args(), TRUE, TRUE);
115 115
 		}
116
-		return parent::layout_subsection( $form_section );
116
+		return parent::layout_subsection($form_section);
117 117
 	}
118 118
 
119 119
 
@@ -123,9 +123,9 @@  discard block
 block discarded – undo
123 123
 	 * @return string
124 124
 	 */
125 125
 	public function layout_form_end() {
126
-		if($this->_layout_end_template_file){
127
-			return EEH_Template::locate_template( $this->_layout_end_template_file, $this->template_args(), TRUE, TRUE);
128
-		}else{
126
+		if ($this->_layout_end_template_file) {
127
+			return EEH_Template::locate_template($this->_layout_end_template_file, $this->template_args(), TRUE, TRUE);
128
+		} else {
129 129
 			return parent::layout_form_end();
130 130
 		}
131 131
 	}
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	/**
136 136
 	 * @param array $template_args
137 137
 	 */
138
-	public function set_template_args( $template_args = array() ) {
138
+	public function set_template_args($template_args = array()) {
139 139
 		$this->_template_args = $template_args;
140 140
 	}
141 141
 
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
 	/**
145 145
 	 * @param array $template_args
146 146
 	 */
147
-	public function add_template_args( $template_args = array() ) {
148
-		$this->_template_args = array_merge_recursive( $this->_template_args, $template_args );
147
+	public function add_template_args($template_args = array()) {
148
+		$this->_template_args = array_merge_recursive($this->_template_args, $template_args);
149 149
 	}
150 150
 
151 151
 
@@ -154,13 +154,13 @@  discard block
 block discarded – undo
154 154
 	 * @return array
155 155
 	 */
156 156
 	public function template_args() {
157
-		foreach ( $this->form_section()->subsections() as $subsection_name => $subsection ) {
158
-			$subsection_name = self::prep_form_subsection_key_name( $subsection_name );
159
-			if ( strpos( $subsection_name, '[' ) !== FALSE ) {
160
-				$sub_name = explode( '[', $subsection_name );
161
-				$this->_template_args[ $sub_name[0] ][ rtrim( $sub_name[1], ']' ) ] = $this->layout_subsection( $subsection );
157
+		foreach ($this->form_section()->subsections() as $subsection_name => $subsection) {
158
+			$subsection_name = self::prep_form_subsection_key_name($subsection_name);
159
+			if (strpos($subsection_name, '[') !== FALSE) {
160
+				$sub_name = explode('[', $subsection_name);
161
+				$this->_template_args[$sub_name[0]][rtrim($sub_name[1], ']')] = $this->layout_subsection($subsection);
162 162
 			} else {
163
-				$this->_template_args[ $subsection_name ] = $this->layout_subsection( $subsection );
163
+				$this->_template_args[$subsection_name] = $this->layout_subsection($subsection);
164 164
 			}
165 165
 		}
166 166
 //		d( $this->_template_args );
@@ -176,9 +176,9 @@  discard block
 block discarded – undo
176 176
 	 * @param string $subsection_name
177 177
 	 * @return string
178 178
 	 */
179
-	public static function prep_form_subsection_key_name( $subsection_name = '' ) {
180
-		$subsection_name = str_replace( array( '-', ' ' ), array( '', '_' ), $subsection_name );
181
-		return is_numeric( substr( $subsection_name, 0, 1 )) ? 'form_' . $subsection_name : $subsection_name;
179
+	public static function prep_form_subsection_key_name($subsection_name = '') {
180
+		$subsection_name = str_replace(array('-', ' '), array('', '_'), $subsection_name);
181
+		return is_numeric(substr($subsection_name, 0, 1)) ? 'form_'.$subsection_name : $subsection_name;
182 182
 	}
183 183
 
184 184
 
@@ -190,8 +190,8 @@  discard block
 block discarded – undo
190 190
 	 * @param string $subsection_name
191 191
 	 * @return string
192 192
 	 */
193
-	public static function get_subform_name( $subsection_name = '' ) {
194
-		return EE_Template_Layout::prep_form_subsection_key_name( $subsection_name );
193
+	public static function get_subform_name($subsection_name = '') {
194
+		return EE_Template_Layout::prep_form_subsection_key_name($subsection_name);
195 195
 	}
196 196
 
197 197
 
Please login to merge, or discard this patch.
strategies/validation/EE_Required_Validation_Strategy.strategy.php 2 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 		//so in case teh IPN is arriving later, let's try to process an IPN!
91 91
 		if($_SERVER['REQUEST_METHOD'] == 'POST'){
92 92
 			return $this->handle_ipn($_POST, $transaction );
93
-		}else{
93
+		} else{
94 94
 			return parent::finalize_payment_for( $transaction );
95 95
 		}
96 96
 	}
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -8,18 +8,18 @@  discard block
 block discarded – undo
8 8
  * @since 				4.6
9 9
  *
10 10
  */
11
-class EE_Required_Validation_Strategy extends EE_Validation_Strategy_Base{
11
+class EE_Required_Validation_Strategy extends EE_Validation_Strategy_Base {
12 12
 
13 13
 
14 14
 
15 15
 	/**
16 16
 	 * @param string $validation_error_message
17 17
 	 */
18
-	public function __construct( $validation_error_message = null ) {
19
-		if( ! $validation_error_message ){
18
+	public function __construct($validation_error_message = null) {
19
+		if ( ! $validation_error_message) {
20 20
 			$validation_error_message = __("This field is required.", "event_espresso");
21 21
 		}
22
-		parent::__construct( $validation_error_message );
22
+		parent::__construct($validation_error_message);
23 23
 	}
24 24
 
25 25
 
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 	 * @throws \EE_Validation_Error
35 35
 	 */
36 36
 	public function validate($normalized_value) {
37
-		if(
37
+		if (
38 38
 			$normalized_value === ''
39 39
 			|| $normalized_value === null
40 40
 			|| $normalized_value === array()
41 41
 		) {
42
-			throw new EE_Validation_Error( $this->get_validation_error_message(), 'required');
43
-		}else{
42
+			throw new EE_Validation_Error($this->get_validation_error_message(), 'required');
43
+		} else {
44 44
 			return true;
45 45
 		}
46 46
 	}
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 	 * @return array
52 52
 	 * @throws \EE_Error
53 53
 	 */
54
-	public function get_jquery_validation_rule_array(){
54
+	public function get_jquery_validation_rule_array() {
55 55
 		return array(
56 56
 			'required'=> true,
57 57
 			'messages' => array(
Please login to merge, or discard this patch.
core/libraries/messages/EE_Payment_Base_message_type.lib.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@
 block discarded – undo
5 5
  * @subpackage plugin api, messages
6 6
  * @since           4.5.0
7 7
  */
8
-if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
8
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
9
+	exit('No direct script access allowed');
10
+}
9 11
 
10 12
 /**
11 13
  * Use this to register or deregister a new message template pack variation for the EE messages system.
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -51,26 +51,26 @@
 block discarded – undo
51 51
 
52 52
 
53 53
 
54
-	protected function _get_data_for_context( $context, EE_Registration $registration, $id ) {
54
+	protected function _get_data_for_context($context, EE_Registration $registration, $id) {
55 55
 
56 56
 		//use the registration to get the transaction.
57 57
 		$transaction = $registration->transaction();
58 58
 
59 59
 		//bail early if no transaction
60
-		if ( ! $transaction instanceof EE_Transaction ) {
61
-			throw new EE_Error( __('The given registration does not have an associated transaction. Something is wrong.', 'event_espresso' ) );
60
+		if ( ! $transaction instanceof EE_Transaction) {
61
+			throw new EE_Error(__('The given registration does not have an associated transaction. Something is wrong.', 'event_espresso'));
62 62
 		}
63 63
 
64
-		$payment = ! empty( $id ) ? EEM_Payment::instance()->get_one( array( array( 'PAY_ID' => $id, 'TXN_ID' => $transaction->ID() ) ) ) : 0;
64
+		$payment = ! empty($id) ? EEM_Payment::instance()->get_one(array(array('PAY_ID' => $id, 'TXN_ID' => $transaction->ID()))) : 0;
65 65
 
66
-		return array( $transaction, $payment );
66
+		return array($transaction, $payment);
67 67
 	}
68 68
 
69 69
 
70 70
 
71
-	protected function _get_admin_content_events_edit_for_messenger( EE_messenger $messenger ) {
71
+	protected function _get_admin_content_events_edit_for_messenger(EE_messenger $messenger) {
72 72
 		//this is just a test
73
-		return $this->name . ' Message Type for ' . $messenger->name . ' Messenger ';
73
+		return $this->name.' Message Type for '.$messenger->name.' Messenger ';
74 74
 	}
75 75
 
76 76
 	/**
Please login to merge, or discard this patch.
core/libraries/messages/data_class/EE_Messages_REG_incoming_data.class.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('NO direct script access allowed');
5 5
 
6 6
 /**
@@ -29,20 +29,20 @@  discard block
 block discarded – undo
29 29
 	 * @param EE_Registration|array $data
30 30
 	 * @throws \EE_Error
31 31
 	 */
32
-	public function __construct( $data ) {
32
+	public function __construct($data) {
33 33
 		$filtered_reg_status = null;
34 34
 
35
-		if ( ! is_array( $data ) && $data instanceof EE_Registration ) {
35
+		if ( ! is_array($data) && $data instanceof EE_Registration) {
36 36
 			$this->reg_obj = $data;
37 37
 		} else {
38
-			$this->reg_obj = is_array( $data ) && isset( $data[0] ) && $data[0] instanceof EE_Registration ? $data[0] : null;
39
-			$filtered_reg_status = is_array( $data ) && ! empty( $data[1] ) ? $data[1] : null;
38
+			$this->reg_obj = is_array($data) && isset($data[0]) && $data[0] instanceof EE_Registration ? $data[0] : null;
39
+			$filtered_reg_status = is_array($data) && ! empty($data[1]) ? $data[1] : null;
40 40
 		}
41 41
 
42
-		if ( ! $this->reg_obj instanceof EE_Registration ) {
42
+		if ( ! $this->reg_obj instanceof EE_Registration) {
43 43
 			throw new EE_Error(
44 44
 				sprintf(
45
-					__( '%1$s requires the incoming data argument to be an instance of %2$s or an array where the first value is an instance of %2$s', 'event_espresso'),
45
+					__('%1$s requires the incoming data argument to be an instance of %2$s or an array where the first value is an instance of %2$s', 'event_espresso'),
46 46
 					'EE_Messages_REG_incoming_data',
47 47
 					'EE_Registration'
48 48
 				)
@@ -64,18 +64,18 @@  discard block
 block discarded – undo
64 64
 	 *
65 65
 	 * @return array   The prepped data for db
66 66
 	 */
67
-	static public function convert_data_for_persistent_storage( $data ) {
67
+	static public function convert_data_for_persistent_storage($data) {
68 68
 		$prepped_data = array();
69
-		if ( ! is_array( $data ) && $data instanceof EE_Registration ) {
69
+		if ( ! is_array($data) && $data instanceof EE_Registration) {
70 70
 			$prepped_data['Registration'] = $data->ID();
71 71
 			return $prepped_data;
72
-		} elseif ( ! is_array( $data ) ) {
72
+		} elseif ( ! is_array($data)) {
73 73
 			return array();
74 74
 		} else {
75
-			if ( $data[0] instanceof EE_Registration ) {
75
+			if ($data[0] instanceof EE_Registration) {
76 76
 				$prepped_data['Registration'] = $data[0];
77 77
 			}
78
-			if ( ! empty( $data[1] ) ) {
78
+			if ( ! empty($data[1])) {
79 79
 				$prepped_data['filter'] = $data[1];
80 80
 			}
81 81
 		}
@@ -91,17 +91,17 @@  discard block
 block discarded – undo
91 91
 	 *
92 92
 	 * @return mixed
93 93
 	 */
94
-	static public function convert_data_from_persistent_storage( $data ) {
94
+	static public function convert_data_from_persistent_storage($data) {
95 95
 		$registration = null;
96 96
 		//$data['Registration'] could be either an ID (back compat) or a registration object (prepped using old system).
97
-		if ( isset( $data[ 'Registration' ] ) ) {
98
-			$registration = $data[ 'Registration' ] instanceof EE_Registration
99
-				? $data[ 'Registration' ]
100
-				: EEM_Registration::instance()->get_one_by_ID( $data[ 'Registration' ] );
97
+		if (isset($data['Registration'])) {
98
+			$registration = $data['Registration'] instanceof EE_Registration
99
+				? $data['Registration']
100
+				: EEM_Registration::instance()->get_one_by_ID($data['Registration']);
101 101
 		}
102 102
 		$prepped_data = array(
103 103
 			0 => $registration,
104
-			1 => isset( $data['filter'] ) ? $data['filter'] : null
104
+			1 => isset($data['filter']) ? $data['filter'] : null
105 105
 		);
106 106
 		return $prepped_data;
107 107
 	}
@@ -119,18 +119,18 @@  discard block
 block discarded – undo
119 119
 		$this->txn = $this->reg_obj->transaction();
120 120
 		//possible session stuff?
121 121
 		$session = $this->txn->session_data();
122
-		$session_data =  $session instanceof EE_Session ? $session->get_session_data() : array();
122
+		$session_data = $session instanceof EE_Session ? $session->get_session_data() : array();
123 123
 
124 124
 		//other data from the session (if possible)
125
-		$this->user_id = isset( $session_data['user_id'] ) ? $session_data['user_id'] : '';
126
-		$this->ip_address = isset( $session_data['ip_address'] ) ? $session_data['ip_address'] : '';
127
-		$this->user_agent = isset( $session_data['user_agent'] ) ? $session_data['user_agent'] : '';
125
+		$this->user_id = isset($session_data['user_id']) ? $session_data['user_id'] : '';
126
+		$this->ip_address = isset($session_data['ip_address']) ? $session_data['ip_address'] : '';
127
+		$this->user_agent = isset($session_data['user_agent']) ? $session_data['user_agent'] : '';
128 128
 		$this->init_access = $this->last_access = '';
129 129
 
130 130
 		$this->payment = $this->txn->get_first_related('Payment');
131 131
 		// if there is no payments associated with the transaction
132 132
 		// then we just create a default payment object for potential parsing.
133
-		$this->payment = empty( $this->payment )
133
+		$this->payment = empty($this->payment)
134 134
 			? EE_Payment::new_instance(
135 135
 				array(
136 136
 					'STS_ID'               => EEM_Payment::status_id_pending,
Please login to merge, or discard this patch.
default/email_not_approved_registration_attendee_list_admin.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <h4><a href="[EDIT_ATTENDEE_LINK]">[FNAME] [LNAME]</a></h4>
2 2
 <ul>
3 3
 	<li>
4
-		<strong><?php _e( 'Registration Code:', 'event_espresso' ); ?></strong>
4
+		<strong><?php _e('Registration Code:', 'event_espresso'); ?></strong>
5 5
 		<a href="[EDIT_ATTENDEE_LINK]">[REGISTRATION_CODE]</a>
6 6
 	</li>
7 7
 	<li>
8
-		<strong><?php _e( 'Tickets:', 'event_espresso' ); ?></strong>
8
+		<strong><?php _e('Tickets:', 'event_espresso'); ?></strong>
9 9
 		<ul>[TICKET_LIST]</ul>
10 10
 	</li>
11 11
 </ul>
Please login to merge, or discard this patch.
messages/defaults/default/email_pending_approval_event_list.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 		<tbody>
4 4
 			<tr>
5 5
 				<td>
6
-					<p class="callout"><strong><?php _e( 'Event:', 'event_espresso' ); ?> [EVENT_LINK]</strong></p>
6
+					<p class="callout"><strong><?php _e('Event:', 'event_espresso'); ?> [EVENT_LINK]</strong></p>
7 7
 				</td>
8 8
 			</tr>
9 9
 		</tbody>
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 			<tbody>
17 17
 				<tr>
18 18
 					<td>
19
-						<h3><?php _e( 'Registrant(s):', 'event_espresso' ); ?></h3>
19
+						<h3><?php _e('Registrant(s):', 'event_espresso'); ?></h3>
20 20
 						[ATTENDEE_LIST]
21 21
 					</td>
22 22
 				</tr>
Please login to merge, or discard this patch.
core/libraries/messages/message_type/EE_Invoice_message_type.class.php 3 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 
34 34
 	protected function _set_admin_pages() {
35
-		$this->admin_registered_pages = array( 'events_edit' => TRUE );
35
+		$this->admin_registered_pages = array('events_edit' => TRUE);
36 36
 	}
37 37
 
38 38
 
@@ -45,17 +45,17 @@  discard block
 block discarded – undo
45 45
 
46 46
 	protected function _set_with_messengers() {
47 47
 		$this->_with_messengers = array(
48
-			'html' => array( 'pdf' )
48
+			'html' => array('pdf')
49 49
 			);
50 50
 	}
51 51
 
52 52
 
53 53
 
54
-	protected function _get_data_for_context( $context, EE_Registration $registration, $id ) {
54
+	protected function _get_data_for_context($context, EE_Registration $registration, $id) {
55 55
 		//receipt message type data handler is 'Gateways' and it expects a transaction object.
56 56
 		$transaction = $registration->transaction();
57
-		if ( $transaction instanceof EE_Transaction ) {
58
-			return array( $transaction );
57
+		if ($transaction instanceof EE_Transaction) {
58
+			return array($transaction);
59 59
 		}
60 60
 		return array();
61 61
 	}
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@
 block discarded – undo
5 5
  * @subpackage plugin api, messages
6 6
  * @since           4.5.0
7 7
  */
8
-if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
8
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
9
+	exit('No direct script access allowed');
10
+}
9 11
 
10 12
 /**
11 13
  * Use this to register or deregister a new message template pack variation for the EE messages system.
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -87,12 +87,12 @@
 block discarded – undo
87 87
 
88 88
 
89 89
 	/**
90
-	* used to set the valid shortcodes for the receipt message type
91
-	*
92
-	* @since   4.5.0
93
-	*
94
-	* @return  void
95
-	*/
90
+	 * used to set the valid shortcodes for the receipt message type
91
+	 *
92
+	 * @since   4.5.0
93
+	 *
94
+	 * @return  void
95
+	 */
96 96
 	protected function _set_valid_shortcodes() {
97 97
 		$this->_valid_shortcodes['purchaser'] = array(
98 98
 			'attendee_list', 'attendee', 'datetime_list', 'datetime', 'event_list', 'event', 'event_meta', 'messenger', 'organization', 'primary_registration_list', 'primary_registration_details', 'ticket_list', 'ticket', 'transaction', 'venue', 'line_item_list', 'payment_list', 'line_item', 'payment'
Please login to merge, or discard this patch.