Completed
Branch FET-8209-allow-multiple-carts (f5b2f0)
by
unknown
108:40 queued 97:50
created
form_sections/strategies/layout/EE_Form_Section_Layout_Base.strategy.php 2 patches
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.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
 	public function display_errors($input){
173 173
 		if( $input->get_validation_errors() ){
174 174
 			return  "<label  id='" . $input->html_id() . "-error' class='error' for='{$input->html_name()}'>" . $input->get_validation_error_string() . "</label>";
175
-		}else{
175
+		} else{
176 176
 			return '';
177 177
 		}
178 178
 	}
Please login to merge, or discard this patch.
admin_pages/registrations/templates/reg_status_change_buttons.template.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <div id="reg-admin-approve-decline-reg-status-dv">
2 2
 
3 3
 	<h2 id="reg-admin-reg-details-reg-status-hdr">
4
-		<?php echo __( 'Current Registration Status : ', 'event_espresso' ); ?>
4
+		<?php echo __('Current Registration Status : ', 'event_espresso'); ?>
5 5
 		<span class="<?php echo $reg_status_class; ?> bigger-text"><?php echo $reg_status_value; ?></span>
6 6
 	</h2>
7
-	<?php do_action( 'AHEE__reg_status_change_buttons__after_header', $REG_ID ); ?>
7
+	<?php do_action('AHEE__reg_status_change_buttons__after_header', $REG_ID); ?>
8 8
 
9 9
 	<h3 id="reg-admin-reg-details-reg-status-hdr">
10
-		<?php echo __( 'Change Registration Status to :', 'event_espresso' ); ?>
10
+		<?php echo __('Change Registration Status to :', 'event_espresso'); ?>
11 11
 	</h3>
12 12
 
13 13
 	<form id="reg_status_change_form" method="POST" action="<?php echo $form_url; ?>">
@@ -16,15 +16,15 @@  discard block
 block discarded – undo
16 16
 		<input type="hidden" name="return" value="view_registration">
17 17
 		<?php echo $nonce; ?>
18 18
 		<?php echo $status_buttons; ?>
19
-		<?php if ( $attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can( 'ee_send_message', 'registration_message_type' ) ) : ?>
19
+		<?php if ($attendee instanceof EE_Attendee && EE_Registry::instance()->CAP->current_user_can('ee_send_message', 'registration_message_type')) : ?>
20 20
 			<span id="send-related-messages-dv">
21
-			<label for="txn-reg-status-send-notifications-inp" class="important-notice"><?php _e( '...and send related messages ?', 'event_espresso' ); ?>
21
+			<label for="txn-reg-status-send-notifications-inp" class="important-notice"><?php _e('...and send related messages ?', 'event_espresso'); ?>
22 22
 				<input type="checkbox" value="1" id="txn-reg-status-send-notifications-inp" name="txn_reg_status_change[send_notifications]">
23 23
 			</label>
24 24
 			<br/>
25 25
 		</span>
26 26
 			<br/>
27
-			<p class="description"><?php _e( 'If the "send related messages"checkbox is checked when changing status, then the related messages will be sent to the registrant.', 'event_espresso' ); ?></p>
27
+			<p class="description"><?php _e('If the "send related messages"checkbox is checked when changing status, then the related messages will be sent to the registrant.', 'event_espresso'); ?></p>
28 28
 		<?php endif; ?>
29 29
 	</form>
30 30
 </div>
Please login to merge, or discard this patch.
core/exceptions/ExceptionStackTraceDisplay.php 2 patches
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -118,10 +118,10 @@  discard block
 block discarded – undo
118 118
 			// add generic non-identifying messages for non-privileged users
119 119
 			if ( ! WP_DEBUG ) {
120 120
 				$output .= '<span class="ee-error-user-msg-spn">'
121
-				           . trim( $msg )
122
-				           . '</span> &nbsp; <sup>'
123
-				           . $code
124
-				           . '</sup><br />';
121
+						   . trim( $msg )
122
+						   . '</span> &nbsp; <sup>'
123
+						   . $code
124
+						   . '</sup><br />';
125 125
 			} else {
126 126
 				// or helpful developer messages if debugging is on
127 127
 				$output .= '
@@ -130,39 +130,39 @@  discard block
 block discarded – undo
130 130
 				'
131 131
 				. sprintf(
132 132
 					__( '%1$sAn %2$s was thrown!%3$s code: %4$s', 'event_espresso' ),
133
-				    '<strong class="ee-error-dev-msg-str">',
133
+					'<strong class="ee-error-dev-msg-str">',
134 134
 					get_class( $exception ),
135 135
 					'</strong>  &nbsp; <span>',
136 136
 					$code . '</span>'
137 137
 				)
138 138
 				. '<br />
139 139
 				<span class="big-text">"'
140
-				           . trim( $msg )
141
-				           . '"</span><br/>
140
+						   . trim( $msg )
141
+						   . '"</span><br/>
142 142
 				<a id="display-ee-error-trace-1'
143
-				           . $time
144
-				           . '" class="display-ee-error-trace-lnk small-text" rel="ee-error-trace-1'
145
-				           . $time
146
-				           . '">
143
+						   . $time
144
+						   . '" class="display-ee-error-trace-lnk small-text" rel="ee-error-trace-1'
145
+						   . $time
146
+						   . '">
147 147
 					'
148
-				           . __( 'click to view backtrace and class/method details', 'event_espresso' )
149
-				           . '
148
+						   . __( 'click to view backtrace and class/method details', 'event_espresso' )
149
+						   . '
150 150
 				</a><br />
151 151
 				'
152
-				           . $exception->getFile()
153
-				           . sprintf(
154
-					           __( '%1$s( line no: %2$s )%3$s', 'event_espresso' ),
155
-					           ' &nbsp; <span class="small-text lt-grey-text">',
156
-					           $exception->getLine(),
157
-					           '</span>'
158
-				           )
159
-				           . '
152
+						   . $exception->getFile()
153
+						   . sprintf(
154
+							   __( '%1$s( line no: %2$s )%3$s', 'event_espresso' ),
155
+							   ' &nbsp; <span class="small-text lt-grey-text">',
156
+							   $exception->getLine(),
157
+							   '</span>'
158
+						   )
159
+						   . '
160 160
 			</p>
161 161
 			<div id="ee-error-trace-1'
162
-				           . $time
163
-				           . '-dv" class="ee-error-trace-dv" style="display: none;">
162
+						   . $time
163
+						   . '-dv" class="ee-error-trace-dv" style="display: none;">
164 164
 				'
165
-				           . $trace_details;
165
+						   . $trace_details;
166 166
 				if ( ! empty( $class ) ) {
167 167
 					$output .= '
168 168
 				<div style="padding:3px; margin:0 0 1em; border:1px solid #999; background:#fff; border-radius:3px;">
Please login to merge, or discard this patch.
Spacing   +99 added lines, -99 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\exceptions;
3 3
 
4
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
5
-	exit( 'No direct script access allowed' );
4
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
5
+	exit('No direct script access allowed');
6 6
 }
7 7
 
8 8
 
@@ -22,9 +22,9 @@  discard block
 block discarded – undo
22 22
 	/**
23 23
 	 * @param \Exception $exception
24 24
 	 */
25
-	public function __construct( \Exception $exception ) {
26
-		if ( WP_DEBUG ) {
27
-			$this->displayException( $exception );
25
+	public function __construct(\Exception $exception) {
26
+		if (WP_DEBUG) {
27
+			$this->displayException($exception);
28 28
 		}
29 29
 	}
30 30
 
@@ -34,27 +34,27 @@  discard block
 block discarded – undo
34 34
 	 * @access protected
35 35
 	 * @param \Exception $exception
36 36
 	 */
37
-	protected function displayException( \Exception $exception ) {
37
+	protected function displayException(\Exception $exception) {
38 38
 
39 39
 		$error_code = '';
40 40
 		$trace_details = '';
41 41
 		$time = time();
42 42
 		$trace = $exception->getTrace();
43 43
 		// get separate user and developer messages if they exist
44
-		$msg = explode( '||', $exception->getMessage() );
44
+		$msg = explode('||', $exception->getMessage());
45 45
 		$user_msg = $msg[0];
46
-		$dev_msg = isset( $msg[1] ) ? $msg[1] : $msg[0];
46
+		$dev_msg = isset($msg[1]) ? $msg[1] : $msg[0];
47 47
 		$msg = WP_DEBUG ? $dev_msg : $user_msg;
48 48
 		// start gathering output
49 49
 		$output = $this->exceptionStyles();
50 50
 		$output .= '
51 51
 <div id="ee-error-message" class="error">';
52
-		if ( ! WP_DEBUG ) {
52
+		if ( ! WP_DEBUG) {
53 53
 			$output .= '
54 54
 	<p>';
55 55
 		}
56 56
 			// process trace info
57
-			if ( empty( $trace ) ) {
57
+			if (empty($trace)) {
58 58
 				$trace_details .= __(
59 59
 					'Sorry, but no trace information was available for this exception.',
60 60
 					'event_espresso'
@@ -67,47 +67,47 @@  discard block
 block discarded – undo
67 67
 					<th scope="col" align="right" style="width:2.5%;">#</th>
68 68
 					<th scope="col" align="right" style="width:3.5%;">Line</th>
69 69
 					<th scope="col" align="left" style="width:40%;">File</th>
70
-					<th scope="col" align="left">' . __( 'Class', 'event_espresso' ) . '->' . __( 'Method( arguments )', 'event_espresso' ) . '</th>
70
+					<th scope="col" align="left">' . __('Class', 'event_espresso').'->'.__('Method( arguments )', 'event_espresso').'</th>
71 71
 				</tr>';
72
-				$last_on_stack = count( $trace ) - 1;
72
+				$last_on_stack = count($trace) - 1;
73 73
 				// reverse array so that stack is in proper chronological order
74
-				$sorted_trace = array_reverse( $trace );
75
-				foreach ( $sorted_trace as $nmbr => $trace ) {
76
-					$file = isset( $trace['file'] ) ? $trace['file'] : '';
77
-					$class = isset( $trace['class'] ) ? $trace['class'] : '';
78
-					$type = isset( $trace['type'] ) ? $trace['type'] : '';
79
-					$function = isset( $trace['function'] ) ? $trace['function'] : '';
80
-					$args = isset( $trace['args'] ) ? $this->_convert_args_to_string( $trace['args'] ) : '';
81
-					$args = isset( $trace['args'] ) && count( $trace['args'] ) > 4  ? ' <br />' . $args . '<br />' : $args;
82
-					$line = isset( $trace['line'] ) ? $trace['line'] : '';
74
+				$sorted_trace = array_reverse($trace);
75
+				foreach ($sorted_trace as $nmbr => $trace) {
76
+					$file = isset($trace['file']) ? $trace['file'] : '';
77
+					$class = isset($trace['class']) ? $trace['class'] : '';
78
+					$type = isset($trace['type']) ? $trace['type'] : '';
79
+					$function = isset($trace['function']) ? $trace['function'] : '';
80
+					$args = isset($trace['args']) ? $this->_convert_args_to_string($trace['args']) : '';
81
+					$args = isset($trace['args']) && count($trace['args']) > 4 ? ' <br />'.$args.'<br />' : $args;
82
+					$line = isset($trace['line']) ? $trace['line'] : '';
83 83
 					$zebra = $nmbr % 2 !== 0 ? ' odd' : '';
84
-					if ( empty( $file ) && ! empty( $class ) ) {
85
-						$a = new \ReflectionClass( $class );
84
+					if (empty($file) && ! empty($class)) {
85
+						$a = new \ReflectionClass($class);
86 86
 						$file = $a->getFileName();
87
-						if ( empty( $line ) && ! empty( $function ) ) {
88
-							$b = new \ReflectionMethod( $class, $function );
87
+						if (empty($line) && ! empty($function)) {
88
+							$b = new \ReflectionMethod($class, $function);
89 89
 							$line = $b->getStartLine();
90 90
 						}
91 91
 					}
92
-					if ( $nmbr === $last_on_stack ) {
92
+					if ($nmbr === $last_on_stack) {
93 93
 						$file = $exception->getFile() !== '' ? $exception->getFile() : $file;
94 94
 						$line = $exception->getLine() !== '' ? $exception->getLine() : $line;
95
-						$error_code = $this->generate_error_code( $file, $trace['function'], $line );
95
+						$error_code = $this->generate_error_code($file, $trace['function'], $line);
96 96
 					}
97
-					$file = \EEH_File::standardise_directory_separators( $file );
98
-					$nmbr = ! empty( $nmbr ) ? $nmbr : '&nbsp;';
99
-					$line = ! empty( $line ) ? $line : '&nbsp;';
100
-					$file = ! empty( $file ) ? $file : '&nbsp;';
101
-					$class_display = ! empty( $class ) ? $class : '';
102
-					$type = ! empty( $type ) ? $type : '';
103
-					$function = ! empty( $function ) ? $function : '';
104
-					$args = ! empty( $args ) ? '( ' . $args . ' )' : '()';
97
+					$file = \EEH_File::standardise_directory_separators($file);
98
+					$nmbr = ! empty($nmbr) ? $nmbr : '&nbsp;';
99
+					$line = ! empty($line) ? $line : '&nbsp;';
100
+					$file = ! empty($file) ? $file : '&nbsp;';
101
+					$class_display = ! empty($class) ? $class : '';
102
+					$type = ! empty($type) ? $type : '';
103
+					$function = ! empty($function) ? $function : '';
104
+					$args = ! empty($args) ? '( '.$args.' )' : '()';
105 105
 					$trace_details .= '
106 106
 					<tr>
107
-						<td align="right" valign="top" class="' . $zebra . '">' . $nmbr . '</td>
108
-						<td align="right" valign="top" class="' . $zebra . '">' . $line . '</td>
109
-						<td align="left" valign="top" class="' . $zebra . '">' . $file . '</td>
110
-						<td align="left" valign="top" class="' . $zebra . '">' . $class_display . $type . $function . $args . '</td>
107
+						<td align="right" valign="top" class="' . $zebra.'">'.$nmbr.'</td>
108
+						<td align="right" valign="top" class="' . $zebra.'">'.$line.'</td>
109
+						<td align="left" valign="top" class="' . $zebra.'">'.$file.'</td>
110
+						<td align="left" valign="top" class="' . $zebra.'">'.$class_display.$type.$function.$args.'</td>
111 111
 					</tr>';
112 112
 				}
113 113
 				$trace_details .= '
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
 			}
117 117
 			$code = $exception->getCode() ? $exception->getCode() : $error_code;
118 118
 			// add generic non-identifying messages for non-privileged users
119
-			if ( ! WP_DEBUG ) {
119
+			if ( ! WP_DEBUG) {
120 120
 				$output .= '<span class="ee-error-user-msg-spn">'
121
-				           . trim( $msg )
121
+				           . trim($msg)
122 122
 				           . '</span> &nbsp; <sup>'
123 123
 				           . $code
124 124
 				           . '</sup><br />';
@@ -129,15 +129,15 @@  discard block
 block discarded – undo
129 129
 			<p class="ee-error-dev-msg-pg">
130 130
 				'
131 131
 				. sprintf(
132
-					__( '%1$sAn %2$s was thrown!%3$s code: %4$s', 'event_espresso' ),
132
+					__('%1$sAn %2$s was thrown!%3$s code: %4$s', 'event_espresso'),
133 133
 				    '<strong class="ee-error-dev-msg-str">',
134
-					get_class( $exception ),
134
+					get_class($exception),
135 135
 					'</strong>  &nbsp; <span>',
136
-					$code . '</span>'
136
+					$code.'</span>'
137 137
 				)
138 138
 				. '<br />
139 139
 				<span class="big-text">"'
140
-				           . trim( $msg )
140
+				           . trim($msg)
141 141
 				           . '"</span><br/>
142 142
 				<a id="display-ee-error-trace-1'
143 143
 				           . $time
@@ -145,13 +145,13 @@  discard block
 block discarded – undo
145 145
 				           . $time
146 146
 				           . '">
147 147
 					'
148
-				           . __( 'click to view backtrace and class/method details', 'event_espresso' )
148
+				           . __('click to view backtrace and class/method details', 'event_espresso')
149 149
 				           . '
150 150
 				</a><br />
151 151
 				'
152 152
 				           . $exception->getFile()
153 153
 				           . sprintf(
154
-					           __( '%1$s( line no: %2$s )%3$s', 'event_espresso' ),
154
+					           __('%1$s( line no: %2$s )%3$s', 'event_espresso'),
155 155
 					           ' &nbsp; <span class="small-text lt-grey-text">',
156 156
 					           $exception->getLine(),
157 157
 					           '</span>'
@@ -163,14 +163,14 @@  discard block
 block discarded – undo
163 163
 				           . '-dv" class="ee-error-trace-dv" style="display: none;">
164 164
 				'
165 165
 				           . $trace_details;
166
-				if ( ! empty( $class ) ) {
166
+				if ( ! empty($class)) {
167 167
 					$output .= '
168 168
 				<div style="padding:3px; margin:0 0 1em; border:1px solid #999; background:#fff; border-radius:3px;">
169 169
 					<div style="padding:1em 2em; border:1px solid #999; background:#fcfcfc;">
170
-						<h3>' . __( 'Class Details', 'event_espresso' ) . '</h3>';
171
-					$a = new \ReflectionClass( $class );
170
+						<h3>' . __('Class Details', 'event_espresso').'</h3>';
171
+					$a = new \ReflectionClass($class);
172 172
 					$output .= '
173
-						<pre>' . $a . '</pre>
173
+						<pre>' . $a.'</pre>
174 174
 					</div>
175 175
 				</div>';
176 176
 				}
@@ -180,16 +180,16 @@  discard block
 block discarded – undo
180 180
 		<br />';
181 181
 			}
182 182
 		// remove last linebreak
183
-		$output = substr( $output, 0, count( $output ) - 7 );
184
-		if ( ! WP_DEBUG ) {
183
+		$output = substr($output, 0, count($output) - 7);
184
+		if ( ! WP_DEBUG) {
185 185
 			$output .= '
186 186
 	</p>';
187 187
 		}
188 188
 		$output .= '
189 189
 </div>';
190
-		$output .= $this->printScripts( true );
191
-		if ( defined( 'DOING_AJAX' ) ) {
192
-			echo wp_json_encode( array( 'error' => $output ) );
190
+		$output .= $this->printScripts(true);
191
+		if (defined('DOING_AJAX')) {
192
+			echo wp_json_encode(array('error' => $output));
193 193
 			exit();
194 194
 		}
195 195
 		echo $output;
@@ -206,56 +206,56 @@  discard block
 block discarded – undo
206 206
 	 * @param bool  $array
207 207
 	 * @return string
208 208
 	 */
209
-	private function _convert_args_to_string( $arguments = array(), $indent = 0, $array = false ) {
209
+	private function _convert_args_to_string($arguments = array(), $indent = 0, $array = false) {
210 210
 		$args = array();
211
-		$args_count = count( $arguments );
212
-		if ( $args_count > 2 ) {
211
+		$args_count = count($arguments);
212
+		if ($args_count > 2) {
213 213
 			$indent++;
214 214
 			$args[] = '<br />';
215 215
 		}
216 216
 		$x = 0;
217
-		foreach ( $arguments as $arg ) {
217
+		foreach ($arguments as $arg) {
218 218
 			$x++;
219
-			for( $i = 0; $i < $indent; $i++ ) {
219
+			for ($i = 0; $i < $indent; $i++) {
220 220
 				$args[] = ' &nbsp;&nbsp; ';
221 221
 			}
222
-			if ( is_string( $arg ) ) {
223
-				if ( ! $array && strlen( $arg ) > 75 ) {
222
+			if (is_string($arg)) {
223
+				if ( ! $array && strlen($arg) > 75) {
224 224
 					$args[] = "<br />";
225
-					for ( $i = 0; $i <= $indent; $i++ ) {
225
+					for ($i = 0; $i <= $indent; $i++) {
226 226
 						$args[] = ' &nbsp;&nbsp; ';
227 227
 					}
228
-					$args[] = "'" . $arg . "'<br />";
228
+					$args[] = "'".$arg."'<br />";
229 229
 				} else {
230
-					$args[] = " '" . $arg . "'";
230
+					$args[] = " '".$arg."'";
231 231
 				}
232
-			} elseif ( is_array( $arg ) ) {
233
-				$arg_count = count( $arg );
234
-				if ( $arg_count > 2 ) {
232
+			} elseif (is_array($arg)) {
233
+				$arg_count = count($arg);
234
+				if ($arg_count > 2) {
235 235
 					$indent++;
236
-					$args[] = " array(" . $this->_convert_args_to_string( $arg, $indent, true ) . ")";
236
+					$args[] = " array(".$this->_convert_args_to_string($arg, $indent, true).")";
237 237
 					$indent--;
238
-				} else if ( $arg_count === 0 ) {
238
+				} else if ($arg_count === 0) {
239 239
 					$args[] = " array()";
240 240
 				} else {
241
-					$args[] = " array( " . $this->_convert_args_to_string( $arg ) . " )";
241
+					$args[] = " array( ".$this->_convert_args_to_string($arg)." )";
242 242
 				}
243
-			} elseif ( $arg === null ) {
243
+			} elseif ($arg === null) {
244 244
 				$args[] = ' null';
245
-			} elseif ( is_bool( $arg ) ) {
245
+			} elseif (is_bool($arg)) {
246 246
 				$args[] = $arg ? ' true' : ' false';
247
-			} elseif ( is_object( $arg ) ) {
248
-				$args[] = get_class( $arg );
249
-			} elseif ( is_resource( $arg ) ) {
250
-				$args[] = get_resource_type( $arg );
247
+			} elseif (is_object($arg)) {
248
+				$args[] = get_class($arg);
249
+			} elseif (is_resource($arg)) {
250
+				$args[] = get_resource_type($arg);
251 251
 			} else {
252 252
 				$args[] = $arg;
253 253
 			}
254
-			if ( $x === $args_count ) {
255
-				if ( $args_count > 2 ) {
254
+			if ($x === $args_count) {
255
+				if ($args_count > 2) {
256 256
 					$args[] = "<br />";
257 257
 					$indent--;
258
-					for ( $i = 1; $i < $indent; $i++ ) {
258
+					for ($i = 1; $i < $indent; $i++) {
259 259
 						$args[] = ' &nbsp;&nbsp; ';
260 260
 					}
261 261
 				}
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 				$args[] = $args_count > 2 ? ",<br />" : ', ';
264 264
 			}
265 265
 		}
266
-		return implode( '', $args );
266
+		return implode('', $args);
267 267
 	}
268 268
 
269 269
 
@@ -278,11 +278,11 @@  discard block
 block discarded – undo
278 278
 	 * @param string $line
279 279
 	 * @return string
280 280
 	 */
281
-	protected function generate_error_code( $file = '', $func = '', $line = '' ) {
282
-		$file_bits = explode( '.', basename( $file ) );
283
-		$error_code = ! empty( $file_bits[0] ) ? $file_bits[0] : '';
284
-		$error_code .= ! empty( $func ) ? ' - ' . $func : '';
285
-		$error_code .= ! empty( $line ) ? ' - ' . $line : '';
281
+	protected function generate_error_code($file = '', $func = '', $line = '') {
282
+		$file_bits = explode('.', basename($file));
283
+		$error_code = ! empty($file_bits[0]) ? $file_bits[0] : '';
284
+		$error_code .= ! empty($func) ? ' - '.$func : '';
285
+		$error_code .= ! empty($line) ? ' - '.$line : '';
286 286
 		return $error_code;
287 287
 	}
288 288
 
@@ -366,26 +366,26 @@  discard block
 block discarded – undo
366 366
 	 * @param bool $force_print
367 367
 	 * @return string|void
368 368
 	 */
369
-	private function printScripts( $force_print = false ) {
370
-		if ( ! $force_print  && ( did_action( 'admin_enqueue_scripts' ) || did_action( 'wp_enqueue_scripts' ) ) ) {
371
-			if ( wp_script_is( 'ee_error_js', 'enqueued' ) ) {
369
+	private function printScripts($force_print = false) {
370
+		if ( ! $force_print && (did_action('admin_enqueue_scripts') || did_action('wp_enqueue_scripts'))) {
371
+			if (wp_script_is('ee_error_js', 'enqueued')) {
372 372
 				return '';
373
-			} else if ( wp_script_is( 'ee_error_js', 'registered' ) ) {
374
-				add_filter( 'FHEE_load_css', '__return_true' );
375
-				add_filter( 'FHEE_load_js', '__return_true' );
376
-				wp_enqueue_script( 'ee_error_js' );
377
-				wp_localize_script( 'ee_error_js', 'ee_settings', array( 'wp_debug' => WP_DEBUG ) );
373
+			} else if (wp_script_is('ee_error_js', 'registered')) {
374
+				add_filter('FHEE_load_css', '__return_true');
375
+				add_filter('FHEE_load_js', '__return_true');
376
+				wp_enqueue_script('ee_error_js');
377
+				wp_localize_script('ee_error_js', 'ee_settings', array('wp_debug' => WP_DEBUG));
378 378
 			}
379 379
 		} else {
380 380
 			return '
381 381
 <script>
382 382
 /* <![CDATA[ */
383
-var ee_settings = {"wp_debug":"' . WP_DEBUG . '"};
383
+var ee_settings = {"wp_debug":"' . WP_DEBUG.'"};
384 384
 /* ]]> */
385 385
 </script>
386
-<script src="' . includes_url() . 'js/jquery/jquery.js" type="text/javascript"></script>
387
-<script src="' . EE_GLOBAL_ASSETS_URL . 'scripts/espresso_core.js' . '?ver=' . espresso_version() . '" type="text/javascript"></script>
388
-<script src="' . EE_GLOBAL_ASSETS_URL . 'scripts/EE_Error.js' . '?ver=' . espresso_version() . '" type="text/javascript"></script>
386
+<script src="' . includes_url().'js/jquery/jquery.js" type="text/javascript"></script>
387
+<script src="' . EE_GLOBAL_ASSETS_URL.'scripts/espresso_core.js'.'?ver='.espresso_version().'" type="text/javascript"></script>
388
+<script src="' . EE_GLOBAL_ASSETS_URL.'scripts/EE_Error.js'.'?ver='.espresso_version().'" type="text/javascript"></script>
389 389
 ';
390 390
 		}
391 391
 		return '';
Please login to merge, or discard this patch.
core/libraries/form_sections/form_handlers/InvalidFormHandlerException.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 namespace EventEspresso\core\libraries\form_sections\form_handlers;
3 3
 
4
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
5
-	exit( 'No direct script access allowed' );
4
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
5
+	exit('No direct script access allowed');
6 6
 }
7 7
 
8 8
 
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 	 * @param int        $code
27 27
 	 * @param \Exception $previous
28 28
 	 */
29
-	public function __construct( $actual, $message = '', $code = 0, \Exception $previous = null ) {
30
-		if ( empty( $message ) ) {
29
+	public function __construct($actual, $message = '', $code = 0, \Exception $previous = null) {
30
+		if (empty($message)) {
31 31
 			$message = sprintf(
32 32
 				__(
33 33
 					'A valid Form Handler was expected but instead "%1$s" was received.',
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 				$actual
37 37
 			);
38 38
 		}
39
-		parent::__construct( $message, $code, $previous );
39
+		parent::__construct($message, $code, $previous);
40 40
 	}
41 41
 
42 42
 }
Please login to merge, or discard this patch.
core/libraries/form_sections/form_handlers/FormHandlerInterface.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 
4 4
 use EE_Form_Section_Proper;
5 5
 
6
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
7
-	exit( 'No direct script access allowed' );
6
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
7
+	exit('No direct script access allowed');
8 8
 }
9 9
 
10 10
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	/**
37 37
 	 * @param \EE_Form_Section_Proper $form
38 38
 	 */
39
-	public function setForm( \EE_Form_Section_Proper $form );
39
+	public function setForm(\EE_Form_Section_Proper $form);
40 40
 
41 41
 
42 42
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	/**
54 54
 	 * @param boolean $displayable
55 55
 	 */
56
-	public function setDisplayable( $displayable = false );
56
+	public function setDisplayable($displayable = false);
57 57
 
58 58
 
59 59
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 	/**
95 95
 	 * @param string $submit_btn_text
96 96
 	 */
97
-	public function setSubmitBtnText( $submit_btn_text );
97
+	public function setSubmitBtnText($submit_btn_text);
98 98
 
99 99
 
100 100
 
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
 	/**
109 109
 	 * @param string $form_action
110 110
 	 */
111
-	public function setFormAction( $form_action );
111
+	public function setFormAction($form_action);
112 112
 
113 113
 
114 114
 
115 115
 	/**
116 116
 	 * @param array $form_args
117 117
 	 */
118
-	public function addFormActionArgs( $form_args = array() );
118
+	public function addFormActionArgs($form_args = array());
119 119
 
120 120
 
121 121
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 	 *
136 136
 	 * @param string $form_config
137 137
 	 */
138
-	public function setFormConfig( $form_config );
138
+	public function setFormConfig($form_config);
139 139
 
140 140
 
141 141
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	 * @param array $submitted_form_data
188 188
 	 * @return bool
189 189
 	 */
190
-	public function process( $submitted_form_data = array() );
190
+	public function process($submitted_form_data = array());
191 191
 
192 192
 
193 193
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 	 * @param string $text
198 198
 	 * @return \EE_Submit_Input
199 199
 	 */
200
-	public function generateSubmitButton( $text = '' );
200
+	public function generateSubmitButton($text = '');
201 201
 
202 202
 
203 203
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 	 * @param string $text
217 217
 	 * @return \EE_Submit_Input
218 218
 	 */
219
-	public function generateCancelButton( $text = '' );
219
+	public function generateCancelButton($text = '');
220 220
 
221 221
 
222 222
 
Please login to merge, or discard this patch.
core/libraries/form_sections/form_handlers/SequentialStepFormInterface.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@  discard block
 block discarded – undo
4 4
 use EventEspresso\core\exceptions\InvalidDataTypeException;
5 5
 use InvalidArgumentException;
6 6
 
7
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
8
-	exit( 'No direct script access allowed' );
7
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
8
+	exit('No direct script access allowed');
9 9
 }
10 10
 
11 11
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 	 * @param int $order
33 33
 	 * @throws InvalidArgumentException
34 34
 	 */
35
-	public function setOrder( $order );
35
+	public function setOrder($order);
36 36
 
37 37
 
38 38
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @throws InvalidDataTypeException
49 49
 	 * @throws InvalidArgumentException
50 50
 	 */
51
-	public function setRedirectUrl( $redirect_url );
51
+	public function setRedirectUrl($redirect_url);
52 52
 
53 53
 
54 54
 
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	 * @throws InvalidDataTypeException
58 58
 	 * @throws InvalidArgumentException
59 59
 	 */
60
-	public function addRedirectArgs( $redirect_args = array() );
60
+	public function addRedirectArgs($redirect_args = array());
61 61
 
62 62
 
63 63
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	/**
72 72
 	 * @param string $redirect_to
73 73
 	 */
74
-	public function setRedirectTo( $redirect_to );
74
+	public function setRedirectTo($redirect_to);
75 75
 
76 76
 
77 77
 
Please login to merge, or discard this patch.
modules/messages/EED_Messages.module.php 3 patches
Spacing   +187 added lines, -187 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 * @return EED_Messages
70 70
 	 */
71 71
 	public static function instance() {
72
-		return parent::get_instance( __CLASS__ );
72
+		return parent::get_instance(__CLASS__);
73 73
 	}
74 74
 
75 75
 
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 	 */
85 85
 	public static function set_hooks() {
86 86
 		//actions
87
-		add_action( 'AHEE__EE_Payment_Processor__update_txn_based_on_payment', array( 'EED_Messages', 'payment' ), 10, 2 );
88
-		add_action( 'AHEE__EE_Registration_Processor__trigger_registration_update_notifications', array( 'EED_Messages', 'maybe_registration' ), 10, 2 );
87
+		add_action('AHEE__EE_Payment_Processor__update_txn_based_on_payment', array('EED_Messages', 'payment'), 10, 2);
88
+		add_action('AHEE__EE_Registration_Processor__trigger_registration_update_notifications', array('EED_Messages', 'maybe_registration'), 10, 2);
89 89
 		//filters
90
-		add_filter( 'FHEE__EE_Registration__receipt_url__receipt_url', array( 'EED_Messages', 'registration_message_trigger_url' ), 10, 4 );
91
-		add_filter( 'FHEE__EE_Registration__invoice_url__invoice_url', array( 'EED_Messages', 'registration_message_trigger_url' ), 10, 4 );
90
+		add_filter('FHEE__EE_Registration__receipt_url__receipt_url', array('EED_Messages', 'registration_message_trigger_url'), 10, 4);
91
+		add_filter('FHEE__EE_Registration__invoice_url__invoice_url', array('EED_Messages', 'registration_message_trigger_url'), 10, 4);
92 92
 		//register routes
93 93
 		self::_register_routes();
94 94
 	}
@@ -101,16 +101,16 @@  discard block
 block discarded – undo
101 101
 	 */
102 102
 	public static function set_hooks_admin() {
103 103
 		//actions
104
-		add_action( 'AHEE__EE_Payment_Processor__update_txn_based_on_payment', array( 'EED_Messages', 'payment' ), 10, 2 );
105
-		add_action( 'AHEE__Transactions_Admin_Page___send_payment_reminder__process_admin_payment_reminder', array( 'EED_Messages', 'payment_reminder' ), 10 );
106
-		add_action( 'AHEE__EE_Registration_Processor__trigger_registration_update_notifications', array( 'EED_Messages', 'maybe_registration' ), 10, 3 );
107
-		add_action( 'AHEE__Extend_Registrations_Admin_Page___newsletter_selected_send__with_registrations', array( 'EED_Messages', 'send_newsletter_message' ), 10, 2 );
108
-		add_action( 'AHEE__EES_Espresso_Cancelled__process_shortcode__transaction', array( 'EED_Messages', 'cancelled_registration' ), 10 );
109
-		add_action( 'AHEE__EE_Admin_Page___process_admin_payment_notification', array( 'EED_Messages', 'process_admin_payment' ), 10, 1 );
104
+		add_action('AHEE__EE_Payment_Processor__update_txn_based_on_payment', array('EED_Messages', 'payment'), 10, 2);
105
+		add_action('AHEE__Transactions_Admin_Page___send_payment_reminder__process_admin_payment_reminder', array('EED_Messages', 'payment_reminder'), 10);
106
+		add_action('AHEE__EE_Registration_Processor__trigger_registration_update_notifications', array('EED_Messages', 'maybe_registration'), 10, 3);
107
+		add_action('AHEE__Extend_Registrations_Admin_Page___newsletter_selected_send__with_registrations', array('EED_Messages', 'send_newsletter_message'), 10, 2);
108
+		add_action('AHEE__EES_Espresso_Cancelled__process_shortcode__transaction', array('EED_Messages', 'cancelled_registration'), 10);
109
+		add_action('AHEE__EE_Admin_Page___process_admin_payment_notification', array('EED_Messages', 'process_admin_payment'), 10, 1);
110 110
 		//filters
111
-		add_filter( 'FHEE__EE_Admin_Page___process_resend_registration__success', array( 'EED_Messages', 'process_resend' ), 10, 2 );
112
-		add_filter( 'FHEE__EE_Registration__receipt_url__receipt_url', array( 'EED_Messages', 'registration_message_trigger_url' ), 10, 4 );
113
-		add_filter( 'FHEE__EE_Registration__invoice_url__invoice_url', array( 'EED_Messages', 'registration_message_trigger_url' ), 10, 4 );
111
+		add_filter('FHEE__EE_Admin_Page___process_resend_registration__success', array('EED_Messages', 'process_resend'), 10, 2);
112
+		add_filter('FHEE__EE_Registration__receipt_url__receipt_url', array('EED_Messages', 'registration_message_trigger_url'), 10, 4);
113
+		add_filter('FHEE__EE_Registration__invoice_url__invoice_url', array('EED_Messages', 'registration_message_trigger_url'), 10, 4);
114 114
 	}
115 115
 
116 116
 
@@ -124,11 +124,11 @@  discard block
 block discarded – undo
124 124
 	 * @return void
125 125
 	 */
126 126
 	protected static function _register_routes() {
127
-		EE_Config::register_route( 'msg_url_trigger', 'Messages', 'run' );
128
-		EE_Config::register_route( 'msg_cron_trigger', 'Messages', 'execute_batch_request' );
129
-		EE_Config::register_route( 'msg_browser_trigger', 'Messages', 'browser_trigger' );
130
-		EE_Config::register_route( 'msg_browser_error_trigger', 'Messages', 'browser_error_trigger' );
131
-		do_action( 'AHEE__EED_Messages___register_routes' );
127
+		EE_Config::register_route('msg_url_trigger', 'Messages', 'run');
128
+		EE_Config::register_route('msg_cron_trigger', 'Messages', 'execute_batch_request');
129
+		EE_Config::register_route('msg_browser_trigger', 'Messages', 'browser_trigger');
130
+		EE_Config::register_route('msg_browser_error_trigger', 'Messages', 'browser_error_trigger');
131
+		do_action('AHEE__EED_Messages___register_routes');
132 132
 	}
133 133
 
134 134
 
@@ -139,18 +139,18 @@  discard block
 block discarded – undo
139 139
 	 * @since 4.9.0
140 140
 	 * @param WP $WP
141 141
 	 */
142
-	public function browser_trigger( $WP ) {
142
+	public function browser_trigger($WP) {
143 143
 		//ensure controller is loaded
144 144
 		self::_load_controller();
145
-		$token = EE_Registry::instance()->REQ->get( 'token' );
145
+		$token = EE_Registry::instance()->REQ->get('token');
146 146
 		try {
147
-			$mtg = new EE_Message_Generated_From_Token( $token, 'html', self::$_message_resource_manager );
148
-			self::$_MSG_PROCESSOR->generate_and_send_now( $mtg );
149
-		} catch( EE_Error $e ) {
150
-			$error_msg = __( 'Please note that a system message failed to send due to a technical issue.', 'event_espresso' );
147
+			$mtg = new EE_Message_Generated_From_Token($token, 'html', self::$_message_resource_manager);
148
+			self::$_MSG_PROCESSOR->generate_and_send_now($mtg);
149
+		} catch (EE_Error $e) {
150
+			$error_msg = __('Please note that a system message failed to send due to a technical issue.', 'event_espresso');
151 151
 			// add specific message for developers if WP_DEBUG in on
152
-			$error_msg .= '||' . $e->getMessage();
153
-			EE_Error::add_error( $error_msg, __FILE__, __FUNCTION__, __LINE__ );
152
+			$error_msg .= '||'.$e->getMessage();
153
+			EE_Error::add_error($error_msg, __FILE__, __FUNCTION__, __LINE__);
154 154
 		}
155 155
 	}
156 156
 
@@ -166,20 +166,20 @@  discard block
 block discarded – undo
166 166
 	 * @since 4.9.0
167 167
 	 * @param $WP
168 168
 	 */
169
-	public function browser_error_trigger( $WP ) {
170
-		$token = EE_Registry::instance()->REQ->get( 'token' );
171
-		if ( $token ) {
172
-			$message = EEM_Message::instance()->get_one_by_token( $token );
173
-			if ( $message instanceof EE_Message ) {
174
-				header( 'HTTP/1.1 200 OK' );
175
-				$error_msg = nl2br( $message->error_message() );
169
+	public function browser_error_trigger($WP) {
170
+		$token = EE_Registry::instance()->REQ->get('token');
171
+		if ($token) {
172
+			$message = EEM_Message::instance()->get_one_by_token($token);
173
+			if ($message instanceof EE_Message) {
174
+				header('HTTP/1.1 200 OK');
175
+				$error_msg = nl2br($message->error_message());
176 176
 				?>
177 177
 				<!DOCTYPE html>
178 178
 				<html>
179 179
 					<head></head>
180 180
 					<body>
181
-						<?php echo empty( $error_msg )
182
-						? esc_html__( 'Unfortunately, we were unable to capture the error message for this message.', 'event_espresso' )
181
+						<?php echo empty($error_msg)
182
+						? esc_html__('Unfortunately, we were unable to capture the error message for this message.', 'event_espresso')
183 183
 						: wp_kses(
184 184
 							$error_msg,
185 185
 							array(
@@ -214,19 +214,19 @@  discard block
 block discarded – undo
214 214
 	 * @throws EE_Error
215 215
 	 * @return    void
216 216
 	 */
217
-	public function run( $WP ) {
217
+	public function run($WP) {
218 218
 		//ensure controller is loaded
219 219
 		self::_load_controller();
220 220
 		// attempt to process message
221 221
 		try {
222 222
 			/** @type EE_Message_To_Generate_From_Request $message_to_generate */
223
-			$message_to_generate = EE_Registry::instance()->load_lib( 'Message_To_Generate_From_Request' );
224
-			self::$_MSG_PROCESSOR->generate_and_send_now( $message_to_generate );
225
-		} catch ( EE_Error $e ) {
226
-			$error_msg = __( 'Please note that a system message failed to send due to a technical issue.', 'event_espresso' );
223
+			$message_to_generate = EE_Registry::instance()->load_lib('Message_To_Generate_From_Request');
224
+			self::$_MSG_PROCESSOR->generate_and_send_now($message_to_generate);
225
+		} catch (EE_Error $e) {
226
+			$error_msg = __('Please note that a system message failed to send due to a technical issue.', 'event_espresso');
227 227
 			// add specific message for developers if WP_DEBUG in on
228
-			$error_msg .= '||' . $e->getMessage();
229
-			EE_Error::add_error( $error_msg, __FILE__, __FUNCTION__, __LINE__ );
228
+			$error_msg .= '||'.$e->getMessage();
229
+			EE_Error::add_error($error_msg, __FILE__, __FUNCTION__, __LINE__);
230 230
 		}
231 231
 	}
232 232
 
@@ -235,9 +235,9 @@  discard block
 block discarded – undo
235 235
 	 * This is triggered by the 'msg_cron_trigger' route.
236 236
 	 * @param WP $WP
237 237
 	 */
238
-	public function execute_batch_request( $WP ) {
238
+	public function execute_batch_request($WP) {
239 239
 		$this->run_cron();
240
-		header( 'HTTP/1.1 200 OK' );
240
+		header('HTTP/1.1 200 OK');
241 241
 		exit();
242 242
 	}
243 243
 
@@ -251,35 +251,35 @@  discard block
 block discarded – undo
251 251
 	public function run_cron() {
252 252
 		self::_load_controller();
253 253
 		//get required vars
254
-		$cron_type = EE_Registry::instance()->REQ->get( 'type' );
255
-		$transient_key = EE_Registry::instance()->REQ->get( 'key' );
254
+		$cron_type = EE_Registry::instance()->REQ->get('type');
255
+		$transient_key = EE_Registry::instance()->REQ->get('key');
256 256
 
257 257
 		//now let's verify transient, if not valid exit immediately
258
-		if ( ! get_transient( $transient_key ) ) {
258
+		if ( ! get_transient($transient_key)) {
259 259
 			/**
260 260
 			 * trigger error so this gets in the error logs.  This is important because it happens on a non-user request.
261 261
 			 */
262
-			trigger_error( esc_attr__( 'Invalid Request (Transient does not exist)', 'event_espresso' ) );
262
+			trigger_error(esc_attr__('Invalid Request (Transient does not exist)', 'event_espresso'));
263 263
 		}
264 264
 
265 265
 		//if made it here, lets' delete the transient to keep the db clean
266
-		delete_transient( $transient_key );
266
+		delete_transient($transient_key);
267 267
 
268
-		if ( apply_filters( 'FHEE__EED_Messages__run_cron__use_wp_cron', true ) ) {
268
+		if (apply_filters('FHEE__EED_Messages__run_cron__use_wp_cron', true)) {
269 269
 
270
-			$method = 'batch_' . $cron_type . '_from_queue';
271
-			if ( method_exists( self::$_MSG_PROCESSOR, $method ) ) {
270
+			$method = 'batch_'.$cron_type.'_from_queue';
271
+			if (method_exists(self::$_MSG_PROCESSOR, $method)) {
272 272
 				self::$_MSG_PROCESSOR->$method();
273 273
 			} else {
274 274
 				//no matching task
275 275
 				/**
276 276
 				 * trigger error so this gets in the error logs.  This is important because it happens on a non user request.
277 277
 				 */
278
-				trigger_error( esc_attr( sprintf( __( 'There is no task corresponding to this route %s', 'event_espresso' ), $cron_type ) ) );
278
+				trigger_error(esc_attr(sprintf(__('There is no task corresponding to this route %s', 'event_espresso'), $cron_type)));
279 279
 			}
280 280
 		}
281 281
 
282
-		do_action( 'FHEE__EED_Messages__run_cron__end' );
282
+		do_action('FHEE__EED_Messages__run_cron__end');
283 283
 	}
284 284
 
285 285
 
@@ -295,9 +295,9 @@  discard block
 block discarded – undo
295 295
 	 *
296 296
 	 * @return EE_Messages_Template_Pack
297 297
 	 */
298
-	public static function get_template_pack( $template_pack_name ) {
299
-		EE_Registry::instance()->load_helper( 'MSG_Template' );
300
-		return EEH_MSG_Template::get_template_pack( $template_pack_name );
298
+	public static function get_template_pack($template_pack_name) {
299
+		EE_Registry::instance()->load_helper('MSG_Template');
300
+		return EEH_MSG_Template::get_template_pack($template_pack_name);
301 301
 	}
302 302
 
303 303
 
@@ -311,14 +311,14 @@  discard block
 block discarded – undo
311 311
 	 * @return EE_Messages_Template_Pack[]
312 312
 	 */
313 313
 	public static function get_template_packs() {
314
-		EE_Registry::instance()->load_helper( 'MSG_Template' );
314
+		EE_Registry::instance()->load_helper('MSG_Template');
315 315
 
316 316
 		//for backward compat, let's make sure this returns in the same format as originally.
317 317
 		$template_pack_collection = EEH_MSG_Template::get_template_pack_collection();
318 318
 		$template_pack_collection->rewind();
319 319
 		$template_packs = array();
320
-		while ( $template_pack_collection->valid() ) {
321
-			$template_packs[ $template_pack_collection->current()->dbref ] = $template_pack_collection->current();
320
+		while ($template_pack_collection->valid()) {
321
+			$template_packs[$template_pack_collection->current()->dbref] = $template_pack_collection->current();
322 322
 			$template_pack_collection->next();
323 323
 		}
324 324
 		return $template_packs;
@@ -334,14 +334,14 @@  discard block
 block discarded – undo
334 334
 	 * @return void
335 335
 	 */
336 336
 	public static function set_autoloaders() {
337
-		if ( empty( self::$_MSG_PATHS ) ) {
337
+		if (empty(self::$_MSG_PATHS)) {
338 338
 			self::_set_messages_paths();
339
-			foreach ( self::$_MSG_PATHS as $path ) {
340
-				EEH_Autoloader::register_autoloaders_for_each_file_in_folder( $path );
339
+			foreach (self::$_MSG_PATHS as $path) {
340
+				EEH_Autoloader::register_autoloaders_for_each_file_in_folder($path);
341 341
 			}
342 342
 			// add aliases
343
-			EEH_Autoloader::add_alias( 'EE_messages', 'EE_messages' );
344
-			EEH_Autoloader::add_alias( 'EE_messenger', 'EE_messenger' );
343
+			EEH_Autoloader::add_alias('EE_messages', 'EE_messages');
344
+			EEH_Autoloader::add_alias('EE_messenger', 'EE_messenger');
345 345
 		}
346 346
 	}
347 347
 
@@ -369,10 +369,10 @@  discard block
 block discarded – undo
369 369
 			'shortcodes',
370 370
 			);
371 371
 		$paths = array();
372
-		foreach ( $dir_ref as $index => $dir ) {
373
-			$paths[ $index ] = EE_LIBRARIES . $dir;
372
+		foreach ($dir_ref as $index => $dir) {
373
+			$paths[$index] = EE_LIBRARIES.$dir;
374 374
 		}
375
-		self::$_MSG_PATHS = apply_filters( 'FHEE__EED_Messages___set_messages_paths___MSG_PATHS', $paths );
375
+		self::$_MSG_PATHS = apply_filters('FHEE__EED_Messages___set_messages_paths___MSG_PATHS', $paths);
376 376
 	}
377 377
 
378 378
 
@@ -383,12 +383,12 @@  discard block
 block discarded – undo
383 383
 	 * @return void
384 384
 	 */
385 385
 	protected static function _load_controller() {
386
-		if ( ! self::$_MSG_PROCESSOR instanceof EE_Messages_Processor ) {
387
-			EE_Registry::instance()->load_core( 'Request_Handler' );
386
+		if ( ! self::$_MSG_PROCESSOR instanceof EE_Messages_Processor) {
387
+			EE_Registry::instance()->load_core('Request_Handler');
388 388
 			self::set_autoloaders();
389
-			self::$_EEMSG = EE_Registry::instance()->load_lib( 'messages' );
390
-			self::$_MSG_PROCESSOR = EE_Registry::instance()->load_lib( 'Messages_Processor' );
391
-			self::$_message_resource_manager = EE_Registry::instance()->load_lib( 'Message_Resource_Manager' );
389
+			self::$_EEMSG = EE_Registry::instance()->load_lib('messages');
390
+			self::$_MSG_PROCESSOR = EE_Registry::instance()->load_lib('Messages_Processor');
391
+			self::$_message_resource_manager = EE_Registry::instance()->load_lib('Message_Resource_Manager');
392 392
 		}
393 393
 	}
394 394
 
@@ -397,10 +397,10 @@  discard block
 block discarded – undo
397 397
 	/**
398 398
 	 * @param EE_Transaction $transaction
399 399
 	 */
400
-	public static function payment_reminder( EE_Transaction $transaction ) {
400
+	public static function payment_reminder(EE_Transaction $transaction) {
401 401
 		self::_load_controller();
402
-		$data = array( $transaction, null );
403
-		self::$_MSG_PROCESSOR->generate_for_all_active_messengers( 'payment_reminder', $data );
402
+		$data = array($transaction, null);
403
+		self::$_MSG_PROCESSOR->generate_for_all_active_messengers('payment_reminder', $data);
404 404
 	}
405 405
 
406 406
 
@@ -411,14 +411,14 @@  discard block
 block discarded – undo
411 411
 	 * @param  EE_Payment object
412 412
 	 * @return void
413 413
 	 */
414
-	public static function payment( EE_Transaction $transaction, EE_Payment $payment ) {
414
+	public static function payment(EE_Transaction $transaction, EE_Payment $payment) {
415 415
 		self::_load_controller();
416
-		$data = array( $transaction, $payment );
417
-		EE_Registry::instance()->load_helper( 'MSG_Template' );
418
-		$message_type = EEH_MSG_Template::convert_payment_status_to_message_type( $payment->STS_ID() );
416
+		$data = array($transaction, $payment);
417
+		EE_Registry::instance()->load_helper('MSG_Template');
418
+		$message_type = EEH_MSG_Template::convert_payment_status_to_message_type($payment->STS_ID());
419 419
 		//if payment amount is less than 0 then switch to payment_refund message type.
420 420
 		$message_type = $payment->amount() < 0 ? 'payment_refund' : $message_type;
421
-		self::$_MSG_PROCESSOR->generate_for_all_active_messengers( $message_type, $data );
421
+		self::$_MSG_PROCESSOR->generate_for_all_active_messengers($message_type, $data);
422 422
 	}
423 423
 
424 424
 
@@ -426,10 +426,10 @@  discard block
 block discarded – undo
426 426
 	/**
427 427
 	 * @param EE_Transaction $transaction
428 428
 	 */
429
-	public static function cancelled_registration( EE_Transaction $transaction ) {
429
+	public static function cancelled_registration(EE_Transaction $transaction) {
430 430
 		self::_load_controller();
431
-		$data = array( $transaction, null );
432
-		self::$_MSG_PROCESSOR->generate_for_all_active_messengers( 'cancelled_registration', $data );
431
+		$data = array($transaction, null);
432
+		self::$_MSG_PROCESSOR->generate_for_all_active_messengers('cancelled_registration', $data);
433 433
 	}
434 434
 
435 435
 
@@ -442,9 +442,9 @@  discard block
 block discarded – undo
442 442
 	 * @param array $extra_details
443 443
 	 * @return void
444 444
 	 */
445
-	public static function maybe_registration( EE_Registration $registration, $extra_details = array() ) {
445
+	public static function maybe_registration(EE_Registration $registration, $extra_details = array()) {
446 446
 
447
-		if ( ! self::_verify_registration_notification_send( $registration, $extra_details ) ) {
447
+		if ( ! self::_verify_registration_notification_send($registration, $extra_details)) {
448 448
 			//no messages please
449 449
 			return;
450 450
 		}
@@ -459,22 +459,22 @@  discard block
 block discarded – undo
459 459
 		$mtgs = array();
460 460
 
461 461
 		//loop through registrations and trigger messages once per status.
462
-		foreach ( $all_registrations as $reg ) {
462
+		foreach ($all_registrations as $reg) {
463 463
 
464 464
 			//already triggered?
465
-			if ( in_array( $reg->status_ID(), $statuses_sent ) ) {
465
+			if (in_array($reg->status_ID(), $statuses_sent)) {
466 466
 				continue;
467 467
 			}
468 468
 
469
-			$message_type = EEH_MSG_Template::convert_reg_status_to_message_type( $reg->status_ID() );
470
-			$mtgs = $mtgs + self::$_MSG_PROCESSOR->setup_mtgs_for_all_active_messengers( $message_type, array( $registration->transaction(), null, $reg->status_ID() ) );
469
+			$message_type = EEH_MSG_Template::convert_reg_status_to_message_type($reg->status_ID());
470
+			$mtgs = $mtgs + self::$_MSG_PROCESSOR->setup_mtgs_for_all_active_messengers($message_type, array($registration->transaction(), null, $reg->status_ID()));
471 471
 			$statuses_sent[] = $reg->status_ID();
472 472
 		}
473 473
 
474
-		$mtgs = $mtgs + self::$_MSG_PROCESSOR->setup_mtgs_for_all_active_messengers( 'registration_summary', array( $registration->transaction(), null ) );
474
+		$mtgs = $mtgs + self::$_MSG_PROCESSOR->setup_mtgs_for_all_active_messengers('registration_summary', array($registration->transaction(), null));
475 475
 
476 476
 		//batch queue and initiate request
477
-		self::$_MSG_PROCESSOR->batch_queue_for_generation_and_persist( $mtgs );
477
+		self::$_MSG_PROCESSOR->batch_queue_for_generation_and_persist($mtgs);
478 478
 		self::$_MSG_PROCESSOR->get_queue()->initiate_request_by_priority();
479 479
 	}
480 480
 
@@ -489,39 +489,39 @@  discard block
 block discarded – undo
489 489
 	 *
490 490
 	 * @return bool          true = send away, false = nope halt the presses.
491 491
 	 */
492
-	protected static function _verify_registration_notification_send( EE_Registration $registration, $extra_details = array() ) {
492
+	protected static function _verify_registration_notification_send(EE_Registration $registration, $extra_details = array()) {
493 493
 		 //self::log(
494 494
 		 //	__CLASS__, __FUNCTION__, __LINE__,
495 495
 		 //	$registration->transaction(),
496 496
 		 //	array( '$extra_details' => $extra_details )
497 497
 		 //);
498 498
 		// currently only using this to send messages for the primary registrant
499
-		if ( ! $registration->is_primary_registrant() ) {
499
+		if ( ! $registration->is_primary_registrant()) {
500 500
 			return false;
501 501
 		}
502 502
 		// first we check if we're in admin and not doing front ajax
503
-		if ( is_admin() && ! EE_FRONT_AJAX ) {
503
+		if (is_admin() && ! EE_FRONT_AJAX) {
504 504
 			//make sure appropriate admin params are set for sending messages
505
-			if ( empty( $_REQUEST['txn_reg_status_change']['send_notifications'] ) || ! absint( $_REQUEST['txn_reg_status_change']['send_notifications'] ) ) {
505
+			if (empty($_REQUEST['txn_reg_status_change']['send_notifications']) || ! absint($_REQUEST['txn_reg_status_change']['send_notifications'])) {
506 506
 				//no messages sent please.
507 507
 				return false;
508 508
 			}
509 509
 		} else {
510 510
 			// frontend request (either regular or via AJAX)
511 511
 			// TXN is NOT finalized ?
512
-			if ( ! isset( $extra_details['finalized'] ) || $extra_details['finalized'] === false ) {
512
+			if ( ! isset($extra_details['finalized']) || $extra_details['finalized'] === false) {
513 513
 				return false;
514 514
 			}
515 515
 			// return visit but nothing changed ???
516 516
 			if (
517
-				isset( $extra_details['revisit'], $extra_details['status_updates'] ) &&
517
+				isset($extra_details['revisit'], $extra_details['status_updates']) &&
518 518
 				$extra_details['revisit'] && ! $extra_details['status_updates']
519 519
 			) {
520 520
 				return false;
521 521
 			}
522 522
 			// NOT sending messages && reg status is something other than "Not-Approved"
523 523
 			if (
524
-				! apply_filters( 'FHEE__EED_Messages___maybe_registration__deliver_notifications', false ) &&
524
+				! apply_filters('FHEE__EED_Messages___maybe_registration__deliver_notifications', false) &&
525 525
 				$registration->status_ID() !== EEM_Registration::status_id_not_approved
526 526
 			) {
527 527
 				return false;
@@ -543,10 +543,10 @@  discard block
 block discarded – undo
543 543
 	 *
544 544
 	 * @return array
545 545
 	 */
546
-	protected static function _get_reg_status_array( $reg_status = '' ) {
547
-		EE_Registry::instance()->load_helper( 'MSG_Template' );
548
-		return EEH_MSG_Template::convert_reg_status_to_message_type( $reg_status )
549
-			? EEH_MSG_Template::convert_reg_status_to_message_type( $reg_status )
546
+	protected static function _get_reg_status_array($reg_status = '') {
547
+		EE_Registry::instance()->load_helper('MSG_Template');
548
+		return EEH_MSG_Template::convert_reg_status_to_message_type($reg_status)
549
+			? EEH_MSG_Template::convert_reg_status_to_message_type($reg_status)
550 550
 			: EEH_MSG_Template::reg_status_to_message_type_array();
551 551
 	}
552 552
 
@@ -562,10 +562,10 @@  discard block
 block discarded – undo
562 562
 	 *
563 563
 	 * @return string|bool The payment message type slug matching the status or false if no match.
564 564
 	 */
565
-	protected static function _get_payment_message_type( $payment_status ) {
566
-		EE_Registry::instance()->load_helper( 'MSG_Template' );
567
-		return EEH_MSG_Template::convert_payment_status_to_message_type( $payment_status )
568
-			? EEH_MSG_Template::convert_payment_status_to_message_type( $payment_status )
565
+	protected static function _get_payment_message_type($payment_status) {
566
+		EE_Registry::instance()->load_helper('MSG_Template');
567
+		return EEH_MSG_Template::convert_payment_status_to_message_type($payment_status)
568
+			? EEH_MSG_Template::convert_payment_status_to_message_type($payment_status)
569 569
 			: false;
570 570
 	}
571 571
 
@@ -579,33 +579,33 @@  discard block
 block discarded – undo
579 579
 	 * @param array $req_data This is the $_POST & $_GET data sent from EE_Admin Pages
580 580
 	 * @return bool          success/fail
581 581
 	 */
582
-	public static function process_resend( $req_data ) {
582
+	public static function process_resend($req_data) {
583 583
 		self::_load_controller();
584 584
 
585 585
 		//if $msgID in this request then skip to the new resend_message
586
-		if ( EE_Registry::instance()->REQ->get( 'MSG_ID' ) ) {
586
+		if (EE_Registry::instance()->REQ->get('MSG_ID')) {
587 587
 			return self::resend_message();
588 588
 		}
589 589
 
590 590
 		//make sure any incoming request data is set on the REQ so that it gets picked up later.
591 591
 		$req_data = (array) $req_data;
592
-		foreach( $req_data as $request_key => $request_value ) {
593
-			EE_Registry::instance()->REQ->set( $request_key, $request_value );
592
+		foreach ($req_data as $request_key => $request_value) {
593
+			EE_Registry::instance()->REQ->set($request_key, $request_value);
594 594
 		}
595 595
 
596
-		if ( ! $messages_to_send = self::$_MSG_PROCESSOR->setup_messages_to_generate_from_registration_ids_in_request() ) {
596
+		if ( ! $messages_to_send = self::$_MSG_PROCESSOR->setup_messages_to_generate_from_registration_ids_in_request()) {
597 597
 			return false;
598 598
 		}
599 599
 
600 600
 		try {
601
-			self::$_MSG_PROCESSOR->batch_queue_for_generation_and_persist( $messages_to_send );
601
+			self::$_MSG_PROCESSOR->batch_queue_for_generation_and_persist($messages_to_send);
602 602
 			self::$_MSG_PROCESSOR->get_queue()->initiate_request_by_priority();
603
-		} catch( EE_Error $e ) {
604
-			EE_Error::add_error( $e->getMessage(), __FILE__, __FUNCTION__, __LINE__ );
603
+		} catch (EE_Error $e) {
604
+			EE_Error::add_error($e->getMessage(), __FILE__, __FUNCTION__, __LINE__);
605 605
 			return false;
606 606
 		}
607 607
 		EE_Error::add_success(
608
-			__( 'Messages have been successfully queued for generation and sending.', 'event_espresso' )
608
+			__('Messages have been successfully queued for generation and sending.', 'event_espresso')
609 609
 		);
610 610
 		return true; //everything got queued.
611 611
 	}
@@ -618,17 +618,17 @@  discard block
 block discarded – undo
618 618
 	public static function resend_message() {
619 619
 		self::_load_controller();
620 620
 
621
-		$msgID = EE_Registry::instance()->REQ->get( 'MSG_ID' );
622
-		if ( ! $msgID ) {
623
-			EE_Error::add_error( __( 'Something went wrong because there is no "MSG_ID" value in the request', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
621
+		$msgID = EE_Registry::instance()->REQ->get('MSG_ID');
622
+		if ( ! $msgID) {
623
+			EE_Error::add_error(__('Something went wrong because there is no "MSG_ID" value in the request', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
624 624
 			return false;
625 625
 		}
626 626
 
627
-		self::$_MSG_PROCESSOR->setup_messages_from_ids_and_send( (array) $msgID );
627
+		self::$_MSG_PROCESSOR->setup_messages_from_ids_and_send((array) $msgID);
628 628
 
629 629
 		//setup success message.
630
-		$count_ready_for_resend = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue( EEM_Message::status_resend );
631
-		EE_Error::add_success( sprintf(
630
+		$count_ready_for_resend = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue(EEM_Message::status_resend);
631
+		EE_Error::add_success(sprintf(
632 632
 			_n(
633 633
 				'There was %d message queued for resending.',
634 634
 				'There were %d messages queued for resending.',
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
 				'event_espresso'
637 637
 			),
638 638
 			$count_ready_for_resend
639
-		) );
639
+		));
640 640
 		return true;
641 641
 	}
642 642
 
@@ -649,13 +649,13 @@  discard block
 block discarded – undo
649 649
 	 * @param  EE_Payment $payment EE_payment object
650 650
 	 * @return bool              success/fail
651 651
 	 */
652
-	public static function process_admin_payment( EE_Payment $payment ) {
653
-		EE_Registry::instance()->load_helper( 'MSG_Template' );
652
+	public static function process_admin_payment(EE_Payment $payment) {
653
+		EE_Registry::instance()->load_helper('MSG_Template');
654 654
 		//we need to get the transaction object
655 655
 		$transaction = $payment->transaction();
656
-		if ( $transaction instanceof EE_Transaction ) {
657
-			$data = array( $transaction, $payment );
658
-			$message_type = EEH_MSG_Template::convert_payment_status_to_message_type( $payment->STS_ID() );
656
+		if ($transaction instanceof EE_Transaction) {
657
+			$data = array($transaction, $payment);
658
+			$message_type = EEH_MSG_Template::convert_payment_status_to_message_type($payment->STS_ID());
659 659
 
660 660
 			//if payment amount is less than 0 then switch to payment_refund message type.
661 661
 			$message_type = $payment->amount() < 0 ? 'payment_refund' : $message_type;
@@ -665,22 +665,22 @@  discard block
 block discarded – undo
665 665
 
666 666
 			self::_load_controller();
667 667
 
668
-			self::$_MSG_PROCESSOR->generate_for_all_active_messengers( $message_type, $data );
668
+			self::$_MSG_PROCESSOR->generate_for_all_active_messengers($message_type, $data);
669 669
 
670 670
 			//get count of queued for generation
671
-			$count_to_generate = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue( array( EEM_Message::status_incomplete, EEM_Message::status_idle ) );
671
+			$count_to_generate = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue(array(EEM_Message::status_incomplete, EEM_Message::status_idle));
672 672
 
673
-			if ( $count_to_generate > 0 && self::$_MSG_PROCESSOR->get_queue()->get_message_repository()->count() !== 0 ) {
674
-				add_filter( 'FHEE__EE_Admin_Page___process_admin_payment_notification__success', '__return_true' );
673
+			if ($count_to_generate > 0 && self::$_MSG_PROCESSOR->get_queue()->get_message_repository()->count() !== 0) {
674
+				add_filter('FHEE__EE_Admin_Page___process_admin_payment_notification__success', '__return_true');
675 675
 				return true;
676 676
 			} else {
677
-				$count_failed = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue( EEM_Message::instance()->stati_indicating_failed_sending() );
677
+				$count_failed = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue(EEM_Message::instance()->stati_indicating_failed_sending());
678 678
 				/**
679 679
 				 * Verify that there are actually errors.  If not then we return a success message because the queue might have been emptied due to successful
680 680
 				 * IMMEDIATE generation.
681 681
 				 */
682
-				if ( $count_failed > 0 ) {
683
-					EE_Error::add_error( sprintf(
682
+				if ($count_failed > 0) {
683
+					EE_Error::add_error(sprintf(
684 684
 						_n(
685 685
 							'The payment notification generation failed.',
686 686
 							'%d payment notifications failed being sent.',
@@ -688,11 +688,11 @@  discard block
 block discarded – undo
688 688
 							'event_espresso'
689 689
 						),
690 690
 						$count_failed
691
-					), __FILE__, __FUNCTION__, __LINE__ );
691
+					), __FILE__, __FUNCTION__, __LINE__);
692 692
 
693 693
 					return false;
694 694
 				} else {
695
-					add_filter( 'FHEE__EE_Admin_Page___process_admin_payment_notification__success', '__return_true' );
695
+					add_filter('FHEE__EE_Admin_Page___process_admin_payment_notification__success', '__return_true');
696 696
 					return true;
697 697
 				}
698 698
 			}
@@ -716,11 +716,11 @@  discard block
 block discarded – undo
716 716
 	 * @param  int      	      $grp_id     a specific message template group id.
717 717
 	 * @return void
718 718
 	 */
719
-	public static function send_newsletter_message( $registrations, $grp_id ) {
719
+	public static function send_newsletter_message($registrations, $grp_id) {
720 720
 		//make sure mtp is id and set it in the EE_Request Handler later messages setup.
721
-		EE_Registry::instance()->REQ->set( 'GRP_ID', (int) $grp_id );
721
+		EE_Registry::instance()->REQ->set('GRP_ID', (int) $grp_id);
722 722
 		self::_load_controller();
723
-		self::$_MSG_PROCESSOR->generate_for_all_active_messengers( 'newsletter', $registrations );
723
+		self::$_MSG_PROCESSOR->generate_for_all_active_messengers('newsletter', $registrations);
724 724
 	}
725 725
 
726 726
 
@@ -735,9 +735,9 @@  discard block
 block discarded – undo
735 735
 	 * @param string 	$message_type
736 736
 	 * @return 	string
737 737
 	 */
738
-	public static function registration_message_trigger_url( $registration_message_trigger_url, EE_Registration $registration, $messenger = 'html', $message_type = 'invoice' ) {
738
+	public static function registration_message_trigger_url($registration_message_trigger_url, EE_Registration $registration, $messenger = 'html', $message_type = 'invoice') {
739 739
 		// whitelist $messenger
740
-		switch ( $messenger ) {
740
+		switch ($messenger) {
741 741
 			case 'pdf' :
742 742
 				$sending_messenger = 'pdf';
743 743
 				$generating_messenger = 'html';
@@ -749,7 +749,7 @@  discard block
 block discarded – undo
749 749
 				break;
750 750
 		}
751 751
 		// whitelist $message_type
752
-		switch ( $message_type ) {
752
+		switch ($message_type) {
753 753
 			case 'receipt' :
754 754
 				$message_type = 'receipt';
755 755
 				break;
@@ -759,7 +759,7 @@  discard block
 block discarded – undo
759 759
 				break;
760 760
 		}
761 761
 		// verify that both the messenger AND the message type are active
762
-		if ( EEH_MSG_Template::is_messenger_active( $sending_messenger ) && EEH_MSG_Template::is_mt_active( $message_type ) ) {
762
+		if (EEH_MSG_Template::is_messenger_active($sending_messenger) && EEH_MSG_Template::is_mt_active($message_type)) {
763 763
 			//need to get the correct message template group for this (i.e. is there a custom invoice for the event this registration is registered for?)
764 764
 			$template_query_params = array(
765 765
 				'MTP_is_active' => true,
@@ -768,16 +768,16 @@  discard block
 block discarded – undo
768 768
 				'Event.EVT_ID' => $registration->event_ID()
769 769
 			);
770 770
 			//get the message template group.
771
-			$msg_template_group = EEM_Message_Template_Group::instance()->get_one( array( $template_query_params ) );
771
+			$msg_template_group = EEM_Message_Template_Group::instance()->get_one(array($template_query_params));
772 772
 			//if we don't have an EE_Message_Template_Group then return
773
-			if ( ! $msg_template_group instanceof EE_Message_Template_Group ) {
773
+			if ( ! $msg_template_group instanceof EE_Message_Template_Group) {
774 774
 				// remove EVT_ID from query params so that global templates get picked up
775
-				unset( $template_query_params['Event.EVT_ID'] );
775
+				unset($template_query_params['Event.EVT_ID']);
776 776
 				//get global template as the fallback
777
-				$msg_template_group = EEM_Message_Template_Group::instance()->get_one( array( $template_query_params ) );
777
+				$msg_template_group = EEM_Message_Template_Group::instance()->get_one(array($template_query_params));
778 778
 			}
779 779
 			//if we don't have an EE_Message_Template_Group then return
780
-			if ( ! $msg_template_group instanceof EE_Message_Template_Group ) {
780
+			if ( ! $msg_template_group instanceof EE_Message_Template_Group) {
781 781
 				return '';
782 782
 			}
783 783
 			// generate the URL
@@ -806,7 +806,7 @@  discard block
 block discarded – undo
806 806
 	 * @param bool 	  $send true we will do a test send using the messenger delivery, false we just do a regular preview
807 807
 	 * @return string|bool          The body of the message or if send is requested, sends.
808 808
 	 */
809
-	public static function preview_message( $type, $context, $messenger, $send = false ) {
809
+	public static function preview_message($type, $context, $messenger, $send = false) {
810 810
 		self::_load_controller();
811 811
 		$mtg = new EE_Message_To_Generate(
812 812
 			$messenger,
@@ -815,8 +815,8 @@  discard block
 block discarded – undo
815 815
 			$context,
816 816
 			true
817 817
 		);
818
-		$generated_preview_queue = self::$_MSG_PROCESSOR->generate_for_preview( $mtg, $send );
819
-		if ( $generated_preview_queue instanceof EE_Messages_Queue ) {
818
+		$generated_preview_queue = self::$_MSG_PROCESSOR->generate_for_preview($mtg, $send);
819
+		if ($generated_preview_queue instanceof EE_Messages_Queue) {
820 820
 			return $generated_preview_queue->get_message_repository()->current()->content();
821 821
 		} else {
822 822
 			return $generated_preview_queue;
@@ -843,7 +843,7 @@  discard block
 block discarded – undo
843 843
 	 *
844 844
 	 * @return bool          success or fail.
845 845
 	 */
846
-	public static function send_message_with_messenger_only( $messenger, $message_type, EE_Messages_Queue $queue, $custom_subject = '' ) {
846
+	public static function send_message_with_messenger_only($messenger, $message_type, EE_Messages_Queue $queue, $custom_subject = '') {
847 847
 		self::_load_controller();
848 848
 		/** @type EE_Message_To_Generate_From_Queue $message_to_generate */
849 849
 		$message_to_generate = EE_Registry::instance()->load_lib(
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
 				$custom_subject,
856 856
 			)
857 857
 		);
858
-		return self::$_MSG_PROCESSOR->queue_for_sending( $message_to_generate );
858
+		return self::$_MSG_PROCESSOR->queue_for_sending($message_to_generate);
859 859
 	}
860 860
 
861 861
 
@@ -868,24 +868,24 @@  discard block
 block discarded – undo
868 868
 	 * @param array     $message_ids An array of message ids
869 869
 	 * @return bool | EE_Messages_Queue     false if nothing was generated, EE_Messages_Queue containing generated messages.
870 870
 	 */
871
-	public static function generate_now( $message_ids ) {
871
+	public static function generate_now($message_ids) {
872 872
 		self::_load_controller();
873 873
 		$messages = EEM_Message::instance()->get_all(
874 874
 			array(
875 875
 				0 => array(
876
-					'MSG_ID' => array( 'IN', $message_ids ),
876
+					'MSG_ID' => array('IN', $message_ids),
877 877
 					'STS_ID' => EEM_Message::status_incomplete,
878 878
 				)
879 879
 			)
880 880
 		);
881 881
 		$generated_queue = false;
882
-		if ( $messages ) {
883
-			$generated_queue = self::$_MSG_PROCESSOR->batch_generate_from_queue( $messages );
882
+		if ($messages) {
883
+			$generated_queue = self::$_MSG_PROCESSOR->batch_generate_from_queue($messages);
884 884
 		}
885 885
 
886
-		if ( ! $generated_queue instanceof EE_Messages_Queue ) {
886
+		if ( ! $generated_queue instanceof EE_Messages_Queue) {
887 887
 			EE_Error::add_error(
888
-				__( 'The messages were not generated. This could mean there is already a batch being generated on a separate request, or because the selected messages are not ready for generation. Please wait a minute or two and try again.', 'event_espresso' ),
888
+				__('The messages were not generated. This could mean there is already a batch being generated on a separate request, or because the selected messages are not ready for generation. Please wait a minute or two and try again.', 'event_espresso'),
889 889
 				__FILE__, __FUNCTION__, __LINE__
890 890
 			);
891 891
 		}
@@ -904,30 +904,30 @@  discard block
 block discarded – undo
904 904
 	 *
905 905
 	 * @return bool | EE_Messages_Queue  false if no messages sent.
906 906
 	 */
907
-	public static function send_now( $message_ids ) {
907
+	public static function send_now($message_ids) {
908 908
 		self::_load_controller();
909 909
 		$messages = EEM_Message::instance()->get_all(
910 910
 			array(
911 911
 				0 => array(
912
-					'MSG_ID' => array( 'IN', $message_ids ),
913
-					'STS_ID' => array( 'IN', array( EEM_Message::status_idle, EEM_Message::status_resend, EEM_Message::status_retry ) )
912
+					'MSG_ID' => array('IN', $message_ids),
913
+					'STS_ID' => array('IN', array(EEM_Message::status_idle, EEM_Message::status_resend, EEM_Message::status_retry))
914 914
 				)
915 915
 			)
916 916
 		);
917 917
 		$sent_queue = false;
918
-		if ( $messages ) {
919
-			$sent_queue = self::$_MSG_PROCESSOR->batch_send_from_queue( $messages );
918
+		if ($messages) {
919
+			$sent_queue = self::$_MSG_PROCESSOR->batch_send_from_queue($messages);
920 920
 		}
921 921
 
922
-		if ( ! $sent_queue instanceof EE_Messages_Queue ) {
922
+		if ( ! $sent_queue instanceof EE_Messages_Queue) {
923 923
 			EE_Error::add_error(
924
-				__( 'The messages were not sent. This could mean there is already a batch being sent on a separate request, or because the selected messages are not sendable. Please wait a minute or two and try again.', 'event_espresso' ),
924
+				__('The messages were not sent. This could mean there is already a batch being sent on a separate request, or because the selected messages are not sendable. Please wait a minute or two and try again.', 'event_espresso'),
925 925
 				__FILE__, __FUNCTION__, __LINE__
926 926
 			);
927 927
 		} else {
928 928
 			//can count how many sent by using the messages in the queue
929
-			$sent_count = $sent_queue->count_STS_in_queue( EEM_Message::instance()->stati_indicating_sent() );
930
-			if ( $sent_count > 0 ) {
929
+			$sent_count = $sent_queue->count_STS_in_queue(EEM_Message::instance()->stati_indicating_sent());
930
+			if ($sent_count > 0) {
931 931
 				EE_Error::add_success(
932 932
 					sprintf(
933 933
 						_n(
@@ -942,8 +942,8 @@  discard block
 block discarded – undo
942 942
 			} else {
943 943
 				EE_Error::overwrite_errors();
944 944
 				EE_Error::add_error(
945
-					__( 'No message was sent because of problems with sending. Either all the messages you selected were not a sendable message, they were ALREADY sent on a different scheduled task, or there was an error.
946
-					If there was an error, you can look at the messages in the message activity list table for any error messages.', 'event_espresso' ),
945
+					__('No message was sent because of problems with sending. Either all the messages you selected were not a sendable message, they were ALREADY sent on a different scheduled task, or there was an error.
946
+					If there was an error, you can look at the messages in the message activity list table for any error messages.', 'event_espresso'),
947 947
 					__FILE__, __FUNCTION__, __LINE__
948 948
 				);
949 949
 			}
@@ -964,12 +964,12 @@  discard block
 block discarded – undo
964 964
 	 *
965 965
 	 * @return bool  true means messages were successfully queued for resending, false means none were queued for resending.
966 966
 	 */
967
-	public static function queue_for_resending( $message_ids ) {
967
+	public static function queue_for_resending($message_ids) {
968 968
 		self::_load_controller();
969
-		self::$_MSG_PROCESSOR->setup_messages_from_ids_and_send( $message_ids );
969
+		self::$_MSG_PROCESSOR->setup_messages_from_ids_and_send($message_ids);
970 970
 
971 971
 		//get queue and count
972
-		$queue_count = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue( EEM_Message::status_resend );
972
+		$queue_count = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue(EEM_Message::status_resend);
973 973
 
974 974
 		if (
975 975
 			$queue_count > 0
@@ -989,11 +989,11 @@  discard block
 block discarded – undo
989 989
 		 * @see filter usage in EE_Messages_Queue::initiate_request_by_priority
990 990
 		 */
991 991
 		} elseif (
992
-			apply_filters( 'FHEE__EE_Messages_Processor__initiate_request_by_priority__do_immediate_processing', true )
992
+			apply_filters('FHEE__EE_Messages_Processor__initiate_request_by_priority__do_immediate_processing', true)
993 993
 			|| EE_Registry::instance()->NET_CFG->core->do_messages_on_same_request
994 994
 		) {
995
-			$queue_count = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue( EEM_Message::status_sent );
996
-			if ( $queue_count > 0 ) {
995
+			$queue_count = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue(EEM_Message::status_sent);
996
+			if ($queue_count > 0) {
997 997
 				EE_Error::add_success(
998 998
 					sprintf(
999 999
 						_n(
@@ -1007,13 +1007,13 @@  discard block
 block discarded – undo
1007 1007
 				);
1008 1008
 			} else {
1009 1009
 				EE_Error::add_error(
1010
-					__( 'No messages were queued for resending. This usually only happens when all the messages flagged for resending are not a status that can be resent.', 'event_espresso' ),
1010
+					__('No messages were queued for resending. This usually only happens when all the messages flagged for resending are not a status that can be resent.', 'event_espresso'),
1011 1011
 					__FILE__, __FUNCTION__, __LINE__
1012 1012
 				);
1013 1013
 			}
1014 1014
 		} else {
1015 1015
 			EE_Error::add_error(
1016
-				__( 'No messages were queued for resending. This usually only happens when all the messages flagged for resending are not a status that can be resent.', 'event_espresso' ),
1016
+				__('No messages were queued for resending. This usually only happens when all the messages flagged for resending are not a status that can be resent.', 'event_espresso'),
1017 1017
 				__FILE__, __FUNCTION__, __LINE__
1018 1018
 			);
1019 1019
 		}
@@ -1035,16 +1035,16 @@  discard block
 block discarded – undo
1035 1035
 	 * @param array $info
1036 1036
 	 * @param bool $display_request
1037 1037
 	 */
1038
-	protected static function log( $class = '', $func = '', $line = '', EE_Transaction $transaction, $info = array(), $display_request = false ) {
1039
-		if ( WP_DEBUG && false ) {
1040
-			if ( $transaction instanceof EE_Transaction ) {
1038
+	protected static function log($class = '', $func = '', $line = '', EE_Transaction $transaction, $info = array(), $display_request = false) {
1039
+		if (WP_DEBUG && false) {
1040
+			if ($transaction instanceof EE_Transaction) {
1041 1041
 				// don't serialize objects
1042
-				$info = EEH_Debug_Tools::strip_objects( $info );
1042
+				$info = EEH_Debug_Tools::strip_objects($info);
1043 1043
 				$info['TXN_status'] = $transaction->status_ID();
1044 1044
 				$info['TXN_reg_steps'] = $transaction->reg_steps();
1045
-				if ( $transaction->ID() ) {
1046
-					$index = 'EE_Transaction: ' . $transaction->ID();
1047
-					EEH_Debug_Tools::log( $class, $func, $line, $info, $display_request, $index );
1045
+				if ($transaction->ID()) {
1046
+					$index = 'EE_Transaction: '.$transaction->ID();
1047
+					EEH_Debug_Tools::log($class, $func, $line, $info, $display_request, $index);
1048 1048
 				}
1049 1049
 			}
1050 1050
 		}
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -560,7 +560,7 @@
 block discarded – undo
560 560
 	 *
561 561
 	 * @param string  $payment_status The payment status being matched.
562 562
 	 *
563
-	 * @return string|bool The payment message type slug matching the status or false if no match.
563
+	 * @return string|false The payment message type slug matching the status or false if no match.
564 564
 	 */
565 565
 	protected static function _get_payment_message_type( $payment_status ) {
566 566
 		EE_Registry::instance()->load_helper( 'MSG_Template' );
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,9 @@
 block discarded – undo
6 6
  * @package  Event Espresso
7 7
  * @subpackage modules, messages
8 8
  */
9
-if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
9
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
10
+	exit('No direct script access allowed');
11
+}
10 12
 /**
11 13
  *
12 14
  * Messages module.  Takes care of registering all the triggers for messages.
Please login to merge, or discard this patch.
caffeinated/admin/extend/support/Extend_Support_Admin_Page.core.php 2 patches
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
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('NO direct script access allowed');
4 4
 
5 5
 /**
@@ -29,16 +29,16 @@  discard block
 block discarded – undo
29 29
  */
30 30
 class Extend_Support_Admin_Page extends Support_Admin_Page {
31 31
 
32
-	public function __construct( $routing = TRUE ) {
33
-		parent::__construct( $routing );
34
-		define( 'EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND . 'support/templates/' );
32
+	public function __construct($routing = TRUE) {
33
+		parent::__construct($routing);
34
+		define('EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH', EE_CORE_CAF_ADMIN_EXTEND.'support/templates/');
35 35
 	}
36 36
 
37 37
 
38 38
 
39 39
 
40 40
 	protected function _extend_page_config() {
41
-		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND . 'support';
41
+		$this->_admin_base_path = EE_CORE_CAF_ADMIN_EXTEND.'support';
42 42
 		//new routes and new configs (or overrides )
43 43
 		$new_page_routes = array(
44 44
 			'faq' => array(
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 				'capability' => 'ee_read_ee'
47 47
 				)
48 48
 			);
49
-		$this->_page_routes = array_merge( $this->_page_routes, $new_page_routes );
49
+		$this->_page_routes = array_merge($this->_page_routes, $new_page_routes);
50 50
 
51 51
 		$new_page_config = array(
52 52
 			'faq' => array(
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 				'require_nonce' => FALSE
58 58
 				)
59 59
 			);
60
-		$this->_page_config = array_merge( $this->_page_config, $new_page_config );
60
+		$this->_page_config = array_merge($this->_page_config, $new_page_config);
61 61
 
62 62
 		$this->_page_config['default']['metaboxes'][] = '_installation_boxes';
63 63
 	}
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 
67 67
 
68 68
 	protected function _faq() {
69
-		$template_path = EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH . 'support_admin_details_faq.template.php';
70
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, '', TRUE);
69
+		$template_path = EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH.'support_admin_details_faq.template.php';
70
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, '', TRUE);
71 71
 		$this->display_admin_page_with_sidebar();
72 72
 
73 73
 	}
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 
76 76
 
77 77
 	protected function _installation_boxes() {
78
-		$callback_args = array('template_path' => EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH . 'support_admin_details_additional_information.template.php');
79
-		add_meta_box( 'espresso_additional_information_support', __('Additional Information', 'event_espresso'), create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE);' ), $this->_current_screen->id, 'normal', 'high', $callback_args);
78
+		$callback_args = array('template_path' => EE_SUPPORT_CAF_ADMIN_TEMPLATE_PATH.'support_admin_details_additional_information.template.php');
79
+		add_meta_box('espresso_additional_information_support', __('Additional Information', 'event_espresso'), create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE);'), $this->_current_screen->id, 'normal', 'high', $callback_args);
80 80
 	}
81 81
 
82 82
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!defined('EVENT_ESPRESSO_VERSION') )
2
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
3 3
 	exit('NO direct script access allowed');
4
+}
4 5
 
5 6
 /**
6 7
  * Event Espresso
Please login to merge, or discard this patch.
form_sections/strategies/layout/EE_Admin_Two_Column_Layout.strategy.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@  discard block
 block discarded – undo
13 13
 	 *
14 14
 	 * @return string
15 15
 	 */
16
-	public function layout_form_begin( $additional_args = array() ) {
16
+	public function layout_form_begin($additional_args = array()) {
17 17
 		$this->_form_section->set_html_class('form-table');
18
-		return parent::layout_form_begin( $additional_args );
18
+		return parent::layout_form_begin($additional_args);
19 19
 	}
20 20
 
21 21
 
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
 	 * @param EE_Form_Section_Proper $form_section
26 26
 	 * @return string
27 27
 	 */
28
-	public function layout_subsection( $form_section ){
29
-		if ( $form_section instanceof EE_Form_Section_Proper ) {
30
-			return EEH_HTML::no_row( $form_section->get_html(), 2 );
31
-		} else if ( $form_section instanceof EE_Form_Section_HTML ) {
32
-			return EEH_HTML::no_row( $form_section->get_html(), 2 );
28
+	public function layout_subsection($form_section) {
29
+		if ($form_section instanceof EE_Form_Section_Proper) {
30
+			return EEH_HTML::no_row($form_section->get_html(), 2);
31
+		} else if ($form_section instanceof EE_Form_Section_HTML) {
32
+			return EEH_HTML::no_row($form_section->get_html(), 2);
33 33
 		}
34 34
 		return '';
35 35
 	}
@@ -41,30 +41,30 @@  discard block
 block discarded – undo
41 41
 	 * @param EE_Form_Input_Base $input
42 42
 	 * @return string
43 43
 	 */
44
-	public function layout_input( $input ) {
44
+	public function layout_input($input) {
45 45
 
46 46
 		if (
47 47
 			$input->get_display_strategy() instanceof EE_Text_Area_Display_Strategy ||
48 48
 			$input->get_display_strategy() instanceof EE_Text_Input_Display_Strategy ||
49 49
 			$input->get_display_strategy() instanceof EE_Admin_File_Uploader_Display_Strategy
50 50
 		) {
51
-			$input->set_html_class( $input->html_class() . ' large-text' );
51
+			$input->set_html_class($input->html_class().' large-text');
52 52
 		}
53
-		if ( $input instanceof EE_Text_Area_Input ) {
54
-			$input->set_rows( 4 );
55
-			$input->set_cols( 60 );
53
+		if ($input instanceof EE_Text_Area_Input) {
54
+			$input->set_rows(4);
55
+			$input->set_cols(60);
56 56
 		}
57 57
 		$input_html = $input->get_html_for_input();
58 58
 		// maybe add errors and help text ?
59
-		$input_html .= $input->get_html_for_errors() != '' ? EEH_HTML::nl() . $input->get_html_for_errors() : '';
60
-		$input_html .= $input->get_html_for_help() != '' ? EEH_HTML::nl() . $input->get_html_for_help() : '';
59
+		$input_html .= $input->get_html_for_errors() != '' ? EEH_HTML::nl().$input->get_html_for_errors() : '';
60
+		$input_html .= $input->get_html_for_help() != '' ? EEH_HTML::nl().$input->get_html_for_help() : '';
61 61
 		//overriding parent to add wp admin specific things.
62 62
 		$html = '';
63
-		if ( $input instanceof EE_Hidden_Input ) {
64
-			$html .= EEH_HTML::no_row( $input->get_html_for_input(), 2 );
63
+		if ($input instanceof EE_Hidden_Input) {
64
+			$html .= EEH_HTML::no_row($input->get_html_for_input(), 2);
65 65
 		} else {
66 66
 			$html .= EEH_HTML::tr(
67
-				EEH_HTML::th( $input->get_html_for_label(), '', '',  '', 'scope="row"' ) . EEH_HTML::td( $input_html )
67
+				EEH_HTML::th($input->get_html_for_label(), '', '', '', 'scope="row"').EEH_HTML::td($input_html)
68 68
 			);
69 69
 		}
70 70
 		return $html;
Please login to merge, or discard this patch.