Completed
Branch BUG/11214/move-command-handler... (de017e)
by
unknown
04:20 queued 02:32
created
core/libraries/messages/defaults/default/email_main_wrapper.template.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -7,13 +7,13 @@
 block discarded – undo
7 7
 	<!-- Facebook sharing information tags -->
8 8
 	<meta property="og:title" content="<?php echo $subject; ?>" />
9 9
 	<title><?php echo $subject; ?></title>
10
-	<?php do_action( 'AHEE__EE_Email_Messenger_main_wrapper_template_head', $message_type, $subject, $from, $main_body ); ?>
10
+	<?php do_action('AHEE__EE_Email_Messenger_main_wrapper_template_head', $message_type, $subject, $from, $main_body); ?>
11 11
 </head>
12
-<?php do_action( 'AHEE__EE_Email_Messenger_main_wrapper_template_header', $message_type, $subject, $from, $main_body ); ?>
12
+<?php do_action('AHEE__EE_Email_Messenger_main_wrapper_template_header', $message_type, $subject, $from, $main_body); ?>
13 13
 <body bgcolor="#FFFFFF" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
14
-<?php do_action( 'AHEE__EE_Email_Messenger_main_wrapper_template_before_main_body', $message_type, $subject, $from, $main_body ); ?>
14
+<?php do_action('AHEE__EE_Email_Messenger_main_wrapper_template_before_main_body', $message_type, $subject, $from, $main_body); ?>
15 15
 <?php echo $main_body; ?>
16
-<?php do_action( 'AHEE__EE_Email_Messenger_main_wrapper_template_after_main_body', $message_type, $subject, $from, $main_body ); ?>
16
+<?php do_action('AHEE__EE_Email_Messenger_main_wrapper_template_after_main_body', $message_type, $subject, $from, $main_body); ?>
17 17
 </body>
18
-<?php do_action( 'AHEE__EE_Email_Messenger_main_wrapper_template_footer', $message_type, $subject, $from, $main_body ); ?>
18
+<?php do_action('AHEE__EE_Email_Messenger_main_wrapper_template_footer', $message_type, $subject, $from, $main_body); ?>
19 19
 </html>
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
core/libraries/messages/defaults/default/html_main_wrapper.template.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,21 +27,21 @@
 block discarded – undo
27 27
 		<!-- Primary Style Sheet -->
28 28
 		<link rel="stylesheet" type="text/css" href="<?php echo $main_css; ?>" />
29 29
 		<!-- Make sure the buttons don't print -->
30
-		<?php if ( isset( $extra_css )) : ?>
30
+		<?php if (isset($extra_css)) : ?>
31 31
 		<!-- Additional Style Sheet -->
32 32
 		<link rel="stylesheet" type="text/css" href="<?php echo $extra_css; ?>" />
33 33
 		<?php endif; ?>
34 34
 		<style type="text/css">
35 35
 		@media print{ .noPrint{ display:none !important;height:0!important; width:0!important; margin:0!important; padding:0!important; }}
36 36
 		</style>
37
-		<?php do_action( 'AHEE__EE_Html_Messenger_main_wrapper_template_head', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?>
37
+		<?php do_action('AHEE__EE_Html_Messenger_main_wrapper_template_head', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?>
38 38
 	</head>
39
-	<?php do_action( 'AHEE__EE_Html_Messenger_main_wrapper_template_header', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?>
39
+	<?php do_action('AHEE__EE_Html_Messenger_main_wrapper_template_header', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?>
40 40
 	<body>
41
-		<?php do_action( 'AHEE__EE_Html_Messenger_main_wrapper_template_before_main_body', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?>
41
+		<?php do_action('AHEE__EE_Html_Messenger_main_wrapper_template_before_main_body', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?>
42 42
 		<?php echo $main_body; ?>
43
-		<?php do_action( 'AHEE__EE_Html_Messenger_main_wrapper_template_after_main_body', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?>
43
+		<?php do_action('AHEE__EE_Html_Messenger_main_wrapper_template_after_main_body', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?>
44 44
 	</body>
45
-	<?php do_action( 'AHEE__EE_Html_Messenger_main_wrapper_template_footer', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?>
45
+	<?php do_action('AHEE__EE_Html_Messenger_main_wrapper_template_footer', $message_type, $page_title, $base_css, $print_css, $main_css, $main_body); ?>
46 46
 	<?php wp_footer(); ?>
47 47
 </html>
48 48
\ No newline at end of file
Please login to merge, or discard this patch.
core/libraries/payment_methods/EE_PMT_Base.lib.php 3 patches
Braces   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 	protected function _get_billing_values_from_form( $billing_form ){
443 443
 		if($billing_form instanceof EE_Form_Section_Proper ){
444 444
 			return $billing_form->input_pretty_values( true );
445
-		}else{
445
+		} else{
446 446
 			return NULL;
447 447
 		}
448 448
 	}
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
 	public function supports_sending_refunds(){
551 551
 		if($this->_gateway && $this->_gateway instanceof EE_Gateway){
552 552
 			return $this->_gateway->supports_sending_refunds();
553
-		}else{
553
+		} else{
554 554
 			return false;
555 555
 		}
556 556
 	}
@@ -588,11 +588,11 @@  discard block
 block discarded – undo
588 588
 	public function payment_occurs(){
589 589
 		if( ! $this->_gateway){
590 590
 			return EE_PMT_Base::offline;
591
-		}elseif($this->_gateway instanceof EE_Onsite_Gateway){
591
+		} elseif($this->_gateway instanceof EE_Onsite_Gateway){
592 592
 			return EE_PMT_Base::onsite;
593
-		}elseif($this->_gateway instanceof EE_Offsite_Gateway){
593
+		} elseif($this->_gateway instanceof EE_Offsite_Gateway){
594 594
 			return EE_PMT_Base::offsite;
595
-		}else{
595
+		} else{
596 596
 			throw new EE_Error(sprintf(__("Payment method type '%s's gateway isn't an instance of EE_Onsite_Gateway, EE_Offsite_Gateway, or null. It must be one of those", "event_espresso"),get_class($this)));
597 597
 		}
598 598
 	}
Please login to merge, or discard this patch.
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -106,9 +106,9 @@  discard block
 block discarded – undo
106 106
 			$this->_gateway->set_template_helper( new EEH_Template() );
107 107
 			$this->_gateway->set_line_item_helper( new EEH_Line_Item() );
108 108
 			$this->_gateway->set_money_helper( new EEH_Money() );
109
-            $this->_gateway->set_gateway_data_formatter(new GatewayDataFormatter());
110
-            $this->_gateway->set_unsupported_character_remover(new AsciiOnly());
111
-            do_action( 'AHEE__EE_PMT_Base___construct__done_initializing_gateway_class',$this,$this->_gateway);
109
+			$this->_gateway->set_gateway_data_formatter(new GatewayDataFormatter());
110
+			$this->_gateway->set_unsupported_character_remover(new AsciiOnly());
111
+			do_action( 'AHEE__EE_PMT_Base___construct__done_initializing_gateway_class',$this,$this->_gateway);
112 112
 		}
113 113
 		if ( ! isset( $this->_has_billing_form ) ) {
114 114
 			// by default, On Site gateways have a billing form
@@ -282,17 +282,17 @@  discard block
 block discarded – undo
282 282
 		//if we know who the attendee is, and this is a billing form
283 283
 		//that uses attendee info, populate it
284 284
 		if (
285
-            apply_filters(
286
-                'FHEE__populate_billing_form_fields_from_attendee',
287
-                (
288
-                    $this->_billing_form instanceof EE_Billing_Attendee_Info_Form
289
-                    && $transaction instanceof EE_Transaction
290
-                    && $transaction->primary_registration() instanceof EE_Registration
291
-                    && $transaction->primary_registration()->attendee() instanceof EE_Attendee
292
-                ),
293
-                $this->_billing_form,
294
-                $transaction
295
-            )
285
+			apply_filters(
286
+				'FHEE__populate_billing_form_fields_from_attendee',
287
+				(
288
+					$this->_billing_form instanceof EE_Billing_Attendee_Info_Form
289
+					&& $transaction instanceof EE_Transaction
290
+					&& $transaction->primary_registration() instanceof EE_Registration
291
+					&& $transaction->primary_registration()->attendee() instanceof EE_Attendee
292
+				),
293
+				$this->_billing_form,
294
+				$transaction
295
+			)
296 296
 		){
297 297
 			$this->_billing_form->populate_from_attendee( $transaction->primary_registration()->attendee() );
298 298
 		}
Please login to merge, or discard this patch.
Spacing   +107 added lines, -107 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
  * @since 				$VID:$
17 17
  *
18 18
  */
19
-abstract class EE_PMT_Base{
19
+abstract class EE_PMT_Base {
20 20
 
21 21
 	const onsite = 'on-site';
22 22
 	const offsite = 'off-site';
@@ -97,34 +97,34 @@  discard block
 block discarded – undo
97 97
 	 * @return EE_PMT_Base
98 98
 	 */
99 99
 	function __construct($pm_instance = NULL) {
100
-		if ( $pm_instance instanceof EE_Payment_Method ){
100
+		if ($pm_instance instanceof EE_Payment_Method) {
101 101
 			$this->set_instance($pm_instance);
102 102
 		}
103
-		if($this->_gateway){
104
-			$this->_gateway->set_payment_model( EEM_Payment::instance() );
105
-			$this->_gateway->set_payment_log( EEM_Change_Log::instance() );
106
-			$this->_gateway->set_template_helper( new EEH_Template() );
107
-			$this->_gateway->set_line_item_helper( new EEH_Line_Item() );
108
-			$this->_gateway->set_money_helper( new EEH_Money() );
103
+		if ($this->_gateway) {
104
+			$this->_gateway->set_payment_model(EEM_Payment::instance());
105
+			$this->_gateway->set_payment_log(EEM_Change_Log::instance());
106
+			$this->_gateway->set_template_helper(new EEH_Template());
107
+			$this->_gateway->set_line_item_helper(new EEH_Line_Item());
108
+			$this->_gateway->set_money_helper(new EEH_Money());
109 109
             $this->_gateway->set_gateway_data_formatter(new GatewayDataFormatter());
110 110
             $this->_gateway->set_unsupported_character_remover(new AsciiOnly());
111
-            do_action( 'AHEE__EE_PMT_Base___construct__done_initializing_gateway_class',$this,$this->_gateway);
111
+            do_action('AHEE__EE_PMT_Base___construct__done_initializing_gateway_class', $this, $this->_gateway);
112 112
 		}
113
-		if ( ! isset( $this->_has_billing_form ) ) {
113
+		if ( ! isset($this->_has_billing_form)) {
114 114
 			// by default, On Site gateways have a billing form
115
-			if ( $this->payment_occurs() == EE_PMT_Base::onsite ) {
116
-				$this->set_has_billing_form( true );
115
+			if ($this->payment_occurs() == EE_PMT_Base::onsite) {
116
+				$this->set_has_billing_form(true);
117 117
 			} else {
118
-				$this->set_has_billing_form( false );
118
+				$this->set_has_billing_form(false);
119 119
 			}
120 120
 		}
121 121
 
122
-		if( ! $this->_pretty_name){
122
+		if ( ! $this->_pretty_name) {
123 123
 			throw new EE_Error(sprintf(__("You must set the pretty name for the Payment Method Type in the constructor (_pretty_name), and please make it internationalized", "event_espresso")));
124 124
 		}
125 125
 		//if the child didn't specify a default button, use the credit card one
126
-		if( $this->_default_button_url === NULL){
127
-			$this->_default_button_url = EE_PLUGIN_DIR_URL . 'payment_methods' . DS . 'pay-by-credit-card.png';
126
+		if ($this->_default_button_url === NULL) {
127
+			$this->_default_button_url = EE_PLUGIN_DIR_URL.'payment_methods'.DS.'pay-by-credit-card.png';
128 128
 		}
129 129
 	}
130 130
 
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
 	/**
134 134
 	 * @param boolean $has_billing_form
135 135
 	 */
136
-	public function set_has_billing_form( $has_billing_form ) {
137
-		$this->_has_billing_form = filter_var( $has_billing_form, FILTER_VALIDATE_BOOLEAN );
136
+	public function set_has_billing_form($has_billing_form) {
137
+		$this->_has_billing_form = filter_var($has_billing_form, FILTER_VALIDATE_BOOLEAN);
138 138
 	}
139 139
 
140 140
 
@@ -142,10 +142,10 @@  discard block
 block discarded – undo
142 142
 	/**
143 143
 	 * sets the file_folder property
144 144
 	 */
145
-	protected function _set_file_folder(){
145
+	protected function _set_file_folder() {
146 146
 		$reflector = new ReflectionClass(get_class($this));
147 147
 		$fn = $reflector->getFileName();
148
-		$this->_file_folder =  dirname($fn).DS;
148
+		$this->_file_folder = dirname($fn).DS;
149 149
 	}
150 150
 
151 151
 
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
 	/**
154 154
 	 * sets the file URL with a trailing slash for this PMT
155 155
 	 */
156
-	protected function _set_file_url(){
157
-		$plugins_dir_fixed = str_replace('\\',DS,WP_PLUGIN_DIR);
158
-		$file_folder_fixed = str_replace('\\',DS,$this->file_folder());
159
-		$file_path = str_replace($plugins_dir_fixed,WP_PLUGIN_URL,$file_folder_fixed);
156
+	protected function _set_file_url() {
157
+		$plugins_dir_fixed = str_replace('\\', DS, WP_PLUGIN_DIR);
158
+		$file_folder_fixed = str_replace('\\', DS, $this->file_folder());
159
+		$file_path = str_replace($plugins_dir_fixed, WP_PLUGIN_URL, $file_folder_fixed);
160 160
 		$this->_file_url = $file_path;
161 161
 	}
162 162
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 	 * Gets the default description on all payment methods of this type
165 165
 	 * @return string
166 166
 	 */
167
-	public function default_description(){
167
+	public function default_description() {
168 168
 		return $this->_default_description;
169 169
 	}
170 170
 
@@ -174,8 +174,8 @@  discard block
 block discarded – undo
174 174
 	 * Returns the folder containing the PMT child class, with a trailing slash
175 175
 	 * @return string
176 176
 	 */
177
-	public function file_folder(){
178
-		if( ! $this->_file_folder ) {
177
+	public function file_folder() {
178
+		if ( ! $this->_file_folder) {
179 179
 			$this->_set_file_folder();
180 180
 		}
181 181
 		return $this->_file_folder;
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
 	/**
187 187
 	 * @return string
188 188
 	 */
189
-	public function file_url(){
190
-		if( ! $this->_file_url ) {
189
+	public function file_url() {
190
+		if ( ! $this->_file_url) {
191 191
 			$this->_set_file_url();
192 192
 		}
193 193
 		return $this->_file_url;
@@ -200,14 +200,14 @@  discard block
 block discarded – undo
200 200
 	 * Its important teh payment method instance is set before
201 201
 	 * @param EE_Payment_Method $payment_method_instance
202 202
 	 */
203
-	function set_instance($payment_method_instance){
203
+	function set_instance($payment_method_instance) {
204 204
 		$this->_pm_instance = $payment_method_instance;
205 205
 		//if they have already requested the settings form, make sure its
206 206
 		//data matches this model object
207
-		if($this->_settings_form){
207
+		if ($this->_settings_form) {
208 208
 			$this->settings_form()->populate_model_obj($payment_method_instance);
209 209
 		}
210
-		if($this->_gateway && $this->_gateway instanceof EE_Gateway){
210
+		if ($this->_gateway && $this->_gateway instanceof EE_Gateway) {
211 211
 			$this->_gateway->set_settings($payment_method_instance->settings_array());
212 212
 		}
213 213
 	}
@@ -218,13 +218,13 @@  discard block
 block discarded – undo
218 218
 	 * Gets teh form for displaying to admins where they setup the payment method
219 219
 	 * @return EE_Payment_Method_Form
220 220
 	 */
221
-	function settings_form(){
222
-		if( ! $this->_settings_form){
221
+	function settings_form() {
222
+		if ( ! $this->_settings_form) {
223 223
 			$this->_settings_form = $this->generate_new_settings_form();
224
-			$this->_settings_form->set_payment_method_type( $this );
224
+			$this->_settings_form->set_payment_method_type($this);
225 225
 			//if we have already assigned a model object to this pmt, make
226 226
 			//sure its reflected in teh form we just generated
227
-			if($this->_pm_instance){
227
+			if ($this->_pm_instance) {
228 228
 				$this->_settings_form->populate_model_obj($this->_pm_instance);
229 229
 			}
230 230
 		}
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 	 * this payment method type's settings form later in the request
251 251
 	 * @param EE_Payment_Method_Form $form
252 252
 	 */
253
-	public function set_settings_form($form){
253
+	public function set_settings_form($form) {
254 254
 		$this->_settings_form = $form;
255 255
 	}
256 256
 
@@ -273,10 +273,10 @@  discard block
 block discarded – undo
273 273
 	 * @param array $extra_args
274 274
 	 * @return \EE_Billing_Attendee_Info_Form|\EE_Billing_Info_Form|null
275 275
 	 */
276
-	public function billing_form( EE_Transaction $transaction = NULL, $extra_args = array() ){
276
+	public function billing_form(EE_Transaction $transaction = NULL, $extra_args = array()) {
277 277
 		// has billing form already been regenerated ? or overwrite cache?
278
-		if ( ! $this->_billing_form instanceof EE_Billing_Info_Form || ! $this->_cache_billing_form ){
279
-			$this->_billing_form = $this->generate_new_billing_form( $transaction, $extra_args );
278
+		if ( ! $this->_billing_form instanceof EE_Billing_Info_Form || ! $this->_cache_billing_form) {
279
+			$this->_billing_form = $this->generate_new_billing_form($transaction, $extra_args);
280 280
 		}
281 281
 		//if we know who the attendee is, and this is a billing form
282 282
 		//that uses attendee info, populate it
@@ -292,8 +292,8 @@  discard block
 block discarded – undo
292 292
                 $this->_billing_form,
293 293
                 $transaction
294 294
             )
295
-		){
296
-			$this->_billing_form->populate_from_attendee( $transaction->primary_registration()->attendee() );
295
+		) {
296
+			$this->_billing_form->populate_from_attendee($transaction->primary_registration()->attendee());
297 297
 		}
298 298
 		return $this->_billing_form;
299 299
 	}
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
 	 * @param \EE_Transaction $transaction
305 305
 	 * @return \EE_Billing_Info_Form
306 306
 	 */
307
-	abstract function generate_new_billing_form( EE_Transaction $transaction = NULL );
307
+	abstract function generate_new_billing_form(EE_Transaction $transaction = NULL);
308 308
 
309 309
 
310 310
 
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 	 * @param \EE_Billing_Info_Form $billing_form
316 316
 	 * @return \EE_Billing_Info_Form
317 317
 	 */
318
-	public function apply_billing_form_debug_settings( EE_Billing_Info_Form $billing_form ) {
318
+	public function apply_billing_form_debug_settings(EE_Billing_Info_Form $billing_form) {
319 319
 		return $billing_form;
320 320
 	}
321 321
 
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 	 * if you have form
327 327
 	 * @param EE_Payment_Method $form
328 328
 	 */
329
-	public function set_billing_form($form){
329
+	public function set_billing_form($form) {
330 330
 		$this->_billing_form = $form;
331 331
 	}
332 332
 
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 	 * Returns whether or not this payment method requires HTTPS to be used
337 337
 	 * @return boolean
338 338
 	 */
339
-	function requires_https(){
339
+	function requires_https() {
340 340
 		return $this->_requires_https;
341 341
 	}
342 342
 
@@ -354,9 +354,9 @@  discard block
 block discarded – undo
354 354
 	 * @return EE_Payment
355 355
 	 * @throws EE_Error
356 356
 	 */
357
-	function process_payment( EE_Transaction $transaction, $amount = null, $billing_info = null, $return_url = null,$fail_url = '', $method = 'CART', $by_admin = false ){
357
+	function process_payment(EE_Transaction $transaction, $amount = null, $billing_info = null, $return_url = null, $fail_url = '', $method = 'CART', $by_admin = false) {
358 358
 		// @todo: add surcharge for the payment method, if any
359
-		if ( $this->_gateway ) {
359
+		if ($this->_gateway) {
360 360
 			//there is a gateway, so we're going to make a payment object
361 361
 			//but wait! do they already have a payment in progress that we thought was failed?
362 362
 			$duplicate_properties = array(
@@ -367,10 +367,10 @@  discard block
 block discarded – undo
367 367
 				'PAY_amount' 					=> $amount !== null ? $amount : $transaction->remaining(),
368 368
 				'PAY_gateway_response' 	=> null,
369 369
 			);
370
-			$payment = EEM_Payment::instance()->get_one( array( $duplicate_properties ));
370
+			$payment = EEM_Payment::instance()->get_one(array($duplicate_properties));
371 371
 			//if we didn't already have a payment in progress for the same thing,
372 372
 			//then we actually want to make a new payment
373
-			if ( ! $payment instanceof EE_Payment ){
373
+			if ( ! $payment instanceof EE_Payment) {
374 374
 				$payment = EE_Payment::new_instance(
375 375
 					array_merge(
376 376
 						$duplicate_properties,
@@ -386,10 +386,10 @@  discard block
 block discarded – undo
386 386
 			}
387 387
 			//make sure the payment has been saved to show we started it, and so it has an ID should the gateway try to log it
388 388
 			$payment->save();
389
-			$billing_values = $this->_get_billing_values_from_form( $billing_info );
389
+			$billing_values = $this->_get_billing_values_from_form($billing_info);
390 390
 
391 391
 			//  Offsite Gateway
392
-			if( $this->_gateway instanceof EE_Offsite_Gateway ){
392
+			if ($this->_gateway instanceof EE_Offsite_Gateway) {
393 393
 
394 394
 				$payment = $this->_gateway->set_redirection_info(
395 395
 					$payment,
@@ -405,17 +405,17 @@  discard block
 block discarded – undo
405 405
 				);
406 406
 				$payment->save();
407 407
 			//  Onsite Gateway
408
-			} elseif ( $this->_gateway instanceof EE_Onsite_Gateway ) {
408
+			} elseif ($this->_gateway instanceof EE_Onsite_Gateway) {
409 409
 
410
-				$payment = $this->_gateway->do_direct_payment($payment,$billing_values);
410
+				$payment = $this->_gateway->do_direct_payment($payment, $billing_values);
411 411
 				$payment->save();
412 412
 
413 413
 			} else {
414 414
 				throw new EE_Error(
415 415
 					sprintf(
416
-						__('Gateway for payment method type "%s" is "%s", not a subclass of either EE_Offsite_Gateway or EE_Onsite_Gateway, or null (to indicate NO gateway)', 'event_espresso' ),
416
+						__('Gateway for payment method type "%s" is "%s", not a subclass of either EE_Offsite_Gateway or EE_Onsite_Gateway, or null (to indicate NO gateway)', 'event_espresso'),
417 417
 						get_class($this),
418
-						gettype( $this->_gateway )
418
+						gettype($this->_gateway)
419 419
 					)
420 420
 				);
421 421
 			}
@@ -437,8 +437,8 @@  discard block
 block discarded – undo
437 437
 		}
438 438
 
439 439
 		// if there is billing info, clean it and save it now
440
-		if( $billing_info instanceof EE_Billing_Attendee_Info_Form ){
441
-			$this->_save_billing_info_to_attendee( $billing_info, $transaction );
440
+		if ($billing_info instanceof EE_Billing_Attendee_Info_Form) {
441
+			$this->_save_billing_info_to_attendee($billing_info, $transaction);
442 442
 		}
443 443
 
444 444
 		return $payment;
@@ -451,10 +451,10 @@  discard block
 block discarded – undo
451 451
 	 * @param EE_Billing_Info_Form $billing_form
452 452
 	 * @return array
453 453
 	 */
454
-	protected function _get_billing_values_from_form( $billing_form ){
455
-		if($billing_form instanceof EE_Form_Section_Proper ){
456
-			return $billing_form->input_pretty_values( true );
457
-		}else{
454
+	protected function _get_billing_values_from_form($billing_form) {
455
+		if ($billing_form instanceof EE_Form_Section_Proper) {
456
+			return $billing_form->input_pretty_values(true);
457
+		} else {
458 458
 			return NULL;
459 459
 		}
460 460
 	}
@@ -468,13 +468,13 @@  discard block
 block discarded – undo
468 468
 	 * @return EE_Payment
469 469
 	 * @throws EE_Error
470 470
 	 */
471
-	public function handle_ipn($req_data,$transaction){
471
+	public function handle_ipn($req_data, $transaction) {
472 472
 		$transaction = EEM_Transaction::instance()->ensure_is_obj($transaction);
473
-		if( ! $this->_gateway instanceof EE_Offsite_Gateway){
474
-			throw new EE_Error(sprintf(__("Could not handle IPN because '%s' is not an offsite gateway", "event_espresso"), print_r( $this->_gateway, TRUE )));
473
+		if ( ! $this->_gateway instanceof EE_Offsite_Gateway) {
474
+			throw new EE_Error(sprintf(__("Could not handle IPN because '%s' is not an offsite gateway", "event_espresso"), print_r($this->_gateway, TRUE)));
475 475
 
476 476
 		}
477
-		$payment = $this->_gateway->handle_payment_update( $req_data, $transaction );
477
+		$payment = $this->_gateway->handle_payment_update($req_data, $transaction);
478 478
 		return $payment;
479 479
 	}
480 480
 
@@ -487,22 +487,22 @@  discard block
 block discarded – undo
487 487
 	 * @param EE_Transaction $transaction
488 488
 	 * @return boolean success
489 489
 	 */
490
-	protected function _save_billing_info_to_attendee($billing_form, $transaction){
491
-		if( ! $transaction || ! $transaction instanceof EE_Transaction){
490
+	protected function _save_billing_info_to_attendee($billing_form, $transaction) {
491
+		if ( ! $transaction || ! $transaction instanceof EE_Transaction) {
492 492
 			EE_Error::add_error(__("Cannot save billing info because no transaction was specified", "event_espresso"), __FILE__, __FUNCTION__, __LINE__);
493 493
 			return false;
494 494
 		}
495 495
 		$primary_reg = $transaction->primary_registration();
496
-		if( ! $primary_reg ){
496
+		if ( ! $primary_reg) {
497 497
 			EE_Error::add_error(__("Cannot save billing info because the transaction has no primary registration", "event_espresso"), __FILE__, __FUNCTION__, __LINE__);
498 498
 			return false;
499 499
 		}
500 500
 		$attendee = $primary_reg->attendee();
501
-		if( ! $attendee ){
501
+		if ( ! $attendee) {
502 502
 			EE_Error::add_error(__("Cannot save billing info because the transaction's primary registration has no attendee!", "event_espresso"), __FILE__, __FUNCTION__, __LINE__);
503 503
 			return false;
504 504
 		}
505
-		return $attendee->save_and_clean_billing_info_for_payment_method($billing_form, $transaction->payment_method() );
505
+		return $attendee->save_and_clean_billing_info_for_payment_method($billing_form, $transaction->payment_method());
506 506
 
507 507
 	}
508 508
 
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
 	 * @param array $req_data
516 516
 	 * @return EE_Payment
517 517
 	 */
518
-	protected function find_payment_for_ipn( EE_Transaction $transaction, $req_data = array() ){
518
+	protected function find_payment_for_ipn(EE_Transaction $transaction, $req_data = array()) {
519 519
 		return $transaction->last_payment();
520 520
 	}
521 521
 
@@ -532,8 +532,8 @@  discard block
 block discarded – undo
532 532
 	 * and identifies the IPN as being for this payment method (not just fo ra payment method of this type)
533 533
 	 * @throws EE_Error
534 534
 	 */
535
-	public function handle_unclaimed_ipn( $req_data = array() ){
536
-		throw new EE_Error(sprintf(__("Payment Method '%s' cannot handle unclaimed IPNs", "event_espresso"), get_class($this) ));
535
+	public function handle_unclaimed_ipn($req_data = array()) {
536
+		throw new EE_Error(sprintf(__("Payment Method '%s' cannot handle unclaimed IPNs", "event_espresso"), get_class($this)));
537 537
 	}
538 538
 
539 539
 
@@ -549,7 +549,7 @@  discard block
 block discarded – undo
549 549
 	 * @param EE_Transaction $transaction
550 550
 	 * @return EE_Payment
551 551
 	 */
552
-	public function finalize_payment_for($transaction){
552
+	public function finalize_payment_for($transaction) {
553 553
 		return $transaction->last_payment();
554 554
 	}
555 555
 
@@ -559,10 +559,10 @@  discard block
 block discarded – undo
559 559
 	 * Whether or not this payment method's gateway supports sending refund requests
560 560
 	 * @return boolean
561 561
 	 */
562
-	public function supports_sending_refunds(){
563
-		if($this->_gateway && $this->_gateway instanceof EE_Gateway){
562
+	public function supports_sending_refunds() {
563
+		if ($this->_gateway && $this->_gateway instanceof EE_Gateway) {
564 564
 			return $this->_gateway->supports_sending_refunds();
565
-		}else{
565
+		} else {
566 566
 			return false;
567 567
 		}
568 568
 	}
@@ -576,14 +576,14 @@  discard block
 block discarded – undo
576 576
 	 * @throws EE_Error
577 577
 	 * @return EE_Payment
578 578
 	 */
579
-	public function process_refund( EE_Payment $payment, $refund_info = array()){
580
-		if ( $this->_gateway && $this->_gateway instanceof EE_Gateway ) {
581
-			return $this->_gateway->do_direct_refund( $payment, $refund_info );
579
+	public function process_refund(EE_Payment $payment, $refund_info = array()) {
580
+		if ($this->_gateway && $this->_gateway instanceof EE_Gateway) {
581
+			return $this->_gateway->do_direct_refund($payment, $refund_info);
582 582
 		} else {
583 583
 			throw new EE_Error(
584 584
 				sprintf(
585
-					__( 'Payment Method Type "%s" does not support sending refund requests', 'event_espresso' ),
586
-					get_class( $this )
585
+					__('Payment Method Type "%s" does not support sending refund requests', 'event_espresso'),
586
+					get_class($this)
587 587
 				)
588 588
 			);
589 589
 		}
@@ -597,15 +597,15 @@  discard block
 block discarded – undo
597 597
 	 * @return string
598 598
 	 * @throws EE_Error
599 599
 	 */
600
-	public function payment_occurs(){
601
-		if( ! $this->_gateway){
600
+	public function payment_occurs() {
601
+		if ( ! $this->_gateway) {
602 602
 			return EE_PMT_Base::offline;
603
-		}elseif($this->_gateway instanceof EE_Onsite_Gateway){
603
+		}elseif ($this->_gateway instanceof EE_Onsite_Gateway) {
604 604
 			return EE_PMT_Base::onsite;
605
-		}elseif($this->_gateway instanceof EE_Offsite_Gateway){
605
+		}elseif ($this->_gateway instanceof EE_Offsite_Gateway) {
606 606
 			return EE_PMT_Base::offsite;
607
-		}else{
608
-			throw new EE_Error(sprintf(__("Payment method type '%s's gateway isn't an instance of EE_Onsite_Gateway, EE_Offsite_Gateway, or null. It must be one of those", "event_espresso"),get_class($this)));
607
+		} else {
608
+			throw new EE_Error(sprintf(__("Payment method type '%s's gateway isn't an instance of EE_Onsite_Gateway, EE_Offsite_Gateway, or null. It must be one of those", "event_espresso"), get_class($this)));
609 609
 		}
610 610
 	}
611 611
 
@@ -618,8 +618,8 @@  discard block
 block discarded – undo
618 618
 	 * @param EE_Payment $payment
619 619
 	 * @return string
620 620
 	 */
621
-	public function payment_overview_content(EE_Payment $payment){
622
-		return EEH_Template::display_template(EE_LIBRARIES.'payment_methods'.DS.'templates'.DS.'payment_details_content.template.php', array('payment_method'=>$this->_pm_instance,'payment'=>$payment) , true);
621
+	public function payment_overview_content(EE_Payment $payment) {
622
+		return EEH_Template::display_template(EE_LIBRARIES.'payment_methods'.DS.'templates'.DS.'payment_details_content.template.php', array('payment_method'=>$this->_pm_instance, 'payment'=>$payment), true);
623 623
 	}
624 624
 
625 625
 
@@ -632,7 +632,7 @@  discard block
 block discarded – undo
632 632
 	 *	@type array $template_args any arguments you want passed to the template file while rendering.
633 633
 	 *				Keys will be variable names and values with be their values.
634 634
 	 */
635
-	public function help_tabs_config(){
635
+	public function help_tabs_config() {
636 636
 		return array();
637 637
 	}
638 638
 
@@ -643,9 +643,9 @@  discard block
 block discarded – undo
643 643
 	 * the payment method's table's PMT_type column)
644 644
 	 * @return string
645 645
 	 */
646
-	public function system_name(){
646
+	public function system_name() {
647 647
 		$classname = get_class($this);
648
-		return str_replace("EE_PMT_",'',$classname);
648
+		return str_replace("EE_PMT_", '', $classname);
649 649
 	}
650 650
 
651 651
 
@@ -654,7 +654,7 @@  discard block
 block discarded – undo
654 654
 	 * A pretty i18n version of the PMT name
655 655
 	 * @return string
656 656
 	 */
657
-	public function pretty_name(){
657
+	public function pretty_name() {
658 658
 		return $this->_pretty_name;
659 659
 	}
660 660
 
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 	 * Gets the default absolute URL to the payment method type's button
665 665
 	 * @return string
666 666
 	 */
667
-	public function default_button_url(){
667
+	public function default_button_url() {
668 668
 		return $this->_default_button_url;
669 669
 	}
670 670
 
@@ -674,7 +674,7 @@  discard block
 block discarded – undo
674 674
 	 * Gets the gateway used by this payment method (if any)
675 675
 	 * @return EE_Gateway
676 676
 	 */
677
-	public function get_gateway(){
677
+	public function get_gateway() {
678 678
 		return $this->_gateway;
679 679
 	}
680 680
 
@@ -683,8 +683,8 @@  discard block
 block discarded – undo
683 683
 	/**
684 684
 	 * @return string html for the link to a help tab
685 685
 	 */
686
-	public function get_help_tab_link(){
687
-		return EEH_Template::get_help_tab_link( $this->get_help_tab_name() );
686
+	public function get_help_tab_link() {
687
+		return EEH_Template::get_help_tab_link($this->get_help_tab_name());
688 688
 	}
689 689
 
690 690
 
@@ -693,8 +693,8 @@  discard block
 block discarded – undo
693 693
 	 * Returns the name of the help tab for this PMT
694 694
 	 * @return string
695 695
 	 */
696
-	public function get_help_tab_name(){
697
-		return 'ee_' . strtolower( $this->system_name() ) . '_help_tab';
696
+	public function get_help_tab_name() {
697
+		return 'ee_'.strtolower($this->system_name()).'_help_tab';
698 698
 	}
699 699
 
700 700
 	/**
@@ -702,8 +702,8 @@  discard block
 block discarded – undo
702 702
 	 * this PMT by an admin
703 703
 	 * @return string
704 704
 	 */
705
-	public function cap_name(){
706
-		return 'ee_payment_method_' . strtolower( $this->system_name() );
705
+	public function cap_name() {
706
+		return 'ee_payment_method_'.strtolower($this->system_name());
707 707
 	}
708 708
 
709 709
 	/**
@@ -715,9 +715,9 @@  discard block
 block discarded – undo
715 715
 	 * @param EE_Payment $payment
716 716
 	 * @return void
717 717
 	 */
718
-	public function update_txn_based_on_payment( $payment ){
719
-		if( $this->_gateway instanceof EE_Gateway ){
720
-			$this->_gateway->update_txn_based_on_payment( $payment );
718
+	public function update_txn_based_on_payment($payment) {
719
+		if ($this->_gateway instanceof EE_Gateway) {
720
+			$this->_gateway->update_txn_based_on_payment($payment);
721 721
 		}
722 722
 	}
723 723
 
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
 	 * @return string
733 733
 	 */
734 734
 	public function introductory_html() {
735
-		return EEH_Template::locate_template( $this->file_folder() . 'templates' . DS . strtolower( $this->system_name() ) . '_intro.template.php', array( 'pmt_obj' => $this, 'pm_instance' => $this->_pm_instance ) );
735
+		return EEH_Template::locate_template($this->file_folder().'templates'.DS.strtolower($this->system_name()).'_intro.template.php', array('pmt_obj' => $this, 'pm_instance' => $this->_pm_instance));
736 736
 	}
737 737
 
738 738
 
Please login to merge, or discard this patch.
core/libraries/template_parts/EE_Template_Part.class.php 1 patch
Spacing   +12 added lines, -12 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\templates;
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
  * Class EE_Template_Part
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
 	 * @param string $template
48 48
 	 * @param int    $priority
49 49
 	 */
50
-	public function __construct( $name, $label, $template, $priority = 100 ) {
51
-		$this->set_name( $name );
52
-		$this->set_label( $label );
53
-		$this->set_template( $template );
54
-		$this->set_priority( $priority );
50
+	public function __construct($name, $label, $template, $priority = 100) {
51
+		$this->set_name($name);
52
+		$this->set_label($label);
53
+		$this->set_template($template);
54
+		$this->set_priority($priority);
55 55
 	}
56 56
 
57 57
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 	/**
69 69
 	 * @param mixed $name
70 70
 	 */
71
-	public function set_name( $name ) {
71
+	public function set_name($name) {
72 72
 		$this->name = $name;
73 73
 	}
74 74
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	/**
87 87
 	 * @param string $label
88 88
 	 */
89
-	public function set_label( $label ) {
89
+	public function set_label($label) {
90 90
 		$this->label = $label;
91 91
 	}
92 92
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	/**
105 105
 	 * @param string $template
106 106
 	 */
107
-	public function set_template( $template ) {
107
+	public function set_template($template) {
108 108
 		$this->template = $template;
109 109
 	}
110 110
 
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
 	/**
123 123
 	 * @param int $priority
124 124
 	 */
125
-	public function set_priority( $priority ) {
126
-		$this->priority = intval( $priority );
125
+	public function set_priority($priority) {
126
+		$this->priority = intval($priority);
127 127
 	}
128 128
 
129 129
 
Please login to merge, or discard this patch.
core/libraries/template_parts/EE_Template_Part_PriorityQueue.class.php 1 patch
Spacing   +7 added lines, -7 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\templates;
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
  * Class EE_Template_Part_PriorityQueue
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
 	 * @param int $priority
32 32
 	 * @return bool
33 33
 	 */
34
-	public function insert( $object, $priority = 100 ) {
35
-		if ( $object instanceof EE_Template_Part ) {
36
-			parent::insert( $object, $priority );
34
+	public function insert($object, $priority = 100) {
35
+		if ($object instanceof EE_Template_Part) {
36
+			parent::insert($object, $priority);
37 37
 			return true;
38 38
 		} else {
39 39
 			return false;
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
 	 * @param int $priority2
53 53
 	 * @return bool
54 54
 	 */
55
-	public function compare( $priority1, $priority2 ) {
56
-		if ( $priority1 === $priority2 ) {
55
+	public function compare($priority1, $priority2) {
56
+		if ($priority1 === $priority2) {
57 57
 			return 0;
58 58
 		}
59 59
 		return $priority1 > $priority2 ? -1 : 1;
Please login to merge, or discard this patch.
core/request_stack/EE_Response.core.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 	 * @return \EE_Response
41 41
 	 */
42 42
 	public function __construct() {
43
-		$this->terminate_request( false );
43
+		$this->terminate_request(false);
44 44
 	}
45 45
 
46 46
 
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 	 * @param $value
54 54
 	 * @return    void
55 55
 	 */
56
-	public function set_notice( $key, $value ) {
57
-		$this->_notice[ $key ] = $value;
56
+	public function set_notice($key, $value) {
57
+		$this->_notice[$key] = $value;
58 58
 	}
59 59
 
60 60
 
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
 	 * @param $key
67 67
 	 * @return    mixed
68 68
 	 */
69
-	public function get_notice( $key ) {
70
-		return isset( $this->_notice[ $key ] ) ? $this->_notice[ $key ] : NULL;
69
+	public function get_notice($key) {
70
+		return isset($this->_notice[$key]) ? $this->_notice[$key] : NULL;
71 71
 	}
72 72
 
73 73
 
@@ -91,8 +91,8 @@  discard block
 block discarded – undo
91 91
 	 * @param $string
92 92
 	 * @param bool $append
93 93
 	 */
94
-	public function add_output( $string, $append = true ) {
95
-		$this->_output = $append ? $this->_output . $string : $string . $this->_output;
94
+	public function add_output($string, $append = true) {
95
+		$this->_output = $append ? $this->_output.$string : $string.$this->_output;
96 96
 	}
97 97
 
98 98
 
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
 	/**
122 122
 	 * @param boolean $request_terminated
123 123
 	 */
124
-	public function terminate_request( $request_terminated = true ) {
125
-		$this->request_terminated = filter_var( $request_terminated, FILTER_VALIDATE_BOOLEAN );
124
+	public function terminate_request($request_terminated = true) {
125
+		$this->request_terminated = filter_var($request_terminated, FILTER_VALIDATE_BOOLEAN);
126 126
 	}
127 127
 
128 128
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,6 @@
 block discarded – undo
1
-<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed');
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3
+}
2 4
 /**
3 5
  * class EE_Response
4 6
  *
Please login to merge, or discard this patch.
reg_steps/payment_options/events_requiring_pre_approval.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
3 3
 /** @type string $events_requiring_pre_approval_msg */
4 4
 ?>
5 5
 
6
-<h4><span class="orange-text"><?php _e('Important Notice: Events Requiring Pre-Approval', 'event_espresso');?></span></h4>
6
+<h4><span class="orange-text"><?php _e('Important Notice: Events Requiring Pre-Approval', 'event_espresso'); ?></span></h4>
7 7
 	<p id="events-requiring-pre-approval-pg" class="small-text drk-grey-text">
8 8
 		<?php echo $events_requiring_pre_approval_msg; ?>
9 9
 	</p>
Please login to merge, or discard this patch.
single_page_checkout/reg_steps/payment_options/sold_out_events.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,9 +3,9 @@
 block discarded – undo
3 3
 /** @type string $sold_out_events_msg */
4 4
 ?>
5 5
 
6
-<h4 class="ee-status sold-out"><b><?php _e('Sold Out', 'event_espresso');?></b></h4>
6
+<h4 class="ee-status sold-out"><b><?php _e('Sold Out', 'event_espresso'); ?></b></h4>
7 7
 	<ul id="spco-sold-out-events-ul"><?php echo $sold_out_events; ?></ul>
8
-	<h6 class="pink-text"><?php _e("We're Sorry", 'event_espresso');?></h6>
8
+	<h6 class="pink-text"><?php _e("We're Sorry", 'event_espresso'); ?></h6>
9 9
 	<p id="events-requiring-pre-approval-pg" class="small-text drk-grey-text">
10 10
 		<?php echo $sold_out_events_msg; ?>
11 11
 	</p>
Please login to merge, or discard this patch.
reg_steps/payment_options/sold_out_tickets.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 /** @type string $sold_out_tickets_msg */
4 4
 ?>
5 5
 
6
-	<h4 ><b><?php _e('Sold Out', 'event_espresso');?></b></h4>
7
-	<h6 class="pink-text"><?php _e("We're Sorry", 'event_espresso');?></h6>
6
+	<h4 ><b><?php _e('Sold Out', 'event_espresso'); ?></b></h4>
7
+	<h6 class="pink-text"><?php _e("We're Sorry", 'event_espresso'); ?></h6>
8 8
 	<p id="tickets-requiring-pre-approval-pg" class="small-text drk-grey-text">
9 9
 		<?php echo $sold_out_tickets_msg; ?>
10 10
 	</p>
Please login to merge, or discard this patch.