Completed
Branch BUG-10381-asset-loading (2d15a5)
by
unknown
127:00 queued 116:19
created
core/libraries/messages/message_type/EE_Receipt_message_type.class.php 3 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@
 block discarded – undo
5 5
  * @subpackage messages
6 6
  * @since           4.5.0
7 7
  */
8
-if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
8
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
9
+	exit('No direct script access allowed');
10
+}
9 11
 
10 12
 /**
11 13
  * The message type for transaction receipts.
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
 
57 57
 	protected function _set_admin_pages() {
58
-		$this->admin_registered_pages = array( 'events_edit' => TRUE );
58
+		$this->admin_registered_pages = array('events_edit' => TRUE);
59 59
 	}
60 60
 
61 61
 
@@ -68,17 +68,17 @@  discard block
 block discarded – undo
68 68
 
69 69
 	protected function _set_with_messengers() {
70 70
 		$this->_with_messengers = array(
71
-			'html' => array( 'pdf' )
71
+			'html' => array('pdf')
72 72
 		);
73 73
 	}
74 74
 
75 75
 
76 76
 
77
-	protected function _get_data_for_context( $context, EE_Registration $registration, $id ) {
77
+	protected function _get_data_for_context($context, EE_Registration $registration, $id) {
78 78
 		//receipt message type data handler is 'Gateways' and it expects a transaction object.
79 79
 		$transaction = $registration->transaction();
80
-		if ( $transaction instanceof EE_Transaction ) {
81
-			return array( $transaction );
80
+		if ($transaction instanceof EE_Transaction) {
81
+			return array($transaction);
82 82
 		}
83 83
 		return array();
84 84
 	}
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	* @return  void
118 118
 	*/
119 119
 	protected function _set_valid_shortcodes() {
120
-		$this->_valid_shortcodes[ 'purchaser' ] = array(
120
+		$this->_valid_shortcodes['purchaser'] = array(
121 121
 			'attendee_list',
122 122
 			'attendee',
123 123
 			'datetime_list',
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -110,12 +110,12 @@
 block discarded – undo
110 110
 
111 111
 
112 112
 	/**
113
-	* used to set the valid shortcodes for the receipt message type
114
-	*
115
-	* @since   4.5.0
116
-	*
117
-	* @return  void
118
-	*/
113
+	 * used to set the valid shortcodes for the receipt message type
114
+	 *
115
+	 * @since   4.5.0
116
+	 *
117
+	 * @return  void
118
+	 */
119 119
 	protected function _set_valid_shortcodes() {
120 120
 		$this->_valid_shortcodes[ 'purchaser' ] = array(
121 121
 			'attendee_list',
Please login to merge, or discard this patch.
messages/message_type/EE_Registration_Summary_message_type.class.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION') )
3
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
4 4
 	exit('NO direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  *
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 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
 /**
Please login to merge, or discard this patch.
messages/validators/html/EE_Messages_Html_Invoice_Validator.class.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
10 10
 	exit('NO direct script access allowed');
11 11
 
12 12
 /**
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
  */
25 25
 class EE_Messages_Html_Invoice_Validator extends EE_Messages_Validator {
26 26
 
27
-	public function __construct( $fields, $context ) {
27
+	public function __construct($fields, $context) {
28 28
 		$this->_m_name = 'html';
29 29
 		$this->_mt_name = 'invoice';
30 30
 
31
-		parent::__construct( $fields, $context );
31
+		parent::__construct($fields, $context);
32 32
 	}
33 33
 
34 34
 	/**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
messages/validators/html/EE_Messages_Html_Receipt_Validator.class.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
10 10
 	exit('NO direct script access allowed');
11 11
 
12 12
 /**
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
  */
25 25
 class EE_Messages_Html_Receipt_Validator extends EE_Messages_Validator {
26 26
 
27
-	public function __construct( $fields, $context ) {
27
+	public function __construct($fields, $context) {
28 28
 		$this->_m_name = 'html';
29 29
 		$this->_mt_name = 'receipt';
30 30
 
31
-		parent::__construct( $fields, $context );
31
+		parent::__construct($fields, $context);
32 32
 	}
33 33
 
34 34
 	/**
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,8 +6,9 @@
 block discarded – undo
6 6
  * @package Event Espresso
7 7
  * @subpackage messages
8 8
  */
9
-if (!defined('EVENT_ESPRESSO_VERSION') )
9
+if (!defined('EVENT_ESPRESSO_VERSION') ) {
10 10
 	exit('NO direct script access allowed');
11
+}
11 12
 
12 13
 /**
13 14
  *
Please login to merge, or discard this patch.
core/libraries/payment_methods/EE_Gateway.lib.php 3 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -214,7 +214,7 @@
 block discarded – undo
214 214
 		if($payment instanceof EEI_Payment){
215 215
 			$type='Payment';
216 216
 			$id = $payment->ID();
217
-		}else{
217
+		} else{
218 218
 			$type = 'Payment_Method';
219 219
 			$id = $this->_ID;
220 220
 		}
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@
 block discarded – undo
282 282
 	/**
283 283
 	 * Gets the first event for this payment (it's possible that it could be for multiple)
284 284
 	 * @param EEI_Payment $payment
285
-	 * @return EEI_Event|null
285
+	 * @return EE_Event|null
286 286
 	 */
287 287
 	protected function _get_first_event_for_payment( EEI_Payment $payment ) {
288 288
 		$transaction = $payment->transaction();
Please login to merge, or discard this patch.
Spacing   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
  * @subpackage		core/libraries/payment_methods
16 16
  * @author			Mike Nelson
17 17
  */
18
-abstract class EE_Gateway{
18
+abstract class EE_Gateway {
19 19
 	/**
20 20
 	 * a constant used as a possible value for $_currencies_supported to indicate
21 21
 	 * that ALL currencies are supported by this gateway
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 	/**
94 94
 	 * @return EE_Gateway
95 95
 	 */
96
-	public function __construct(){
96
+	public function __construct() {
97 97
 	}
98 98
 
99 99
 	/**
@@ -105,9 +105,9 @@  discard block
 block discarded – undo
105 105
 	 * beginning again)
106 106
 	 * @return array
107 107
 	 */
108
-	public function __sleep(){
108
+	public function __sleep() {
109 109
 		$properties = get_object_vars($this);
110
-		unset( $properties[ '_pay_model' ], $properties[ '_pay_log' ] );
110
+		unset($properties['_pay_model'], $properties['_pay_log']);
111 111
 		return array_keys($properties);
112 112
 	}
113 113
 	/**
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * see $_supports_sending_refunds
116 116
 	 * @return boolean
117 117
 	 */
118
-	public function supports_sending_refunds(){
118
+	public function supports_sending_refunds() {
119 119
 		return $this->_supports_sending_refunds;
120 120
 	}
121 121
 	/**
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 	 * see $_supports_receiving_refunds
124 124
 	 * @return boolean
125 125
 	 */
126
-	public function supports_receiving_refunds(){
126
+	public function supports_receiving_refunds() {
127 127
 		return $this->_supports_receiving_refunds;
128 128
 	}
129 129
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	 * @return EE_Payment for the refund
139 139
 	 * @throws EE_Error
140 140
 	 */
141
-	public function do_direct_refund( EE_Payment $payment, $refund_info = null ) {
141
+	public function do_direct_refund(EE_Payment $payment, $refund_info = null) {
142 142
 		return NULL;
143 143
 	}
144 144
 
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
 	 * etc
150 150
 	 * @param array $settings_array
151 151
 	 */
152
-	public function set_settings($settings_array){
153
-		foreach($settings_array as $name => $value){
152
+	public function set_settings($settings_array) {
153
+		foreach ($settings_array as $name => $value) {
154 154
 			$property_name = "_".$name;
155 155
 			$this->{$property_name} = $value;
156 156
 		}
@@ -159,14 +159,14 @@  discard block
 block discarded – undo
159 159
 	 * See this class description
160 160
 	 * @param EEMI_Payment $payment_model
161 161
 	 */
162
-	public function set_payment_model($payment_model){
162
+	public function set_payment_model($payment_model) {
163 163
 		$this->_pay_model = $payment_model;
164 164
 	}
165 165
 	/**
166 166
 	 * See this class description
167 167
 	 * @param EEMI_Payment_Log $payment_log_model
168 168
 	 */
169
-	public function set_payment_log($payment_log_model){
169
+	public function set_payment_log($payment_log_model) {
170 170
 		$this->_pay_log = $payment_log_model;
171 171
 	}
172 172
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 	 * See this class description
175 175
 	 * @param EEHI_Template $template_helper
176 176
 	 */
177
-	public function set_template_helper($template_helper){
177
+	public function set_template_helper($template_helper) {
178 178
 		$this->_template = $template_helper;
179 179
 	}
180 180
 
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 	 * See this class description
183 183
 	 * @param EEHI_Line_Item $line_item_helper
184 184
 	 */
185
-	public function set_line_item_helper( $line_item_helper ){
185
+	public function set_line_item_helper($line_item_helper) {
186 186
 		$this->_line_item = $line_item_helper;
187 187
 	}
188 188
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 	 * See this class description
191 191
 	 * @param EEHI_Money $money_helper
192 192
 	 */
193
-	public function set_money_helper( $money_helper ){
193
+	public function set_money_helper($money_helper) {
194 194
 		$this->_money = $money_helper;
195 195
 	}
196 196
 
@@ -199,23 +199,23 @@  discard block
 block discarded – undo
199 199
 	 * @param $message
200 200
 	 * @param $payment
201 201
 	 */
202
-	public function log($message,$payment){
203
-		if($payment instanceof EEI_Payment){
204
-			$type='Payment';
202
+	public function log($message, $payment) {
203
+		if ($payment instanceof EEI_Payment) {
204
+			$type = 'Payment';
205 205
 			$id = $payment->ID();
206
-		}else{
206
+		} else {
207 207
 			$type = 'Payment_Method';
208 208
 			$id = $this->_ID;
209 209
 		}
210
-		$this->_pay_log->gateway_log($message,$id,$type);
210
+		$this->_pay_log->gateway_log($message, $id, $type);
211 211
 	}
212 212
 	/**
213 213
 	 * Formats the amount so it can generally be sent to gateways
214 214
 	 * @param float $amount
215 215
 	 * @return string
216 216
 	 */
217
-	public function format_currency($amount){
218
-		return number_format( $amount, 2, '.', '' );
217
+	public function format_currency($amount) {
218
+		return number_format($amount, 2, '.', '');
219 219
 //		return $this->_template->format_currency($amount, true);
220 220
 	}
221 221
 
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 	 * or a string indicating they're all supported (EE_gateway::all_currencies_supported)
225 225
 	 * @return mixed array or string
226 226
 	 */
227
-	public function currencies_supported(){
227
+	public function currencies_supported() {
228 228
 		return $this->_currencies_supported;
229 229
 	}
230 230
 
@@ -236,14 +236,14 @@  discard block
 block discarded – undo
236 236
 	 * @param EE_Transaction  $transaction
237 237
 	 * @return float
238 238
 	 */
239
-	protected function _sum_items_and_taxes( EE_Transaction  $transaction){
239
+	protected function _sum_items_and_taxes(EE_Transaction  $transaction) {
240 240
 		$total_line_item = $transaction->total_line_item();
241 241
 		$total = 0;
242
-		foreach($total_line_item->get_items() as $item_line_item ){
243
-			$total += max( $item_line_item->total(), 0 );
242
+		foreach ($total_line_item->get_items() as $item_line_item) {
243
+			$total += max($item_line_item->total(), 0);
244 244
 		}
245
-		foreach($total_line_item->tax_descendants() as $tax_line_item ){
246
-			$total += max( $tax_line_item->total(), 0 );
245
+		foreach ($total_line_item->tax_descendants() as $tax_line_item) {
246
+			$total += max($tax_line_item->total(), 0);
247 247
 		}
248 248
 		return $total;
249 249
 	}
@@ -254,9 +254,9 @@  discard block
 block discarded – undo
254 254
 	 * @param EEI_Payment $payment
255 255
 	 * @return boolean
256 256
 	 */
257
-	protected function _can_easily_itemize_transaction_for( EEI_Payment $payment ){
257
+	protected function _can_easily_itemize_transaction_for(EEI_Payment $payment) {
258 258
 		return  $this->_money->compare_floats(
259
-					$this->_sum_items_and_taxes( $payment->transaction() ),
259
+					$this->_sum_items_and_taxes($payment->transaction()),
260 260
 					$payment->transaction()->total() ) &&
261 261
 				$this->_money->compare_floats(
262 262
 					$payment->amount(),
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 	 * @param EE_Payment $payment
275 275
 	 * @return void
276 276
 	 */
277
-	public function update_txn_based_on_payment( $payment ){
277
+	public function update_txn_based_on_payment($payment) {
278 278
 		//maybe update the transaction or line items or registrations
279 279
 		//but most gateways don't need to do this, because they only update the payment
280 280
 	}
@@ -284,11 +284,11 @@  discard block
 block discarded – undo
284 284
 	 * @param EEI_Payment $payment
285 285
 	 * @return EEI_Event|null
286 286
 	 */
287
-	protected function _get_first_event_for_payment( EEI_Payment $payment ) {
287
+	protected function _get_first_event_for_payment(EEI_Payment $payment) {
288 288
 		$transaction = $payment->transaction();
289
-		if( $transaction instanceof EEI_Transaction ) {
289
+		if ($transaction instanceof EEI_Transaction) {
290 290
 			$primary_registrant = $transaction->primary_registration();
291
-			if( $primary_registrant instanceof EE_Registration ) {
291
+			if ($primary_registrant instanceof EE_Registration) {
292 292
 				return $primary_registrant->event_obj();
293 293
 			}
294 294
 		}
@@ -300,19 +300,19 @@  discard block
 block discarded – undo
300 300
 	 * @param EEI_Payment $payment
301 301
 	 * @return string
302 302
 	 */
303
-	protected function _get_first_event_name_for_payment( EEI_Payment $payment ) {
304
-		$event = $this->_get_first_event_for_payment( $payment );
305
-		return $event instanceof EEI_Event ? $event->name() : __( 'Event', 'event_espresso' );
303
+	protected function _get_first_event_name_for_payment(EEI_Payment $payment) {
304
+		$event = $this->_get_first_event_for_payment($payment);
305
+		return $event instanceof EEI_Event ? $event->name() : __('Event', 'event_espresso');
306 306
 	}
307 307
 	/**
308 308
 	 * Gets the text to use for a gateway's line item name when this is a partial payment
309 309
 	 * @param EE_Payment $payment
310 310
 	 * @return string
311 311
 	 */
312
-	protected function _format_partial_payment_line_item_name( EEI_Payment $payment ){
312
+	protected function _format_partial_payment_line_item_name(EEI_Payment $payment) {
313 313
 		return apply_filters( 
314 314
 			'EEG_Paypal_Pro__do_direct_payment__partial_amount_line_item_name', 
315
-			$this->_get_first_event_name_for_payment( $payment ), 
315
+			$this->_get_first_event_name_for_payment($payment), 
316 316
 			$this,
317 317
 			$payment
318 318
 		);
@@ -322,13 +322,13 @@  discard block
 block discarded – undo
322 322
 	 * @param EEI_Payment $payment
323 323
 	 * @return string
324 324
 	 */
325
-	protected function _format_partial_payment_line_item_desc( EEI_Payment $payment ) {
325
+	protected function _format_partial_payment_line_item_desc(EEI_Payment $payment) {
326 326
 		return apply_filters(
327 327
 			'FHEE__EE_Gateway___partial_payment_desc',
328 328
 			sprintf(
329 329
 				__("Payment of %s for %s", "event_espresso"), 
330
-				$payment->get_pretty( 'PAY_amount', 'no_currency_code' ), 
331
-				$this->_get_first_event_name_for_payment( $payment ) ),
330
+				$payment->get_pretty('PAY_amount', 'no_currency_code'), 
331
+				$this->_get_first_event_name_for_payment($payment) ),
332 332
 			$this,
333 333
 			$payment
334 334
 		);
@@ -340,10 +340,10 @@  discard block
 block discarded – undo
340 340
 	 * @param EEI_Payment $payment
341 341
 	 * @return string
342 342
 	 */
343
-	protected function _format_line_item_name( EEI_Line_Item $line_item, EEI_Payment $payment ) {
343
+	protected function _format_line_item_name(EEI_Line_Item $line_item, EEI_Payment $payment) {
344 344
 		return apply_filters( 
345 345
 			'FHEE__EE_gateway___line_item_name', 
346
-			sprintf( _x( '%1$s for %2$s', 'Ticket for Event', 'event_espresso' ), $line_item->name(), $line_item->ticket_event_name() ), 
346
+			sprintf(_x('%1$s for %2$s', 'Ticket for Event', 'event_espresso'), $line_item->name(), $line_item->ticket_event_name()), 
347 347
 			$this,
348 348
 			$line_item, 
349 349
 			$payment 
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
 	 * @param EEI_Payment $payment
357 357
 	 * @return string
358 358
 	 */
359
-	protected function _format_line_item_desc( EEI_Line_Item $line_item, EEI_Payment $payment ) {
359
+	protected function _format_line_item_desc(EEI_Line_Item $line_item, EEI_Payment $payment) {
360 360
 		return apply_filters( 
361 361
 			'FHEE__EE_Gateway___line_item_desc', 
362 362
 			$line_item->desc(), 
@@ -371,13 +371,13 @@  discard block
 block discarded – undo
371 371
 	 * @param EEI_Payment $payment
372 372
 	 * @return type
373 373
 	 */
374
-	protected function _format_order_description( EEI_Payment $payment ) {
374
+	protected function _format_order_description(EEI_Payment $payment) {
375 375
 		return apply_filters( 
376 376
 			'FHEE__EE_Gateway___order_description',
377 377
 			sprintf(
378 378
 				__('Event Registrations from %1$s for %2$s', "event_espresso"),
379 379
 				get_bloginfo('name'),
380
-				$this->_get_first_event_name_for_payment( $payment ) ),
380
+				$this->_get_first_event_name_for_payment($payment) ),
381 381
 			$this,
382 382
 			$payment
383 383
 		);
Please login to merge, or discard this patch.
core/libraries/payment_methods/EE_Onsite_Gateway.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  *
25 25
  * ------------------------------------------------------------------------
26 26
  */
27
-abstract class EE_Onsite_Gateway extends EE_Gateway{
27
+abstract class EE_Onsite_Gateway extends EE_Gateway {
28 28
 
29 29
 	/**
30 30
 	 * @return EE_Onsite_Gateway
@@ -53,5 +53,5 @@  discard block
 block discarded – undo
53 53
 	 * } unless a child class specifies these array keys are NOT present
54 54
 	 * @return EE_Payment updated
55 55
 	 */
56
-	public abstract function do_direct_payment($payment,$billing_info = null);
56
+	public abstract function do_direct_payment($payment, $billing_info = null);
57 57
 }
Please login to merge, or discard this patch.
libraries/payment_methods/templates/payment_details_content.template.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,10 +2,10 @@
 block discarded – undo
2 2
 if (!defined('EVENT_ESPRESSO_VERSION'))
3 3
 	exit('No direct script access allowed');
4 4
 /**
5
- * payment_details_content
6
- * @var EE_Payment $payment
7
- * @var EE_Payment_Method $payment_method
8
- */
5
+	 * payment_details_content
6
+	 * @var EE_Payment $payment
7
+	 * @var EE_Payment_Method $payment_method
8
+	 */
9 9
 $gateway_response = $payment->gateway_response();
10 10
 if ( ! empty( $gateway_response )) {
11 11
 	echo '<span class="error payment-problem">' . $gateway_response . '</span>';
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 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
  * payment_details_content
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  * @var EE_Payment_Method $payment_method
8 8
  */
9 9
 $gateway_response = $payment->gateway_response();
10
-if ( ! empty( $gateway_response )) {
11
-	echo '<span class="error payment-problem">' . $gateway_response . '</span>';
10
+if ( ! empty($gateway_response)) {
11
+	echo '<span class="error payment-problem">'.$gateway_response.'</span>';
12 12
 }
13 13
 // End of file payment_details_content.template.php
14 14
\ No newline at end of file
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
  * payment_details_content
6 7
  * @var EE_Payment $payment
Please login to merge, or discard this patch.
core/libraries/plugin_api/EEI_Plugin_API.lib.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	 * @param array  $setup_args  an array of key value pairs of info for registering the component
35 35
 	 * @return void
36 36
 	 */
37
-	public static function register( $ID = NULL, $setup_args = array() );
37
+	public static function register($ID = NULL, $setup_args = array());
38 38
 
39 39
 
40 40
 
@@ -45,5 +45,5 @@  discard block
 block discarded – undo
45 45
 	 * @param string $ID a unique name or ID for the component being registered
46 46
 	 * @return void
47 47
 	 */
48
-	public static function deregister( $ID = NULL );
48
+	public static function deregister($ID = NULL);
49 49
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@
 block discarded – undo
5 5
  * @subpackage helpers
6 6
  * @since           4.3.0
7 7
  */
8
-if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
8
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
9
+	exit('No direct script access allowed');
10
+}
9 11
 
10 12
 /**
11 13
  * This interface is used to define the common methods shared by all "plugin api" classes.
Please login to merge, or discard this patch.
core/libraries/plugin_api/EE_Register_Admin_Page.lib.php 3 patches
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -18,30 +18,30 @@  discard block
 block discarded – undo
18 18
 class EE_Register_Admin_Page implements EEI_Plugin_API {
19 19
 
20 20
 
21
-    /**
22
-     * Holds registered EE_Admin_Pages
23
-     * @var array
24
-     */
25
-    protected static $_ee_admin_page_registry = array();
21
+	/**
22
+	 * Holds registered EE_Admin_Pages
23
+	 * @var array
24
+	 */
25
+	protected static $_ee_admin_page_registry = array();
26 26
 
27 27
 
28 28
 
29 29
 
30
-    /**
31
-     * The purpose of this method is to provide an easy way for addons to register their admin pages (using the EE Admin Page loader system).
32
-     *
33
-     * @since 4.3.0
34
-     *
30
+	/**
31
+	 * The purpose of this method is to provide an easy way for addons to register their admin pages (using the EE Admin Page loader system).
32
+	 *
33
+	 * @since 4.3.0
34
+	 *
35 35
 	 * @param  string $page_basename 	This string represents the basename of the Admin Page init.
36 36
 	 *                                                        		The init file must use this basename in its name and class (i.e. {page_basename}_Admin_Page_Init.core.php).
37
-     * @param  array  $config  {              An array of configuration options that will be used in different circumstances
37
+	 * @param  array  $config  {              An array of configuration options that will be used in different circumstances
38 38
 	 *
39 39
 	 *		@type  string $page_path             This is the path where the registered admin pages reside ( used to setup autoloaders).
40 40
 	 *
41 41
 	 * 	}
42
-     * @return void
43
-     */
44
-    public static function register( $page_basename = NULL, $config = array() ) {
42
+	 * @return void
43
+	 */
44
+	public static function register( $page_basename = NULL, $config = array() ) {
45 45
 
46 46
 		// check that an admin_page has not already been registered with that name
47 47
 		if ( isset(self::$_ee_admin_page_registry[ $page_basename ] )) {
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 		}
60 60
 
61 61
 		if ( ! did_action( 'AHEE__EE_System__load_espresso_addons' ) || did_action( 'AHEE__EE_Admin__loaded' )) {
62
-            EE_Error::doing_it_wrong(
62
+			EE_Error::doing_it_wrong(
63 63
 				__METHOD__,
64 64
 				sprintf(
65 65
 					__('An attempt was made to register "%s" as an EE Admin page has failed because it was not registered at the correct time.  Please use the "AHEE__EE_Admin__loaded" hook to register Admin pages.','event_espresso'),
@@ -67,36 +67,36 @@  discard block
 block discarded – undo
67 67
 				),
68 68
 				'4.3'
69 69
 			);
70
-        }
70
+		}
71 71
 
72
-        //add incoming stuff to our registry property
73
-        self::$_ee_admin_page_registry[ $page_basename ] = array(
74
-            'page_path' => $config['page_path'],
75
-            'config' => $config
76
-            );
72
+		//add incoming stuff to our registry property
73
+		self::$_ee_admin_page_registry[ $page_basename ] = array(
74
+			'page_path' => $config['page_path'],
75
+			'config' => $config
76
+			);
77 77
 
78
-       //add filters
78
+	   //add filters
79 79
 
80
-       add_filter('FHEE__EE_Admin_Page_Loader___get_installed_pages__installed_refs', array( 'EE_Register_Admin_Page', 'set_page_basename' ), 10 );
81
-       add_filter('FHEE__EEH_Autoloader__load_admin_core', array( 'EE_Register_Admin_Page', 'set_page_path' ), 10 );
80
+	   add_filter('FHEE__EE_Admin_Page_Loader___get_installed_pages__installed_refs', array( 'EE_Register_Admin_Page', 'set_page_basename' ), 10 );
81
+	   add_filter('FHEE__EEH_Autoloader__load_admin_core', array( 'EE_Register_Admin_Page', 'set_page_path' ), 10 );
82 82
 
83
-    }
83
+	}
84 84
 
85 85
 
86 86
 
87
-    /**
88
-     * This deregisters a EE_Admin page that is already registered.  Note, this MUST be loaded after the
89
-     * page being deregistered is loaded.
90
-     *
91
-     * @since    4.3.0
92
-     *
93
-     * @param  string $page_basename Use whatever string was used to register the admin page.
94
-     * @return  void
95
-     */
96
-    public static function deregister( $page_basename = NULL ) {
97
-    	if ( !empty( self::$_ee_admin_page_registry[$page_basename] ) )
98
-    		unset( self::$_ee_admin_page_registry[$page_basename] );
99
-    }
87
+	/**
88
+	 * This deregisters a EE_Admin page that is already registered.  Note, this MUST be loaded after the
89
+	 * page being deregistered is loaded.
90
+	 *
91
+	 * @since    4.3.0
92
+	 *
93
+	 * @param  string $page_basename Use whatever string was used to register the admin page.
94
+	 * @return  void
95
+	 */
96
+	public static function deregister( $page_basename = NULL ) {
97
+		if ( !empty( self::$_ee_admin_page_registry[$page_basename] ) )
98
+			unset( self::$_ee_admin_page_registry[$page_basename] );
99
+	}
100 100
 
101 101
 
102 102
 
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
 				$installed_refs[ $basename ] = $args['page_path'];
113 113
 			}
114 114
 		}
115
-        return $installed_refs;
116
-    }
115
+		return $installed_refs;
116
+	}
117 117
 
118 118
 
119 119
 
@@ -124,9 +124,9 @@  discard block
 block discarded – undo
124 124
 	 * @return mixed
125 125
 	 */
126 126
 	public static function set_page_path( $paths ) {
127
-        foreach ( self::$_ee_admin_page_registry as $basename => $args ) {
128
-            $paths[ $basename ] = $args['page_path'];
129
-        }
130
-        return $paths;
131
-    }
127
+		foreach ( self::$_ee_admin_page_registry as $basename => $args ) {
128
+			$paths[ $basename ] = $args['page_path'];
129
+		}
130
+		return $paths;
131
+	}
132 132
 }
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -41,28 +41,28 @@  discard block
 block discarded – undo
41 41
 	 * 	}
42 42
      * @return void
43 43
      */
44
-    public static function register( $page_basename = NULL, $config = array() ) {
44
+    public static function register($page_basename = NULL, $config = array()) {
45 45
 
46 46
 		// check that an admin_page has not already been registered with that name
47
-		if ( isset(self::$_ee_admin_page_registry[ $page_basename ] )) {
48
-			throw new EE_Error( sprintf( __( 'An Admin Page with the name "%s" has already been registered and each Admin Page requires a unique name.', 'event_espresso' ), $page_basename ));
47
+		if (isset(self::$_ee_admin_page_registry[$page_basename])) {
48
+			throw new EE_Error(sprintf(__('An Admin Page with the name "%s" has already been registered and each Admin Page requires a unique name.', 'event_espresso'), $page_basename));
49 49
 		}
50 50
 
51 51
 		// required fields MUST be present, so let's make sure they are.
52
-		if ( empty( $page_basename ) || ! is_array( $config ) || empty( $config['page_path'] )) {
53
-			throw new EE_Error( __( 'In order to register an Admin Page with EE_Register_Admin_Page::register(), you must include the "page_basename" (the class name of the page), and an array containing the following keys: "page_path" (the path where the registered admin pages reside)', 'event_espresso' ));
52
+		if (empty($page_basename) || ! is_array($config) || empty($config['page_path'])) {
53
+			throw new EE_Error(__('In order to register an Admin Page with EE_Register_Admin_Page::register(), you must include the "page_basename" (the class name of the page), and an array containing the following keys: "page_path" (the path where the registered admin pages reside)', 'event_espresso'));
54 54
 		}
55 55
 
56 56
 		//make sure we don't register twice
57
-		if( isset( self::$_ee_admin_page_registry[ $page_basename ] ) ){
57
+		if (isset(self::$_ee_admin_page_registry[$page_basename])) {
58 58
 			return;
59 59
 		}
60 60
 
61
-		if ( ! did_action( 'AHEE__EE_System__load_espresso_addons' ) || did_action( 'AHEE__EE_Admin__loaded' )) {
61
+		if ( ! did_action('AHEE__EE_System__load_espresso_addons') || did_action('AHEE__EE_Admin__loaded')) {
62 62
             EE_Error::doing_it_wrong(
63 63
 				__METHOD__,
64 64
 				sprintf(
65
-					__('An attempt was made to register "%s" as an EE Admin page has failed because it was not registered at the correct time.  Please use the "AHEE__EE_Admin__loaded" hook to register Admin pages.','event_espresso'),
65
+					__('An attempt was made to register "%s" as an EE Admin page has failed because it was not registered at the correct time.  Please use the "AHEE__EE_Admin__loaded" hook to register Admin pages.', 'event_espresso'),
66 66
 					$page_basename
67 67
 				),
68 68
 				'4.3'
@@ -70,15 +70,15 @@  discard block
 block discarded – undo
70 70
         }
71 71
 
72 72
         //add incoming stuff to our registry property
73
-        self::$_ee_admin_page_registry[ $page_basename ] = array(
73
+        self::$_ee_admin_page_registry[$page_basename] = array(
74 74
             'page_path' => $config['page_path'],
75 75
             'config' => $config
76 76
             );
77 77
 
78 78
        //add filters
79 79
 
80
-       add_filter('FHEE__EE_Admin_Page_Loader___get_installed_pages__installed_refs', array( 'EE_Register_Admin_Page', 'set_page_basename' ), 10 );
81
-       add_filter('FHEE__EEH_Autoloader__load_admin_core', array( 'EE_Register_Admin_Page', 'set_page_path' ), 10 );
80
+       add_filter('FHEE__EE_Admin_Page_Loader___get_installed_pages__installed_refs', array('EE_Register_Admin_Page', 'set_page_basename'), 10);
81
+       add_filter('FHEE__EEH_Autoloader__load_admin_core', array('EE_Register_Admin_Page', 'set_page_path'), 10);
82 82
 
83 83
     }
84 84
 
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
      * @param  string $page_basename Use whatever string was used to register the admin page.
94 94
      * @return  void
95 95
      */
96
-    public static function deregister( $page_basename = NULL ) {
97
-    	if ( !empty( self::$_ee_admin_page_registry[$page_basename] ) )
98
-    		unset( self::$_ee_admin_page_registry[$page_basename] );
96
+    public static function deregister($page_basename = NULL) {
97
+    	if ( ! empty(self::$_ee_admin_page_registry[$page_basename]))
98
+    		unset(self::$_ee_admin_page_registry[$page_basename]);
99 99
     }
100 100
 
101 101
 
@@ -106,10 +106,10 @@  discard block
 block discarded – undo
106 106
 	 * @param $installed_refs
107 107
 	 * @return mixed
108 108
 	 */
109
-	public static function set_page_basename( $installed_refs ) {
110
-		if ( ! empty( self::$_ee_admin_page_registry )) {
111
-			foreach ( self::$_ee_admin_page_registry as $basename => $args ) {
112
-				$installed_refs[ $basename ] = $args['page_path'];
109
+	public static function set_page_basename($installed_refs) {
110
+		if ( ! empty(self::$_ee_admin_page_registry)) {
111
+			foreach (self::$_ee_admin_page_registry as $basename => $args) {
112
+				$installed_refs[$basename] = $args['page_path'];
113 113
 			}
114 114
 		}
115 115
         return $installed_refs;
@@ -123,9 +123,9 @@  discard block
 block discarded – undo
123 123
 	 * @param $paths
124 124
 	 * @return mixed
125 125
 	 */
126
-	public static function set_page_path( $paths ) {
127
-        foreach ( self::$_ee_admin_page_registry as $basename => $args ) {
128
-            $paths[ $basename ] = $args['page_path'];
126
+	public static function set_page_path($paths) {
127
+        foreach (self::$_ee_admin_page_registry as $basename => $args) {
128
+            $paths[$basename] = $args['page_path'];
129 129
         }
130 130
         return $paths;
131 131
     }
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -5,7 +5,9 @@  discard block
 block discarded – undo
5 5
  * @subpackage helpers
6 6
  * @since           4.3.0
7 7
  */
8
-if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
8
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
9
+	exit('No direct script access allowed');
10
+}
9 11
 
10 12
 /**
11 13
  * Use this to register or deregister an EE Admin Page.
@@ -94,8 +96,9 @@  discard block
 block discarded – undo
94 96
      * @return  void
95 97
      */
96 98
     public static function deregister( $page_basename = NULL ) {
97
-    	if ( !empty( self::$_ee_admin_page_registry[$page_basename] ) )
98
-    		unset( self::$_ee_admin_page_registry[$page_basename] );
99
+    	if ( !empty( self::$_ee_admin_page_registry[$page_basename] ) ) {
100
+    	    		unset( self::$_ee_admin_page_registry[$page_basename] );
101
+    	}
99 102
     }
100 103
 
101 104
 
Please login to merge, or discard this patch.