Completed
Branch FET-9099-unit-test-factories (8a4437)
by
unknown
64:24 queued 54:33
created
admin_pages/general_settings/templates/admin_option_settings.template.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <div class="padding">
2 2
 
3
-	<?php do_action( 'AHEE__admin_option_settings__template__before', $template_args ); ?>
3
+	<?php do_action('AHEE__admin_option_settings__template__before', $template_args); ?>
4 4
 
5 5
 	<?php /* @todo put back once we have a dashboard widget to use
6 6
 	<h2 class="ee-admin-settings-hdr">
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	</table>
66 66
 <?php endif; */ ?>
67 67
 
68
-	<?php if ( EE_Registry::instance()->CAP->current_user_can( 'manage_options', 'display_admin_settings_options_promote_and_affiliate' ) ) : ?>
68
+	<?php if (EE_Registry::instance()->CAP->current_user_can('manage_options', 'display_admin_settings_options_promote_and_affiliate')) : ?>
69 69
 		<h3 class="ee-admin-settings-hdr">
70 70
 			<?php _e('Promote Event Espresso', 'event_espresso'); ?> <span id="affiliate_info"><?php echo EEH_Template::get_help_tab_link('affiliate_info'); ?></span>
71 71
 		</h3>
@@ -80,13 +80,13 @@  discard block
 block discarded – undo
80 80
 						</label>
81 81
 					</th>
82 82
 					<td>
83
-						<?php echo EEH_Form_Fields::select_input('show_reg_footer', $values, $show_reg_footer ); ?>
83
+						<?php echo EEH_Form_Fields::select_input('show_reg_footer', $values, $show_reg_footer); ?>
84 84
 					</td>
85 85
 				</tr>
86 86
 
87 87
 				<tr>
88 88
 					<th>
89
-						<?php printf( __('Event Espresso %sAffiliate%s ID', 'event_espresso'), '<a href="http://eventespresso.com/affiliates/" target="_blank">', '</a>' ); ?>
89
+						<?php printf(__('Event Espresso %sAffiliate%s ID', 'event_espresso'), '<a href="http://eventespresso.com/affiliates/" target="_blank">', '</a>'); ?>
90 90
 					</th>
91 91
 					<td>
92 92
 						<input name="affiliate_id" class="regular-text" type="text" value="<?php echo $affiliate_id; ?>" />
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 					</label>
116 116
 				</th>
117 117
 				<td>
118
-					<?php echo EEH_Form_Fields::select_input('help_tour_activation', $values, $help_tour_activation ); ?>
118
+					<?php echo EEH_Form_Fields::select_input('help_tour_activation', $values, $help_tour_activation); ?>
119 119
 				</td>
120 120
 			</tr>
121 121
 		</tbody>
Please login to merge, or discard this patch.
help_tabs/payment_methods_overview_paypalstandard.help_tab.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 <?php _e('Adjust the settings for the PayPal Standard payment gateway.', 'event_espresso'); ?>
4 4
 </p>
5 5
 <p>
6
-<?php printf( __( 'See %1$shere%2$s for list of currencies supported by Paypal Standard.', 'event_espresso' ), "<a href='https://www.paypal.com/multicurrency' target='_blank'>","</a>" ); ?>
6
+<?php printf(__('See %1$shere%2$s for list of currencies supported by Paypal Standard.', 'event_espresso'), "<a href='https://www.paypal.com/multicurrency' target='_blank'>", "</a>"); ?>
7 7
 </p>
8 8
 <p><strong><?php _e('PayPal Standard Settings', 'event_espresso'); ?></strong></p>
9 9
 <ul>
@@ -21,18 +21,18 @@  discard block
 block discarded – undo
21 21
 </li>
22 22
 <li>
23 23
 <strong><?php _e('PayPal Calculates Taxes', 'event_espresso'); ?></strong><br />
24
-<?php printf( __('If set to "Yes", we will indicate to PayPal that it should calculate the taxes on the order and add it. This means PayPal\'s tax calculations will be used on the order instead of Event Espresso\'s. %1$sRead here for more information.%2$s', 'event_espresso'), "<a href='https://www.paypal.com/ca/cgi-bin/webscr?cmd=xpt/Marketing/shipping/EasyCalculateShipAndTax-outside' target='_blank'>", '</a>' ); ?><br/>
25
-<?php _e( 'Note: It may confuse users if Event Espresso initially calculates taxes on the order, and then they go to PayPal and it calculates taxes differently. So it is recommended that if PayPal is calculating taxes, that you do not set any taxes in Event Espresso.', 'event_espresso' );?>
24
+<?php printf(__('If set to "Yes", we will indicate to PayPal that it should calculate the taxes on the order and add it. This means PayPal\'s tax calculations will be used on the order instead of Event Espresso\'s. %1$sRead here for more information.%2$s', 'event_espresso'), "<a href='https://www.paypal.com/ca/cgi-bin/webscr?cmd=xpt/Marketing/shipping/EasyCalculateShipAndTax-outside' target='_blank'>", '</a>'); ?><br/>
25
+<?php _e('Note: It may confuse users if Event Espresso initially calculates taxes on the order, and then they go to PayPal and it calculates taxes differently. So it is recommended that if PayPal is calculating taxes, that you do not set any taxes in Event Espresso.', 'event_espresso'); ?>
26 26
 </li>
27 27
 <li>
28 28
 <strong><?php _e('PayPal Calculates Shipping', 'event_espresso'); ?></strong><br />
29 29
 <?php _e('Similar to the "PayPal Calculates Taxes" setting, if this is set to "Yes", we will indicate to PayPal that it should calculate the shipping on each payment (if there are multiple payments for a single transaction, PayPal is permitted to add shipping charges to each payment.)', 'event_espresso'); ?><br/>
30
-<?php _e( 'Important Note: PayPal will ONLY calculate shipping on an order if "Shipping Address Options" is set to "Prompt for an Address" (otherwise how will PayPal know how much to charge for shipping if it doesn\'t know where it\'s shipping to?)', 'event_espresso' );?>
30
+<?php _e('Important Note: PayPal will ONLY calculate shipping on an order if "Shipping Address Options" is set to "Prompt for an Address" (otherwise how will PayPal know how much to charge for shipping if it doesn\'t know where it\'s shipping to?)', 'event_espresso'); ?>
31 31
 <li>
32
-<strong><?php _e( 'Notes Regarding Paypal Taxes and Shipping', 'event_espresso' );?></strong><br/>
33
-<?php _e( 'If you want PayPal to calculate taxes and shipping on an order, those changes will NOT appear during the initial registration process until the user is redirected to PayPal for payment.', 'event_espresso' );?><br/>
34
-<?php _e( 'However, after the user has returned from PayPal, their order in Event Espresso will be updated with the new taxes and added shipping charges (e.g. it will appear on their receipt.)', 'event_espresso' );?><br/>
35
-<?php _e( 'Also Note: In order for PayPal to properly calculate taxes and shipping, they need to receive the entire order at the same time. So if a user goes to make a payment using PayPal, and their order somehow already has a payment on it, PayPal CANNOT calculate taxes or shipping on that order.', 'event_espresso' );?>
32
+<strong><?php _e('Notes Regarding Paypal Taxes and Shipping', 'event_espresso'); ?></strong><br/>
33
+<?php _e('If you want PayPal to calculate taxes and shipping on an order, those changes will NOT appear during the initial registration process until the user is redirected to PayPal for payment.', 'event_espresso'); ?><br/>
34
+<?php _e('However, after the user has returned from PayPal, their order in Event Espresso will be updated with the new taxes and added shipping charges (e.g. it will appear on their receipt.)', 'event_espresso'); ?><br/>
35
+<?php _e('Also Note: In order for PayPal to properly calculate taxes and shipping, they need to receive the entire order at the same time. So if a user goes to make a payment using PayPal, and their order somehow already has a payment on it, PayPal CANNOT calculate taxes or shipping on that order.', 'event_espresso'); ?>
36 36
 </li>
37 37
 <li>
38 38
 <strong><?php _e('Shipping Address Options', 'event_espresso'); ?></strong><br />
Please login to merge, or discard this patch.
core/db_models/fields/EE_Infinite_Integer_Field.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -7,33 +7,33 @@  discard block
 block discarded – undo
7 7
  * other than explicitly setting it to EE_INF.
8 8
  * Makes use of constant EE_INF_IN_DB set in espresso.php, and EE_INF, which is a PHP constant definedin the ether
9 9
  */
10
-class EE_Infinite_Integer_Field extends EE_Model_Field_Base{
11
-	function get_wpdb_data_type(){
10
+class EE_Infinite_Integer_Field extends EE_Model_Field_Base {
11
+	function get_wpdb_data_type() {
12 12
 		return '%d';
13 13
 	}
14 14
 	function prepare_for_use_in_db($value_of_field_on_model_object) {
15
-		if($value_of_field_on_model_object === EE_INF){
15
+		if ($value_of_field_on_model_object === EE_INF) {
16 16
 			return EE_INF_IN_DB;
17
-		}else{
17
+		} else {
18 18
 			return intval($value_of_field_on_model_object);
19 19
 		}
20 20
 	}
21 21
 	function prepare_for_set($value_inputted_for_field_on_model_object) {
22
-		if($value_inputted_for_field_on_model_object === EE_INF_IN_DB ||
22
+		if ($value_inputted_for_field_on_model_object === EE_INF_IN_DB ||
23 23
 				$value_inputted_for_field_on_model_object === EE_INF ||
24 24
 				$value_inputted_for_field_on_model_object === "EE_INF" || 
25 25
 				$value_inputted_for_field_on_model_object === "" 
26
-				){
26
+				) {
27 27
 			return EE_INF;
28
-		}else{
28
+		} else {
29 29
 			return intval($value_inputted_for_field_on_model_object);
30 30
 		}
31 31
 	}
32 32
 	function prepare_for_set_from_db($value_inputted_for_field_on_model_object) {
33 33
 		$intval = intval($value_inputted_for_field_on_model_object);
34
-		if($intval == EE_INF_IN_DB){
34
+		if ($intval == EE_INF_IN_DB) {
35 35
 			return EE_INF;
36
-		}else{
36
+		} else {
37 37
 			return $intval;
38 38
 		}
39 39
 	}
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 	 * @param string $schema input, symbol, text; or any string you want to show if the value equals EE_INF
47 47
 	 * @return string
48 48
 	 */
49
-	function prepare_for_pretty_echoing( $value_on_field_to_be_outputted, $schema = null ) {
50
-		if( $value_on_field_to_be_outputted === EE_INF ){
51
-			switch($schema){
49
+	function prepare_for_pretty_echoing($value_on_field_to_be_outputted, $schema = null) {
50
+		if ($value_on_field_to_be_outputted === EE_INF) {
51
+			switch ($schema) {
52 52
 				case 'input':
53 53
 				case 'form_input':
54 54
 					return '';
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 	function prepare_for_use_in_db($value_of_field_on_model_object) {
15 15
 		if($value_of_field_on_model_object === EE_INF){
16 16
 			return EE_INF_IN_DB;
17
-		}else{
17
+		} else{
18 18
 			return intval($value_of_field_on_model_object);
19 19
 		}
20 20
 	}
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 				$value_inputted_for_field_on_model_object === "" 
26 26
 				){
27 27
 			return EE_INF;
28
-		}else{
28
+		} else{
29 29
 			return intval($value_inputted_for_field_on_model_object);
30 30
 		}
31 31
 	}
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 		$intval = intval($value_inputted_for_field_on_model_object);
34 34
 		if($intval == EE_INF_IN_DB){
35 35
 			return EE_INF;
36
-		}else{
36
+		} else{
37 37
 			return $intval;
38 38
 		}
39 39
 	}
Please login to merge, or discard this patch.
shortcodes/espresso_events/EES_Espresso_Events.shortcode.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -50,14 +50,14 @@  discard block
 block discarded – undo
50 50
 	 * @param WP $WP
51 51
 	 * @return    void
52 52
 	 */
53
-	public function run( WP $WP ) {
54
-		if ( did_action( 'pre_get_posts' ) && did_action( 'send_headers' ) ) {
53
+	public function run(WP $WP) {
54
+		if (did_action('pre_get_posts') && did_action('send_headers')) {
55 55
 			EED_Events_Archive::instance()->event_list();
56 56
 		} else {
57 57
 			// this will trigger the EED_Events_Archive module's event_list() method during the pre_get_posts hook point,
58 58
 			// this allows us to initialize things, enqueue assets, etc,
59 59
 			// as well, this saves an instantiation of the module in an array using 'espresso_events' as the key, so that we can retrieve it
60
-			add_action( 'pre_get_posts', array( EED_Events_Archive::instance(), 'event_list' ) );
60
+			add_action('pre_get_posts', array(EED_Events_Archive::instance(), 'event_list'));
61 61
 		}
62 62
 	}
63 63
 
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
 	 *  @param 	array 	$attributes
80 80
 	 *  @return 	string
81 81
 	 */
82
-	public function process_shortcode( $attributes = array() ) {
82
+	public function process_shortcode($attributes = array()) {
83 83
 		// make sure EED_Events_Archive is setup properly
84
-		if ( apply_filters( 'FHEE__fallback_shortcode_processor__EES_Espresso_Events', FALSE )) {
84
+		if (apply_filters('FHEE__fallback_shortcode_processor__EES_Espresso_Events', FALSE)) {
85 85
 			EED_Events_Archive::instance()->event_list();
86 86
 		}
87 87
 		// merge in any attributes passed via fallback shortcode processor
88
-		$attributes = array_merge( (array)$attributes, (array)$this->_attributes );
88
+		$attributes = array_merge((array) $attributes, (array) $this->_attributes);
89 89
 		//set default attributes
90 90
 		$default_espresso_events_shortcode_atts = array(
91 91
 			'title' => NULL,
@@ -99,26 +99,26 @@  discard block
 block discarded – undo
99 99
 			'fallback_shortcode_processor' => FALSE
100 100
 		);
101 101
 		// allow the defaults to be filtered
102
-		$default_espresso_events_shortcode_atts = apply_filters( 'EES_Espresso_Events__process_shortcode__default_espresso_events_shortcode_atts', $default_espresso_events_shortcode_atts );
102
+		$default_espresso_events_shortcode_atts = apply_filters('EES_Espresso_Events__process_shortcode__default_espresso_events_shortcode_atts', $default_espresso_events_shortcode_atts);
103 103
 		// grab attributes and merge with defaults, then extract
104
-		$attributes = array_merge( $default_espresso_events_shortcode_atts, $attributes );
104
+		$attributes = array_merge($default_espresso_events_shortcode_atts, $attributes);
105 105
 		// make sure we use the_excerpt()
106
-		add_filter( 'FHEE__EES_Espresso_Events__process_shortcode__true', '__return_true' );
106
+		add_filter('FHEE__EES_Espresso_Events__process_shortcode__true', '__return_true');
107 107
 		// apply query filters
108
-		add_filter( 'FHEE__EEH_Event_Query__apply_query_filters', '__return_true' );
108
+		add_filter('FHEE__EEH_Event_Query__apply_query_filters', '__return_true');
109 109
 		// run the query
110 110
 		global $wp_query;
111
-		$wp_query = new EE_Event_List_Query( $attributes );
111
+		$wp_query = new EE_Event_List_Query($attributes);
112 112
 		// check what template is loaded and load filters accordingly
113
-		EED_Events_Archive::instance()->template_include( 'loop-espresso_events.php' );
113
+		EED_Events_Archive::instance()->template_include('loop-espresso_events.php');
114 114
 		// load our template
115
-		$event_list = EEH_Template::locate_template( 'loop-espresso_events.php', array(), TRUE, TRUE );
115
+		$event_list = EEH_Template::locate_template('loop-espresso_events.php', array(), TRUE, TRUE);
116 116
 		// now reset the query and postdata
117 117
 		wp_reset_query();
118 118
 		wp_reset_postdata();
119 119
 		EED_Events_Archive::remove_all_events_archive_filters();
120 120
 		// remove query filters
121
-		remove_filter( 'FHEE__EEH_Event_Query__apply_query_filters', '__return_true' );
121
+		remove_filter('FHEE__EEH_Event_Query__apply_query_filters', '__return_true');
122 122
 		// pull our content from the output buffer and return it
123 123
 		return $event_list;
124 124
 	}
@@ -163,46 +163,46 @@  discard block
 block discarded – undo
163 163
 	 * @param array $args
164 164
 	 * @return \EE_Event_List_Query
165 165
 	 */
166
-	function __construct( $args = array() ) {
166
+	function __construct($args = array()) {
167 167
 //		EEH_Debug_Tools::printr( $args, '$args  <br /><span style="font-size:10px;font-weight:normal;">' . __FILE__ . '<br />line no: ' . __LINE__ . '</span>', 'auto' );
168 168
 		// incoming args could be a mix of WP query args + EE shortcode args
169
-		foreach ( $args as $key =>$value ) {
170
-			$property = '_' . $key;
169
+		foreach ($args as $key =>$value) {
170
+			$property = '_'.$key;
171 171
 			// if the arg is a property of this class, then it's an EE shortcode arg
172
-			if ( property_exists( $this, $property )) {
172
+			if (property_exists($this, $property)) {
173 173
 				// set the property value
174 174
 				$this->{$property} = $value;
175 175
 				// then remove it from the array of args that will later be passed to WP_Query()
176
-				unset( $args[ $key ] );
176
+				unset($args[$key]);
177 177
 			}
178 178
 		}
179 179
 		// setup the events list query
180
-		EE_Registry::instance()->load_helper( 'Event_Query' );
180
+		EE_Registry::instance()->load_helper('Event_Query');
181 181
 		//add query filters
182 182
 		EEH_Event_Query::add_query_filters();
183 183
 		// set params that will get used by the filters
184
-		EEH_Event_Query::set_query_params( $this->_month, $this->_category_slug, $this->_show_expired, $this->_order_by, $this->_sort );
184
+		EEH_Event_Query::set_query_params($this->_month, $this->_category_slug, $this->_show_expired, $this->_order_by, $this->_sort);
185 185
 		// first off, let's remove any filters from previous queries
186
-		remove_filter( 'FHEE__archive_espresso_events_template__upcoming_events_h1', array( $this, 'event_list_title' ));
187
-		remove_all_filters( 'FHEE__content_espresso_events__event_class' );
186
+		remove_filter('FHEE__archive_espresso_events_template__upcoming_events_h1', array($this, 'event_list_title'));
187
+		remove_all_filters('FHEE__content_espresso_events__event_class');
188 188
 		// Event List Title ?
189
-		add_filter( 'FHEE__archive_espresso_events_template__upcoming_events_h1', array( $this, 'event_list_title' ), 10, 1 );
189
+		add_filter('FHEE__archive_espresso_events_template__upcoming_events_h1', array($this, 'event_list_title'), 10, 1);
190 190
 		// add the css class
191
-		add_filter( 'FHEE__content_espresso_events__event_class', array( $this, 'event_list_css' ), 10, 1 );
191
+		add_filter('FHEE__content_espresso_events__event_class', array($this, 'event_list_css'), 10, 1);
192 192
 		// the current "page" we are viewing
193
-		$paged = max( 1, get_query_var( 'paged' ));
193
+		$paged = max(1, get_query_var('paged'));
194 194
 		// Force these args
195
-		$args = array_merge( $args, array(
195
+		$args = array_merge($args, array(
196 196
 			'post_type' => 'espresso_events',
197 197
 			'posts_per_page' => $this->_limit,
198 198
 			'update_post_term_cache' => FALSE,
199 199
 			'update_post_meta_cache' => FALSE,
200 200
 			'paged' => $paged,
201
-			'offset' => ( $paged - 1 ) * $this->_limit
201
+			'offset' => ($paged - 1) * $this->_limit
202 202
 		));
203 203
 
204 204
 		// run the query
205
-		parent::__construct( $args );
205
+		parent::__construct($args);
206 206
 	}
207 207
 
208 208
 
@@ -215,8 +215,8 @@  discard block
 block discarded – undo
215 215
 	 * @param string $event_list_title
216 216
 	 * @return    string
217 217
 	 */
218
-	public function event_list_title( $event_list_title = '' ) {
219
-		if ( ! empty( $this->_title )) {
218
+	public function event_list_title($event_list_title = '') {
219
+		if ( ! empty($this->_title)) {
220 220
 			return $this->_title;
221 221
 		}
222 222
 		return $event_list_title;
@@ -231,11 +231,11 @@  discard block
 block discarded – undo
231 231
 	 * @param string $event_list_css
232 232
 	 * @return    array
233 233
 	 */
234
-	public function event_list_css( $event_list_css = '' ) {
235
-		$event_list_css .=  ! empty( $event_list_css ) ? ' ' : '';
236
-		$event_list_css .=  ! empty( $this->_css_class ) ? $this->_css_class : '';
237
-		$event_list_css .=  ! empty( $event_list_css ) ? ' ' : '';
238
-		$event_list_css .=  ! empty( $this->_category_slug ) ? $this->_category_slug : '';
234
+	public function event_list_css($event_list_css = '') {
235
+		$event_list_css .= ! empty($event_list_css) ? ' ' : '';
236
+		$event_list_css .= ! empty($this->_css_class) ? $this->_css_class : '';
237
+		$event_list_css .= ! empty($event_list_css) ? ' ' : '';
238
+		$event_list_css .= ! empty($this->_category_slug) ? $this->_category_slug : '';
239 239
 		return $event_list_css;
240 240
 	}
241 241
 
Please login to merge, or discard this patch.
admin_pages/support/Support_Admin_Page.core.php 1 patch
Spacing   +19 added lines, -19 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
 /**
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 class Support_Admin_Page extends EE_Admin_Page {
31 31
 
32 32
 
33
-	public function __construct( $routing = TRUE ) {
34
-		parent::__construct( $routing );
33
+	public function __construct($routing = TRUE) {
34
+		parent::__construct($routing);
35 35
 	}
36 36
 
37 37
 
@@ -84,14 +84,14 @@  discard block
 block discarded – undo
84 84
 				'nav' => array(
85 85
 					'label' => __('Shortcodes', 'event_espresso'),
86 86
 					'order' => 30),
87
-				'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array('_shortcodes_boxes' ) ),
87
+				'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_shortcodes_boxes')),
88 88
 				'require_nonce' => FALSE
89 89
 				),
90 90
 			'contact_support' => array(
91 91
 				'nav' => array(
92 92
 					'label' => __('Support', 'event_espresso'),
93 93
 					'order' => 40),
94
-				'metaboxes' => array_merge( $this->_default_espresso_metaboxes, array( '_support_boxes' ) ),
94
+				'metaboxes' => array_merge($this->_default_espresso_metaboxes, array('_support_boxes')),
95 95
 				'require_nonce' => FALSE
96 96
 				),
97 97
 			'developers' => array(
@@ -119,8 +119,8 @@  discard block
 block discarded – undo
119 119
 
120 120
 
121 121
 	protected function _installation() {
122
-		$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_installation.template.php';
123
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template( $template_path, '', TRUE);
122
+		$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'support_admin_details_installation.template.php';
123
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, '', TRUE);
124 124
 		$this->display_admin_page_with_sidebar();
125 125
 	}
126 126
 
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
 			'other_resources' => __('Other Resources', 'event_espresso')
146 146
 			);
147 147
 
148
-		foreach ( $boxes as $box => $label ) {
149
-			$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_' . $box . '.template.php';
148
+		foreach ($boxes as $box => $label) {
149
+			$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'support_admin_details_'.$box.'.template.php';
150 150
 			$callback_args = array('template_path' => $template_path);
151
-			add_meta_box( 'espresso_' . $box . '_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE );'), $this->_current_screen_id, 'normal', 'high', $callback_args);
151
+			add_meta_box('espresso_'.$box.'_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE );'), $this->_current_screen_id, 'normal', 'high', $callback_args);
152 152
 		}
153 153
 	}
154 154
 
@@ -169,15 +169,15 @@  discard block
 block discarded – undo
169 169
 			'shortcodes_event_listings' => __('Event Listings', 'event_espresso'),
170 170
 			'shortcodes_ticket_selector' => __('Event Ticket Selector', 'event_espresso'),
171 171
 			'shortcodes_category' => __('Event Categories', 'event_espresso'),
172
-			'shortcodes_attendee' => __( 'Event Attendees', 'event_espresso' )
172
+			'shortcodes_attendee' => __('Event Attendees', 'event_espresso')
173 173
 			/*'shortcodes_single_events' => __('Single Events', 'event_espresso'),*/
174 174
 			/*'shortcodes_attendee_listings' => __('Attendee Listings', 'event_espresso'),*/
175 175
 			);
176 176
 
177
-		foreach ( $boxes as $box => $label ) {
178
-			$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_' . $box . '.template.php';
177
+		foreach ($boxes as $box => $label) {
178
+			$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'support_admin_details_'.$box.'.template.php';
179 179
 			$callback_args = array('template_path' => $template_path);
180
-			add_meta_box( 'espresso_' . $box . '_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE );'), $this->_current_screen_id, 'normal', 'high', $callback_args);
180
+			add_meta_box('espresso_'.$box.'_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], "", TRUE );'), $this->_current_screen_id, 'normal', 'high', $callback_args);
181 181
 		}
182 182
 	}
183 183
 
@@ -196,17 +196,17 @@  discard block
 block discarded – undo
196 196
 			'important_information' => __('Important Information', 'event_espresso')
197 197
 			);
198 198
 
199
-		foreach ( $boxes as $box => $label ) {
200
-			$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'support_admin_details_' . $box . '.template.php';
199
+		foreach ($boxes as $box => $label) {
200
+			$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'support_admin_details_'.$box.'.template.php';
201 201
 			$callback_args = array('template_path' => $template_path, 'template_args' => $this->_template_args);
202
-			add_meta_box( 'espresso_' . $box . '_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], $metabox["args"]["template_args"], TRUE );'), $this->_current_screen_id, 'normal', 'high', $callback_args);
202
+			add_meta_box('espresso_'.$box.'_settings', $label, create_function('$post, $metabox', 'echo EEH_Template::display_template( $metabox["args"]["template_path"], $metabox["args"]["template_args"], TRUE );'), $this->_current_screen_id, 'normal', 'high', $callback_args);
203 203
 		}
204 204
 	}
205 205
 
206 206
 
207 207
 	protected function _developers() {
208
-		$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH . 'developers_admin_details.template.php';
209
-		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, array(), true );
208
+		$template_path = EE_SUPPORT_ADMIN_TEMPLATE_PATH.'developers_admin_details.template.php';
209
+		$this->_template_args['admin_page_content'] = EEH_Template::display_template($template_path, array(), true);
210 210
 		$this->display_admin_page_with_sidebar();
211 211
 	}
212 212
 } //end Support_Admin_Page class
Please login to merge, or discard this patch.
payments/help_tabs/payment_methods_overview_mijireh.help_tab.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,10 +4,10 @@
 block discarded – undo
4 4
 	</strong>
5 5
 </p>
6 6
 <p>
7
-<?php printf(__('Mijireh is basically a middle-man between Event Espresso and over 90 payment gateways. Most of the configuration occurs on %sMijireh\' website%s, where you configure your Mijireh store with the %spayment gateway of your choice%s.', 'event_espresso'),'<a href="http://www.mijireh.com/">','</a>','<a href="http://www.mijireh.com/docs/payment-gateways/">','</a>'); ?>
7
+<?php printf(__('Mijireh is basically a middle-man between Event Espresso and over 90 payment gateways. Most of the configuration occurs on %sMijireh\' website%s, where you configure your Mijireh store with the %spayment gateway of your choice%s.', 'event_espresso'), '<a href="http://www.mijireh.com/">', '</a>', '<a href="http://www.mijireh.com/docs/payment-gateways/">', '</a>'); ?>
8 8
 </p>
9 9
 <p><strong><?php _e('Mijireh Checkout Page Design', 'event_espresso'); ?></strong></p>
10 10
 <p>
11
-<?php _e("As you're probably aware, when users pay with Mijireh Gateway, they are taken to a secure offsite page, hosted by Mijireh. This page can easily be made to have the look-and-feel of your website through a process called 'slurping', where Mijireh 'slurps' up your website's design and uses it on their checkout page. ", 'event_espresso');?>
12
-<?php printf(__("In order to do this, we automatically create a new WordPress page which is design to be slurped by Mijireh. You can customize the page like any other, but the page must contain Mijireh's special '{{mijireh-checkout-form}}' shortcode. Once you have finished designing the page, publish it, and %s then click the special 'slurp now' button%s. Mijireh may take several minutes to slurp the page. Once Mijireh is finished slurping, you can delete the page, or mark it as a draft. ", 'event_espresso'),'<a href="https://docs.google.com/a/eventespresso.com/file/d/0B5P8GXTvZgfMdjREYUtGM18wSms/edit?usp=drivesdk">','</a>');?>
11
+<?php _e("As you're probably aware, when users pay with Mijireh Gateway, they are taken to a secure offsite page, hosted by Mijireh. This page can easily be made to have the look-and-feel of your website through a process called 'slurping', where Mijireh 'slurps' up your website's design and uses it on their checkout page. ", 'event_espresso'); ?>
12
+<?php printf(__("In order to do this, we automatically create a new WordPress page which is design to be slurped by Mijireh. You can customize the page like any other, but the page must contain Mijireh's special '{{mijireh-checkout-form}}' shortcode. Once you have finished designing the page, publish it, and %s then click the special 'slurp now' button%s. Mijireh may take several minutes to slurp the page. Once Mijireh is finished slurping, you can delete the page, or mark it as a draft. ", 'event_espresso'), '<a href="https://docs.google.com/a/eventespresso.com/file/d/0B5P8GXTvZgfMdjREYUtGM18wSms/edit?usp=drivesdk">', '</a>'); ?>
13 13
 </p>
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
core/data_migration_scripts/EE_DMS_Core_4_8_0.dms.php 1 patch
Spacing   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -13,13 +13,13 @@  discard block
 block discarded – undo
13 13
 //(all other times it gets resurrected from a wordpress option)
14 14
 $stages = glob(EE_CORE.'data_migration_scripts/4_8_0_stages/*');
15 15
 $class_to_filepath = array();
16
-foreach($stages as $filepath){
16
+foreach ($stages as $filepath) {
17 17
 	$matches = array();
18
-	preg_match('~4_8_0_stages/(.*).dmsstage.php~',$filepath,$matches);
18
+	preg_match('~4_8_0_stages/(.*).dmsstage.php~', $filepath, $matches);
19 19
 	$class_to_filepath[$matches[1]] = $filepath;
20 20
 }
21 21
 //give addons a chance to autoload their stages too
22
-$class_to_filepath = apply_filters('FHEE__EE_DMS_4_8_0__autoloaded_stages',$class_to_filepath);
22
+$class_to_filepath = apply_filters('FHEE__EE_DMS_4_8_0__autoloaded_stages', $class_to_filepath);
23 23
 EEH_Autoloader::register_autoloader($class_to_filepath);
24 24
 
25 25
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
  * @since                4.6.0
36 36
  *
37 37
  */
38
-class EE_DMS_Core_4_8_0 extends EE_Data_Migration_Script_Base{
38
+class EE_DMS_Core_4_8_0 extends EE_Data_Migration_Script_Base {
39 39
 
40 40
 	/**
41 41
 	 * return EE_DMS_Core_4_8_0
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
 	 */
63 63
 	public function can_migrate_from_version($version_array) {
64 64
 		$version_string = $version_array['Core'];
65
-		if( $version_string <= '4.8.0' && $version_string >= '4.7.0' ){
65
+		if ($version_string <= '4.8.0' && $version_string >= '4.7.0') {
66 66
 //			echo "$version_string can be migrated from";
67 67
 			return true;
68
-		}elseif( ! $version_string ){
68
+		}elseif ( ! $version_string) {
69 69
 //			echo "no version string provided: $version_string";
70 70
 			//no version string provided... this must be pre 4.3
71
-			return false;//changed mind. dont want people thinking they should migrate yet because they cant
72
-		}else{
71
+			return false; //changed mind. dont want people thinking they should migrate yet because they cant
72
+		} else {
73 73
 //			echo "$version_string doesnt apply";
74 74
 			return false;
75 75
 		}
@@ -90,18 +90,18 @@  discard block
 block discarded – undo
90 90
 	 * @return bool
91 91
 	 */
92 92
 	public function schema_changes_before_migration() {
93
-		$now_in_mysql = current_time( 'mysql', true );
93
+		$now_in_mysql = current_time('mysql', true);
94 94
 
95
-		require_once( EE_HELPERS . 'EEH_Activation.helper.php' );
96
-		$table_name='esp_answer';
97
-		$sql=" ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
95
+		require_once(EE_HELPERS.'EEH_Activation.helper.php');
96
+		$table_name = 'esp_answer';
97
+		$sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
98 98
 					REG_ID INT UNSIGNED NOT NULL,
99 99
 					QST_ID INT UNSIGNED NOT NULL,
100 100
 					ANS_value TEXT NOT NULL,
101 101
 					PRIMARY KEY  (ANS_ID),
102 102
 					KEY REG_ID (REG_ID),
103 103
 					KEY QST_ID (QST_ID)";
104
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
104
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
105 105
 
106 106
 		$table_name = 'esp_attendee_meta';
107 107
 		$sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 					  CNT_is_EU TINYINT(1) DEFAULT '0',
142 142
 					  CNT_active TINYINT(1) DEFAULT '0',
143 143
 					  PRIMARY KEY  (CNT_ISO)";
144
-		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB' );
144
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
145 145
 
146 146
 		$table_name = 'esp_currency';
147 147
 		$sql = "CUR_code VARCHAR(6) COLLATE utf8_bin NOT NULL,
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 				CUR_dec_plc VARCHAR(1) COLLATE utf8_bin NOT NULL DEFAULT '2',
152 152
 				CUR_active TINYINT(1) DEFAULT '0',
153 153
 				PRIMARY KEY  (CUR_code)";
154
-		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB' );
154
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
155 155
 
156 156
 
157 157
 		$table_name = 'esp_currency_payment_method';
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 						KEY EVT_ID (EVT_ID),
182 182
 						KEY DTT_is_primary (DTT_is_primary)";
183 183
 
184
-		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB' );
184
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
185 185
 
186 186
 		$table_name = 'esp_event_meta';
187 187
 		$sql = "
@@ -200,41 +200,41 @@  discard block
 block discarded – undo
200 200
 			EVT_donations TINYINT(1) NULL,
201 201
 			PRIMARY KEY  (EVTM_ID),
202 202
 			KEY EVT_ID (EVT_ID)";
203
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
203
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
204 204
 
205 205
 
206 206
 
207
-		$table_name='esp_event_question_group';
208
-		$sql="EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
207
+		$table_name = 'esp_event_question_group';
208
+		$sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
209 209
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL,
210 210
 					QSG_ID INT UNSIGNED NOT NULL,
211 211
 					EQG_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
212 212
 					PRIMARY KEY  (EQG_ID),
213 213
 					KEY EVT_ID (EVT_ID),
214 214
 					KEY QSG_ID (QSG_ID)";
215
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
215
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
216 216
 
217 217
 
218 218
 
219
-		$table_name='esp_event_venue';
220
-		$sql="EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
219
+		$table_name = 'esp_event_venue';
220
+		$sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
221 221
 				EVT_ID BIGINT(20) UNSIGNED NOT NULL,
222 222
 				VNU_ID BIGINT(20) UNSIGNED NOT NULL,
223 223
 				EVV_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
224 224
 				PRIMARY KEY  (EVV_ID)";
225
-		$this->_table_has_not_changed_since_previous($table_name,$sql, 'ENGINE=InnoDB');
225
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
226 226
 
227 227
 
228 228
 
229
-		$table_name='esp_extra_meta';
230
-		$sql="EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
229
+		$table_name = 'esp_extra_meta';
230
+		$sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
231 231
 				OBJ_ID INT(11) DEFAULT NULL,
232 232
 				EXM_type VARCHAR(45) DEFAULT NULL,
233 233
 				EXM_key VARCHAR(45) DEFAULT NULL,
234 234
 				EXM_value TEXT,
235 235
 				PRIMARY KEY  (EXM_ID),
236 236
 				KEY EXM_type (EXM_type,OBJ_ID,EXM_key)";
237
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
237
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
238 238
 
239 239
 		$table_name = 'esp_extra_join';
240 240
 		$sql = "EXJ_ID INT(11) NOT NULL AUTO_INCREMENT,
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
 				KEY second_model (EXJ_second_model_name,EXJ_second_model_id)";
248 248
 		$this->_table_is_new_in_this_version($table_name, $sql, 'ENGINE=InnoDB ');
249 249
 
250
-		$table_name='esp_line_item';
251
-		$sql="LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
250
+		$table_name = 'esp_line_item';
251
+		$sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
252 252
 				LIN_code VARCHAR(245) NOT NULL DEFAULT '',
253 253
 				TXN_ID INT(11) DEFAULT NULL,
254 254
 				LIN_name VARCHAR(245) NOT NULL DEFAULT '',
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 				PRIMARY KEY  (LIN_ID),
268 268
 				KEY LIN_code (LIN_code(191)),
269 269
 				KEY TXN_ID (TXN_ID)";
270
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB' );
270
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
271 271
 
272 272
 		$table_name = 'esp_log';
273 273
 		$sql = "LOG_ID INT(11) NOT NULL AUTO_INCREMENT,
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 					MTP_is_active TINYINT(1) NOT NULL DEFAULT '1',
307 307
 					PRIMARY KEY  (GRP_ID),
308 308
 					KEY MTP_user_id (MTP_user_id)";
309
-		$this->_table_has_not_changed_since_previous( $table_name, $sql, 'ENGINE=InnoDB');
309
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
310 310
 
311 311
 		$table_name = 'esp_event_message_template';
312 312
 		$sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 					PRIMARY KEY  (EMT_ID),
316 316
 					KEY EVT_ID (EVT_ID),
317 317
 					KEY GRP_ID (GRP_ID)";
318
-		$this->_table_has_not_changed_since_previous( $table_name, $sql, 'ENGINE=InnoDB');
318
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
319 319
 
320 320
 
321 321
 		$table_name = 'esp_payment';
@@ -388,8 +388,8 @@  discard block
 block discarded – undo
388 388
 					  PRIMARY KEY  (TTM_ID)";
389 389
 		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
390 390
 
391
-		$table_name='esp_question';
392
-		$sql='QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
391
+		$table_name = 'esp_question';
392
+		$sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
393 393
 					QST_display_text TEXT NOT NULL,
394 394
 					QST_admin_label VARCHAR(255) NOT NULL,
395 395
 					QST_system VARCHAR(25) DEFAULT NULL,
@@ -403,22 +403,22 @@  discard block
 block discarded – undo
403 403
 					QST_deleted TINYINT UNSIGNED NOT NULL DEFAULT 0,
404 404
 					PRIMARY KEY  (QST_ID),
405 405
 					KEY QST_order (QST_order)';
406
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
406
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
407 407
 
408
-		$table_name='esp_question_group_question';
409
-		$sql="QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
408
+		$table_name = 'esp_question_group_question';
409
+		$sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
410 410
 					QSG_ID INT UNSIGNED NOT NULL,
411 411
 					QST_ID INT UNSIGNED NOT NULL,
412 412
 					QGQ_order INT UNSIGNED NOT NULL DEFAULT 0,
413 413
 					PRIMARY KEY  (QGQ_ID),
414 414
 					KEY QST_ID (QST_ID),
415 415
 					KEY QSG_ID_order (QSG_ID,QGQ_order)";
416
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
416
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
417 417
 
418 418
 
419 419
 
420
-		$table_name='esp_question_option';
421
-		$sql="QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
420
+		$table_name = 'esp_question_option';
421
+		$sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
422 422
 					QSO_value VARCHAR(255) NOT NULL,
423 423
 					QSO_desc TEXT NOT NULL,
424 424
 					QST_ID INT UNSIGNED NOT NULL,
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 					PRIMARY KEY  (QSO_ID),
429 429
 					KEY QST_ID (QST_ID),
430 430
 					KEY QSO_order (QSO_order)";
431
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
431
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
432 432
 
433 433
 
434 434
 
@@ -474,8 +474,8 @@  discard block
 block discarded – undo
474 474
 
475 475
 
476 476
 
477
-		$table_name='esp_checkin';
478
-		$sql="CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
477
+		$table_name = 'esp_checkin';
478
+		$sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
479 479
 					REG_ID INT(10) UNSIGNED NOT NULL,
480 480
 					DTT_ID INT(10) UNSIGNED NOT NULL,
481 481
 					CHK_in TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
 					  PRC_parent INT(10) UNSIGNED DEFAULT 0,
571 571
 					  PRIMARY KEY  (PRC_ID),
572 572
 					  KEY PRT_ID (PRT_ID)";
573
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
573
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
574 574
 
575 575
 		$table_name = "esp_price_type";
576 576
 		$sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -608,10 +608,10 @@  discard block
 block discarded – undo
608 608
 					  TKT_deleted TINYINT(1) NOT NULL DEFAULT '0',
609 609
 					  PRIMARY KEY  (TKT_ID),
610 610
 					  KEY TKT_start_date (TKT_start_date)";
611
-		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB' );
611
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
612 612
 
613 613
 		$table_name = 'esp_question_group';
614
-		$sql='QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
614
+		$sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
615 615
 					QSG_name VARCHAR(255) NOT NULL,
616 616
 					QSG_identifier VARCHAR(100) NOT NULL,
617 617
 					QSG_desc TEXT NULL,
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
 					PRIMARY KEY  (QSG_ID),
625 625
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier),
626 626
 					KEY QSG_order (QSG_order)';
627
-		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB' );
627
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
628 628
 
629 629
 		/** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */
630 630
 		$script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
@@ -660,7 +660,7 @@  discard block
 block discarded – undo
660 660
 		return $script_4_7_defaults->schema_changes_after_migration();
661 661
 	}
662 662
 
663
-	public function migration_page_hooks(){
663
+	public function migration_page_hooks() {
664 664
 
665 665
 	}
666 666
 	
@@ -674,19 +674,19 @@  discard block
 block discarded – undo
674 674
 		//CNT_ISO, CNT_ISO3, RGN_ID, CNT_name, CNT_cur_code, CNT_cur_single, CNT_cur_plural, CNT_cur_sign, CNT_cur_sign_b4, CNT_cur_dec_plc, CNT_tel_code, CNT_is_EU, CNT_active
675 675
 		//('AD', 'AND', 0, 'Andorra', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+376', 0, 0),
676 676
 		$newer_countries = array(
677
-			array( 'AX', 'ALA', 0, 'Alan Islands', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+358', 1, 0 ),
678
-			array( 'BL', 'BLM', 0, 'Saint Barthelemy', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+590', 1, 0 ),
679
-			array( 'CW', 'CUW', 0, 'Curacao', 'ANG', 'Guilder', 'Guilders', 'ƒ', 1, 2, '+599', 1, 0 ),
680
-			array( 'GG', 'GGY', 0, 'Guernsey', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+44', 0, 0 ),
681
-			array( 'IM', 'IMN', 0, 'Isle of Man', 'GBP', 'Pound', 'Pounds', '£', 1, 2,  '+44', 0, 0  ),
682
-			array( 'JE', 'JEY', 0, 'Jersey', 'GBP', 'Pound', 'Pounds', '£', 1, 2, '+44', 0, 0 ),
683
-			array( 'MF', 'MAF', 0, 'Saint Martin', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+590', 1, 0 ),
684
-			array( 'MN', 'MNE', 0, 'Montenegro', 'EUR', 'Euro', 'Euros', '€', 1,  2, '+382', 0, 0 ),
685
-			array( 'RS', 'SRB', 0, 'Serbia', 'RSD', 'Dinar', 'Dinars', '', 0, 2, '+941', 1, 0 ),
686
-			array( 'SS', 'SSD', 0, 'South Sudan', 'SSP', 'Pound', 'Pounds', '£', 1, 2, '+211', 0, 0 ),
687
-			array( 'SX', 'SXM', 0, 'Sint Maarten', 'ANG', 'Guilder', 'Guilders', 'ƒ', 1, 2, '+1', 1, 0 ),
688
-			array( 'XK', 'XKX', 0, 'Kosovo', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+381', 0, 0 ),
689
-			array( 'YT', 'MYT', 0, 'Mayotte', 'EUR', 'Euro', 'Euros', '€', 0, 2, '+262', 1, 0 ),
677
+			array('AX', 'ALA', 0, 'Alan Islands', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+358', 1, 0),
678
+			array('BL', 'BLM', 0, 'Saint Barthelemy', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+590', 1, 0),
679
+			array('CW', 'CUW', 0, 'Curacao', 'ANG', 'Guilder', 'Guilders', 'ƒ', 1, 2, '+599', 1, 0),
680
+			array('GG', 'GGY', 0, 'Guernsey', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+44', 0, 0),
681
+			array('IM', 'IMN', 0, 'Isle of Man', 'GBP', 'Pound', 'Pounds', '£', 1, 2, '+44', 0, 0),
682
+			array('JE', 'JEY', 0, 'Jersey', 'GBP', 'Pound', 'Pounds', '£', 1, 2, '+44', 0, 0),
683
+			array('MF', 'MAF', 0, 'Saint Martin', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+590', 1, 0),
684
+			array('MN', 'MNE', 0, 'Montenegro', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+382', 0, 0),
685
+			array('RS', 'SRB', 0, 'Serbia', 'RSD', 'Dinar', 'Dinars', '', 0, 2, '+941', 1, 0),
686
+			array('SS', 'SSD', 0, 'South Sudan', 'SSP', 'Pound', 'Pounds', '£', 1, 2, '+211', 0, 0),
687
+			array('SX', 'SXM', 0, 'Sint Maarten', 'ANG', 'Guilder', 'Guilders', 'ƒ', 1, 2, '+1', 1, 0),
688
+			array('XK', 'XKX', 0, 'Kosovo', 'EUR', 'Euro', 'Euros', '€', 1, 2, '+381', 0, 0),
689
+			array('YT', 'MYT', 0, 'Mayotte', 'EUR', 'Euro', 'Euros', '€', 0, 2, '+262', 1, 0),
690 690
 		);
691 691
 		global $wpdb;
692 692
 		$country_table = $wpdb->prefix."esp_country";
@@ -705,14 +705,14 @@  discard block
 block discarded – undo
705 705
 							"CNT_is_EU" => '%d',
706 706
 							"CNT_active" => '%d',
707 707
 						);
708
-		if ( $wpdb->get_var( "SHOW TABLES LIKE '" . $country_table . "'") == $country_table ) {
709
-			foreach( $newer_countries as $country ) {
710
-				$SQL = "SELECT COUNT('CNT_ISO') FROM {$country_table} WHERE CNT_ISO='{$country[0]}' LIMIT 1" ;
708
+		if ($wpdb->get_var("SHOW TABLES LIKE '".$country_table."'") == $country_table) {
709
+			foreach ($newer_countries as $country) {
710
+				$SQL = "SELECT COUNT('CNT_ISO') FROM {$country_table} WHERE CNT_ISO='{$country[0]}' LIMIT 1";
711 711
 				$countries = $wpdb->get_var($SQL);
712
-				if ( ! $countries ) {
712
+				if ( ! $countries) {
713 713
 
714
-					$wpdb->insert( $country_table,
715
-							array_combine( array_keys( $country_format), $country ),
714
+					$wpdb->insert($country_table,
715
+							array_combine(array_keys($country_format), $country),
716 716
 							$country_format
717 717
 							);
718 718
 				}
@@ -730,7 +730,7 @@  discard block
 block discarded – undo
730 730
 		// CUR_code, CUR_single, CUR_plural, CUR_sign, CUR_dec_plc, CUR_active
731 731
 		//( 'EUR',  'Euro',  'Euros',  '€',  2,1),
732 732
 		$newer_currencies = array(
733
-			array( 'RSD', 'Dinar', 'Dinars', '', 3, 1 ),
733
+			array('RSD', 'Dinar', 'Dinars', '', 3, 1),
734 734
 		);
735 735
 		global $wpdb;
736 736
 		$currency_table = $wpdb->prefix."esp_currency";
@@ -742,14 +742,14 @@  discard block
 block discarded – undo
742 742
 							"CUR_dec_plc" => '%d',
743 743
 							"CUR_active" => '%d',
744 744
 						);
745
-		if ( $wpdb->get_var( "SHOW TABLES LIKE '" . $currency_table . "'") == $currency_table ) {
746
-			foreach( $newer_currencies as $currency ) {
747
-				$SQL = "SELECT COUNT('CUR_code') FROM {$currency_table} WHERE CUR_code='{$currency[0]}' LIMIT 1" ;
745
+		if ($wpdb->get_var("SHOW TABLES LIKE '".$currency_table."'") == $currency_table) {
746
+			foreach ($newer_currencies as $currency) {
747
+				$SQL = "SELECT COUNT('CUR_code') FROM {$currency_table} WHERE CUR_code='{$currency[0]}' LIMIT 1";
748 748
 				$countries = $wpdb->get_var($SQL);
749
-				if ( ! $countries ) {
749
+				if ( ! $countries) {
750 750
 
751
-					$wpdb->insert( $currency_table,
752
-							array_combine( array_keys( $currency_format), $currency ),
751
+					$wpdb->insert($currency_table,
752
+							array_combine(array_keys($currency_format), $currency),
753 753
 							$currency_format
754 754
 							);
755 755
 				}
@@ -761,9 +761,9 @@  discard block
 block discarded – undo
761 761
 	 * which should just be a temporary issue for folks who installed 4.8.0-4.8.5;
762 762
 	 * we should be able to stop doing this in 4.9
763 763
 	 */
764
-	public function fix_non_default_taxes(){
764
+	public function fix_non_default_taxes() {
765 765
 		global $wpdb;
766
-		$query = $wpdb->prepare( "UPDATE
766
+		$query = $wpdb->prepare("UPDATE
767 767
 				{$wpdb->prefix}esp_price p INNER JOIN
768 768
 				{$wpdb->prefix}esp_price_type pt ON p.PRT_ID = pt.PRT_ID
769 769
 			SET
@@ -771,8 +771,8 @@  discard block
 block discarded – undo
771 771
 			WHERE
772 772
 				p.PRC_is_default = 0 AND
773 773
 				pt.PBT_ID = %d
774
-					", EEM_Price_Type::base_type_tax );
775
-		$wpdb->query( $query );
774
+					", EEM_Price_Type::base_type_tax);
775
+		$wpdb->query($query);
776 776
 	}
777 777
 }
778 778
 
Please login to merge, or discard this patch.
core/data_migration_scripts/EE_DMS_Core_4_7_0.dms.php 1 patch
Spacing   +49 added lines, -49 removed lines patch added patch discarded remove patch
@@ -14,13 +14,13 @@  discard block
 block discarded – undo
14 14
 // (all other times it gets resurrected from a wordpress option)
15 15
 $stages = glob(EE_CORE.'data_migration_scripts/4_7_0_stages/*');
16 16
 $class_to_filepath = array();
17
-foreach($stages as $filepath){
17
+foreach ($stages as $filepath) {
18 18
 	$matches = array();
19
-	preg_match('~4_7_0_stages/(.*).dmsstage.php~',$filepath,$matches);
19
+	preg_match('~4_7_0_stages/(.*).dmsstage.php~', $filepath, $matches);
20 20
 	$class_to_filepath[$matches[1]] = $filepath;
21 21
 }
22 22
 //give addons a chance to autoload their stages too
23
-$class_to_filepath = apply_filters('FHEE__EE_DMS_4_7_0__autoloaded_stages',$class_to_filepath);
23
+$class_to_filepath = apply_filters('FHEE__EE_DMS_4_7_0__autoloaded_stages', $class_to_filepath);
24 24
 EEH_Autoloader::register_autoloader($class_to_filepath);
25 25
 
26 26
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
  * @since                4.7.0
37 37
  *
38 38
  */
39
-class EE_DMS_Core_4_7_0 extends EE_Data_Migration_Script_Base{
39
+class EE_DMS_Core_4_7_0 extends EE_Data_Migration_Script_Base {
40 40
 
41 41
 	/**
42 42
 	 * return EE_DMS_Core_4_7_0
@@ -58,18 +58,18 @@  discard block
 block discarded – undo
58 58
 	 * @return bool
59 59
 	 */
60 60
 	public function can_migrate_from_version($version_array) {
61
-		EE_Registry::instance()->load_helper( 'Activation' );
61
+		EE_Registry::instance()->load_helper('Activation');
62 62
 		$version_string = $version_array['Core'];
63 63
 		if (
64
-			( $version_string <= '4.7.0' && $version_string >= '4.6.0' )
64
+			($version_string <= '4.7.0' && $version_string >= '4.6.0')
65 65
 			||
66
-			( $version_string >= '4.7.0' &&
67
-					! EEH_Activation::table_exists( 'esp_registration_payment' ) &&
68
-					EEH_Activation::table_exists( 'esp_registration' ) ) ) {
66
+			($version_string >= '4.7.0' &&
67
+					! EEH_Activation::table_exists('esp_registration_payment') &&
68
+					EEH_Activation::table_exists('esp_registration')) ) {
69 69
 			return true;
70
-		} elseif ( ! $version_string ) {
70
+		} elseif ( ! $version_string) {
71 71
 			//no version string provided... this must be pre 4.3
72
-			return false;//changed mind. dont want people thinking they should migrate yet because they cant
72
+			return false; //changed mind. dont want people thinking they should migrate yet because they cant
73 73
 		} else {
74 74
 			return false;
75 75
 		}
@@ -91,16 +91,16 @@  discard block
 block discarded – undo
91 91
 	 */
92 92
 	public function schema_changes_before_migration() {
93 93
 		//relies on 4.1's EEH_Activation::create_table
94
-		require_once( EE_HELPERS . 'EEH_Activation.helper.php' );
95
-		$table_name='esp_answer';
96
-		$sql=" ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
94
+		require_once(EE_HELPERS.'EEH_Activation.helper.php');
95
+		$table_name = 'esp_answer';
96
+		$sql = " ANS_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
97 97
 					REG_ID INT UNSIGNED NOT NULL,
98 98
 					QST_ID INT UNSIGNED NOT NULL,
99 99
 					ANS_value TEXT NOT NULL,
100 100
 					PRIMARY KEY  (ANS_ID),
101 101
 					KEY REG_ID (REG_ID),
102 102
 					KEY QST_ID (QST_ID)";
103
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
103
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
104 104
 
105 105
 		$table_name = 'esp_attendee_meta';
106 106
 		$sql = "ATTM_ID INT(10) UNSIGNED NOT	NULL AUTO_INCREMENT,
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 					  CNT_is_EU TINYINT(1) DEFAULT '0',
141 141
 					  CNT_active TINYINT(1) DEFAULT '0',
142 142
 					  PRIMARY KEY  (CNT_ISO)";
143
-		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB' );
143
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
144 144
 
145 145
 		$table_name = 'esp_currency';
146 146
 		$sql = "CUR_code VARCHAR(6) COLLATE utf8_bin NOT NULL,
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 				CUR_dec_plc VARCHAR(1) COLLATE utf8_bin NOT NULL DEFAULT '2',
151 151
 				CUR_active TINYINT(1) DEFAULT '0',
152 152
 				PRIMARY KEY  (CUR_code)";
153
-		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB' );
153
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
154 154
 
155 155
 
156 156
 		$table_name = 'esp_currency_payment_method';
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 						KEY EVT_ID (EVT_ID),
181 181
 						KEY DTT_is_primary (DTT_is_primary)";
182 182
 
183
-		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB' );
183
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
184 184
 
185 185
 		$table_name = 'esp_event_meta';
186 186
 		$sql = "
@@ -199,44 +199,44 @@  discard block
 block discarded – undo
199 199
 			EVT_donations TINYINT(1) NULL,
200 200
 			PRIMARY KEY  (EVTM_ID),
201 201
 			KEY EVT_ID (EVT_ID)";
202
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
202
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
203 203
 
204 204
 
205 205
 
206
-		$table_name='esp_event_question_group';
207
-		$sql="EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
206
+		$table_name = 'esp_event_question_group';
207
+		$sql = "EQG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
208 208
 					EVT_ID BIGINT(20) UNSIGNED NOT NULL,
209 209
 					QSG_ID INT UNSIGNED NOT NULL,
210 210
 					EQG_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
211 211
 					PRIMARY KEY  (EQG_ID),
212 212
 					KEY EVT_ID (EVT_ID),
213 213
 					KEY QSG_ID (QSG_ID)";
214
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
214
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
215 215
 
216 216
 
217 217
 
218
-		$table_name='esp_event_venue';
219
-		$sql="EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
218
+		$table_name = 'esp_event_venue';
219
+		$sql = "EVV_ID INT(11) NOT NULL AUTO_INCREMENT,
220 220
 				EVT_ID BIGINT(20) UNSIGNED NOT NULL,
221 221
 				VNU_ID BIGINT(20) UNSIGNED NOT NULL,
222 222
 				EVV_primary TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
223 223
 				PRIMARY KEY  (EVV_ID)";
224
-		$this->_table_has_not_changed_since_previous($table_name,$sql, 'ENGINE=InnoDB');
224
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
225 225
 
226 226
 
227 227
 
228
-		$table_name='esp_extra_meta';
229
-		$sql="EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
228
+		$table_name = 'esp_extra_meta';
229
+		$sql = "EXM_ID INT(11) NOT NULL AUTO_INCREMENT,
230 230
 				OBJ_ID INT(11) DEFAULT NULL,
231 231
 				EXM_type VARCHAR(45) DEFAULT NULL,
232 232
 				EXM_key VARCHAR(45) DEFAULT NULL,
233 233
 				EXM_value TEXT,
234 234
 				PRIMARY KEY  (EXM_ID),
235 235
 				KEY EXM_type (EXM_type, OBJ_ID, EXM_key(45))";
236
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
236
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
237 237
 
238
-		$table_name='esp_line_item';
239
-		$sql="LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
238
+		$table_name = 'esp_line_item';
239
+		$sql = "LIN_ID INT(11) NOT NULL AUTO_INCREMENT,
240 240
 				LIN_code VARCHAR(245) NOT NULL DEFAULT '',
241 241
 				TXN_ID INT(11) DEFAULT NULL,
242 242
 				LIN_name VARCHAR(245) NOT NULL DEFAULT '',
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 				PRIMARY KEY  (LIN_ID),
255 255
 				KEY LIN_code (LIN_code(191)),
256 256
 				KEY TXN_ID (TXN_ID)";
257
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB' );
257
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
258 258
 
259 259
 		$table_name = 'esp_log';
260 260
 		$sql = "LOG_ID INT(11) NOT NULL AUTO_INCREMENT,
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 					MTP_is_active TINYINT(1) NOT NULL DEFAULT '1',
295 295
 					PRIMARY KEY  (GRP_ID),
296 296
 					KEY MTP_user_id (MTP_user_id)";
297
-		$this->_table_has_not_changed_since_previous( $table_name, $sql, 'ENGINE=InnoDB');
297
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
298 298
 
299 299
 		$table_name = 'esp_event_message_template';
300 300
 		$sql = "EMT_ID BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 					PRIMARY KEY  (EMT_ID),
304 304
 					KEY EVT_ID (EVT_ID),
305 305
 					KEY GRP_ID (GRP_ID)";
306
-		$this->_table_has_not_changed_since_previous( $table_name, $sql, 'ENGINE=InnoDB');
306
+		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
307 307
 
308 308
 
309 309
 		$table_name = 'esp_payment';
@@ -376,8 +376,8 @@  discard block
 block discarded – undo
376 376
 					  PRIMARY KEY  (TTM_ID)";
377 377
 		$this->_table_has_not_changed_since_previous($table_name, $sql, 'ENGINE=InnoDB');
378 378
 
379
-		$table_name='esp_question';
380
-		$sql='QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
379
+		$table_name = 'esp_question';
380
+		$sql = 'QST_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
381 381
 					QST_display_text TEXT NOT NULL,
382 382
 					QST_admin_label VARCHAR(255) NOT NULL,
383 383
 					QST_system VARCHAR(25) DEFAULT NULL,
@@ -390,22 +390,22 @@  discard block
 block discarded – undo
390 390
 					QST_deleted TINYINT UNSIGNED NOT NULL DEFAULT 0,
391 391
 					PRIMARY KEY  (QST_ID),
392 392
 					KEY QST_order (QST_order)';
393
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
393
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
394 394
 
395
-		$table_name='esp_question_group_question';
396
-		$sql="QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
395
+		$table_name = 'esp_question_group_question';
396
+		$sql = "QGQ_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
397 397
 					QSG_ID INT UNSIGNED NOT NULL,
398 398
 					QST_ID INT UNSIGNED NOT NULL,
399 399
 					QGQ_order INT UNSIGNED NOT NULL DEFAULT 0,
400 400
 					PRIMARY KEY  (QGQ_ID),
401 401
 					KEY QST_ID (QST_ID),
402 402
 					KEY QSG_ID_order (QSG_ID, QGQ_order)";
403
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
403
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
404 404
 
405 405
 
406 406
 
407
-		$table_name='esp_question_option';
408
-		$sql="QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
407
+		$table_name = 'esp_question_option';
408
+		$sql = "QSO_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
409 409
 					QSO_value VARCHAR(255) NOT NULL,
410 410
 					QSO_desc TEXT NOT NULL,
411 411
 					QST_ID INT UNSIGNED NOT NULL,
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 					PRIMARY KEY  (QSO_ID),
415 415
 					KEY QST_ID (QST_ID),
416 416
 					KEY QSO_order (QSO_order)";
417
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
417
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
418 418
 
419 419
 
420 420
 
@@ -460,8 +460,8 @@  discard block
 block discarded – undo
460 460
 
461 461
 
462 462
 
463
-		$table_name='esp_checkin';
464
-		$sql="CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
463
+		$table_name = 'esp_checkin';
464
+		$sql = "CHK_ID INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
465 465
 					REG_ID INT(10) UNSIGNED NOT NULL,
466 466
 					DTT_ID INT(10) UNSIGNED NOT NULL,
467 467
 					CHK_in TINYINT(1) UNSIGNED NOT NULL DEFAULT 1,
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
 					  PRC_parent INT(10) UNSIGNED DEFAULT 0,
557 557
 					  PRIMARY KEY  (PRC_ID),
558 558
 					  KEY PRT_ID (PRT_ID)";
559
-		$this->_table_is_changed_in_this_version($table_name,$sql, 'ENGINE=InnoDB');
559
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
560 560
 
561 561
 		$table_name = "esp_price_type";
562 562
 		$sql = "PRT_ID TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -594,10 +594,10 @@  discard block
 block discarded – undo
594 594
 					  TKT_deleted TINYINT(1) NOT NULL DEFAULT '0',
595 595
 					  PRIMARY KEY  (TKT_ID),
596 596
 					  KEY TKT_start_date (TKT_start_date)";
597
-		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB' );
597
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
598 598
 
599 599
 		$table_name = 'esp_question_group';
600
-		$sql='QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
600
+		$sql = 'QSG_ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
601 601
 					QSG_name VARCHAR(255) NOT NULL,
602 602
 					QSG_identifier VARCHAR(100) NOT NULL,
603 603
 					QSG_desc TEXT NULL,
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
 					PRIMARY KEY  (QSG_ID),
611 611
 					UNIQUE KEY QSG_identifier_UNIQUE (QSG_identifier),
612 612
 					KEY QSG_order (QSG_order)';
613
-		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB' );
613
+		$this->_table_is_changed_in_this_version($table_name, $sql, 'ENGINE=InnoDB');
614 614
 
615 615
 		/** @var EE_DMS_Core_4_1_0 $script_4_1_defaults */
616 616
 		$script_4_1_defaults = EE_Registry::instance()->load_dms('Core_4_1_0');
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
 		return true;
643 643
 	}
644 644
 
645
-	public function migration_page_hooks(){
645
+	public function migration_page_hooks() {
646 646
 
647 647
 	}
648 648
 }
Please login to merge, or discard this patch.
core/libraries/payment_methods/EE_PMT_Base.lib.php 1 patch
Spacing   +108 added lines, -108 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
  * @since 				$VID:$
15 15
  *
16 16
  */
17
-abstract class EE_PMT_Base{
17
+abstract class EE_PMT_Base {
18 18
 
19 19
 	const onsite = 'on-site';
20 20
 	const offsite = 'off-site';
@@ -95,36 +95,36 @@  discard block
 block discarded – undo
95 95
 	 * @return EE_PMT_Base
96 96
 	 */
97 97
 	function __construct($pm_instance = NULL) {
98
-		if ( $pm_instance instanceof EE_Payment_Method ){
98
+		if ($pm_instance instanceof EE_Payment_Method) {
99 99
 			$this->set_instance($pm_instance);
100 100
 		}
101 101
 		$this->_set_file_folder();
102 102
 		$this->_set_file_url();
103
-		if($this->_gateway){
104
-			$this->_gateway->set_payment_model( EEM_Payment::instance() );
105
-			$this->_gateway->set_payment_log( EEM_Change_Log::instance() );
106
-			EE_Registry::instance()->load_helper( 'Template' );
107
-			$this->_gateway->set_template_helper( new EEH_Template() );
108
-			EE_Registry::instance()->load_helper( 'Line_Item' );
109
-			$this->_gateway->set_line_item_helper( new EEH_Line_Item() );
110
-			EE_Registry::instance()->load_helper( 'Money' );
111
-			$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
+			EE_Registry::instance()->load_helper('Template');
107
+			$this->_gateway->set_template_helper(new EEH_Template());
108
+			EE_Registry::instance()->load_helper('Line_Item');
109
+			$this->_gateway->set_line_item_helper(new EEH_Line_Item());
110
+			EE_Registry::instance()->load_helper('Money');
111
+			$this->_gateway->set_money_helper(new EEH_Money());
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,7 +174,7 @@  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(){
177
+	public function file_folder() {
178 178
 		return $this->_file_folder;
179 179
 	}
180 180
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 	/**
184 184
 	 * @return string
185 185
 	 */
186
-	public function file_url(){
186
+	public function file_url() {
187 187
 		return $this->_file_url;
188 188
 	}
189 189
 
@@ -194,14 +194,14 @@  discard block
 block discarded – undo
194 194
 	 * Its important teh payment method instance is set before
195 195
 	 * @param EE_Payment_Method $payment_method_instance
196 196
 	 */
197
-	function set_instance($payment_method_instance){
197
+	function set_instance($payment_method_instance) {
198 198
 		$this->_pm_instance = $payment_method_instance;
199 199
 		//if they have already requested the settings form, make sure its
200 200
 		//data matches this model object
201
-		if($this->_settings_form){
201
+		if ($this->_settings_form) {
202 202
 			$this->settings_form()->populate_model_obj($payment_method_instance);
203 203
 		}
204
-		if($this->_gateway && $this->_gateway instanceof EE_Gateway){
204
+		if ($this->_gateway && $this->_gateway instanceof EE_Gateway) {
205 205
 			$this->_gateway->set_settings($payment_method_instance->settings_array());
206 206
 		}
207 207
 	}
@@ -212,14 +212,14 @@  discard block
 block discarded – undo
212 212
 	 * Gets teh form for displaying to admins where they setup the payment method
213 213
 	 * @return EE_Payment_Method_Form
214 214
 	 */
215
-	function settings_form(){
216
-		if( ! $this->_settings_form){
215
+	function settings_form() {
216
+		if ( ! $this->_settings_form) {
217 217
 			$this->_settings_form = $this->generate_new_settings_form();
218
-			$this->_settings_form->set_payment_method_type( $this );
219
-			$this->_settings_form->_construct_finalize(NULL, NULL );
218
+			$this->_settings_form->set_payment_method_type($this);
219
+			$this->_settings_form->_construct_finalize(NULL, NULL);
220 220
 			//if we have already assigned a model object to this pmt, make
221 221
 			//sure its reflected in teh form we just generated
222
-			if($this->_pm_instance){
222
+			if ($this->_pm_instance) {
223 223
 				$this->_settings_form->populate_model_obj($this->_pm_instance);
224 224
 			}
225 225
 		}
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 	 * this payment method type's settings form later in the request
246 246
 	 * @param EE_Payment_Method_Form $form
247 247
 	 */
248
-	public function set_settings_form($form){
248
+	public function set_settings_form($form) {
249 249
 		$this->_settings_form = $form;
250 250
 	}
251 251
 
@@ -268,10 +268,10 @@  discard block
 block discarded – undo
268 268
 	 * @param array $extra_args
269 269
 	 * @return \EE_Billing_Attendee_Info_Form|\EE_Billing_Info_Form|null
270 270
 	 */
271
-	public function billing_form( EE_Transaction $transaction = NULL, $extra_args = array() ){
271
+	public function billing_form(EE_Transaction $transaction = NULL, $extra_args = array()) {
272 272
 		// has billing form already been regenerated ? or overwrite cache?
273
-		if ( ! $this->_billing_form instanceof EE_Billing_Info_Form || ! $this->_cache_billing_form ){
274
-			$this->_billing_form = $this->generate_new_billing_form( $transaction, $extra_args );
273
+		if ( ! $this->_billing_form instanceof EE_Billing_Info_Form || ! $this->_cache_billing_form) {
274
+			$this->_billing_form = $this->generate_new_billing_form($transaction, $extra_args);
275 275
 		}
276 276
 		//if we know who the attendee is, and this is a billing form
277 277
 		//that uses attendee info, populate it
@@ -280,8 +280,8 @@  discard block
 block discarded – undo
280 280
 			$transaction instanceof EE_Transaction &&
281 281
 			$transaction->primary_registration() instanceof EE_Registration &&
282 282
 			$transaction->primary_registration()->attendee() instanceof EE_Attendee
283
-		){
284
-			$this->_billing_form->populate_from_attendee( $transaction->primary_registration()->attendee() );
283
+		) {
284
+			$this->_billing_form->populate_from_attendee($transaction->primary_registration()->attendee());
285 285
 		}
286 286
 		return $this->_billing_form;
287 287
 	}
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 	 * @param \EE_Transaction $transaction
293 293
 	 * @return \EE_Billing_Info_Form
294 294
 	 */
295
-	abstract function generate_new_billing_form( EE_Transaction $transaction = NULL );
295
+	abstract function generate_new_billing_form(EE_Transaction $transaction = NULL);
296 296
 
297 297
 
298 298
 
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
 	 * @param \EE_Billing_Info_Form $billing_form
304 304
 	 * @return \EE_Billing_Info_Form
305 305
 	 */
306
-	public function apply_billing_form_debug_settings( EE_Billing_Info_Form $billing_form ) {
306
+	public function apply_billing_form_debug_settings(EE_Billing_Info_Form $billing_form) {
307 307
 		return $billing_form;
308 308
 	}
309 309
 
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 	 * if you have form
315 315
 	 * @param EE_Payment_Method $form
316 316
 	 */
317
-	public function set_billing_form($form){
317
+	public function set_billing_form($form) {
318 318
 		$this->_billing_form = $form;
319 319
 	}
320 320
 
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 	 * Returns whether or not this payment method requires HTTPS to be used
325 325
 	 * @return boolean
326 326
 	 */
327
-	function requires_https(){
327
+	function requires_https() {
328 328
 		return $this->_requires_https;
329 329
 	}
330 330
 
@@ -342,9 +342,9 @@  discard block
 block discarded – undo
342 342
 	 * @return EE_Payment
343 343
 	 * @throws EE_Error
344 344
 	 */
345
-	function process_payment( EE_Transaction $transaction, $amount = null, $billing_info = null, $return_url = null,$fail_url = '', $method = 'CART', $by_admin = false ){
345
+	function process_payment(EE_Transaction $transaction, $amount = null, $billing_info = null, $return_url = null, $fail_url = '', $method = 'CART', $by_admin = false) {
346 346
 		// @todo: add surcharge for the payment method, if any
347
-		if ( $this->_gateway ) {
347
+		if ($this->_gateway) {
348 348
 			//there is a gateway, so we're going to make a payment object
349 349
 			//but wait! do they already have a payment in progress that we thought was failed?
350 350
 			$duplicate_properties = array(
@@ -355,10 +355,10 @@  discard block
 block discarded – undo
355 355
 				'PAY_amount' 					=> $amount !== null ? $amount : $transaction->remaining(),
356 356
 				'PAY_gateway_response' 	=> null,
357 357
 			);
358
-			$payment = EEM_Payment::instance()->get_one( array( $duplicate_properties ));
358
+			$payment = EEM_Payment::instance()->get_one(array($duplicate_properties));
359 359
 			//if we didn't already have a payment in progress for the same thing,
360 360
 			//then we actually want to make a new payment
361
-			if ( ! $payment instanceof EE_Payment ){
361
+			if ( ! $payment instanceof EE_Payment) {
362 362
 				$payment = EE_Payment::new_instance(
363 363
 					array_merge(
364 364
 						$duplicate_properties,
@@ -374,10 +374,10 @@  discard block
 block discarded – undo
374 374
 			}
375 375
 			//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
376 376
 			$payment->save();
377
-			$billing_values = $this->_get_billing_values_from_form( $billing_info );
377
+			$billing_values = $this->_get_billing_values_from_form($billing_info);
378 378
 
379 379
 			//  Offsite Gateway
380
-			if( $this->_gateway instanceof EE_Offsite_Gateway ){
380
+			if ($this->_gateway instanceof EE_Offsite_Gateway) {
381 381
 
382 382
 				$payment = $this->_gateway->set_redirection_info(
383 383
 					$payment,
@@ -393,17 +393,17 @@  discard block
 block discarded – undo
393 393
 				);
394 394
 				$payment->save();
395 395
 			//  Onsite Gateway
396
-			} elseif ( $this->_gateway instanceof EE_Onsite_Gateway ) {
396
+			} elseif ($this->_gateway instanceof EE_Onsite_Gateway) {
397 397
 
398
-				$payment = $this->_gateway->do_direct_payment($payment,$billing_values);
398
+				$payment = $this->_gateway->do_direct_payment($payment, $billing_values);
399 399
 				$payment->save();
400 400
 
401 401
 			} else {
402 402
 				throw new EE_Error(
403 403
 					sprintf(
404
-						__('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' ),
404
+						__('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'),
405 405
 						get_class($this),
406
-						gettype( $this->_gateway )
406
+						gettype($this->_gateway)
407 407
 					)
408 408
 				);
409 409
 			}
@@ -425,8 +425,8 @@  discard block
 block discarded – undo
425 425
 		}
426 426
 
427 427
 		// if there is billing info, clean it and save it now
428
-		if( $billing_info instanceof EE_Billing_Attendee_Info_Form ){
429
-			$this->_save_billing_info_to_attendee( $billing_info, $transaction );
428
+		if ($billing_info instanceof EE_Billing_Attendee_Info_Form) {
429
+			$this->_save_billing_info_to_attendee($billing_info, $transaction);
430 430
 		}
431 431
 
432 432
 		return $payment;
@@ -439,10 +439,10 @@  discard block
 block discarded – undo
439 439
 	 * @param EE_Billing_Info_Form $billing_form
440 440
 	 * @return array
441 441
 	 */
442
-	protected function _get_billing_values_from_form( $billing_form ){
443
-		if($billing_form instanceof EE_Form_Section_Proper ){
444
-			return $billing_form->input_pretty_values( true );
445
-		}else{
442
+	protected function _get_billing_values_from_form($billing_form) {
443
+		if ($billing_form instanceof EE_Form_Section_Proper) {
444
+			return $billing_form->input_pretty_values(true);
445
+		} else {
446 446
 			return NULL;
447 447
 		}
448 448
 	}
@@ -456,13 +456,13 @@  discard block
 block discarded – undo
456 456
 	 * @return EE_Payment
457 457
 	 * @throws EE_Error
458 458
 	 */
459
-	public function handle_ipn($req_data,$transaction){
459
+	public function handle_ipn($req_data, $transaction) {
460 460
 		$transaction = EEM_Transaction::instance()->ensure_is_obj($transaction);
461
-		if( ! $this->_gateway instanceof EE_Offsite_Gateway){
462
-			throw new EE_Error(sprintf(__("Could not handle IPN because '%s' is not an offsite gateway", "event_espresso"), print_r( $this->_gateway, TRUE )));
461
+		if ( ! $this->_gateway instanceof EE_Offsite_Gateway) {
462
+			throw new EE_Error(sprintf(__("Could not handle IPN because '%s' is not an offsite gateway", "event_espresso"), print_r($this->_gateway, TRUE)));
463 463
 
464 464
 		}
465
-		$payment = $this->_gateway->handle_payment_update( $req_data, $transaction );
465
+		$payment = $this->_gateway->handle_payment_update($req_data, $transaction);
466 466
 		return $payment;
467 467
 	}
468 468
 
@@ -475,22 +475,22 @@  discard block
 block discarded – undo
475 475
 	 * @param EE_Transaction $transaction
476 476
 	 * @return boolean success
477 477
 	 */
478
-	protected function _save_billing_info_to_attendee($billing_form, $transaction){
479
-		if( ! $transaction || ! $transaction instanceof EE_Transaction){
478
+	protected function _save_billing_info_to_attendee($billing_form, $transaction) {
479
+		if ( ! $transaction || ! $transaction instanceof EE_Transaction) {
480 480
 			EE_Error::add_error(__("Cannot save billing info because no transaction was specified", "event_espresso"), __FILE__, __FUNCTION__, __LINE__);
481 481
 			return false;
482 482
 		}
483 483
 		$primary_reg = $transaction->primary_registration();
484
-		if( ! $primary_reg ){
484
+		if ( ! $primary_reg) {
485 485
 			EE_Error::add_error(__("Cannot save billing info because the transaction has no primary registration", "event_espresso"), __FILE__, __FUNCTION__, __LINE__);
486 486
 			return false;
487 487
 		}
488 488
 		$attendee = $primary_reg->attendee();
489
-		if( ! $attendee ){
489
+		if ( ! $attendee) {
490 490
 			EE_Error::add_error(__("Cannot save billing info because the transaction's primary registration has no attendee!", "event_espresso"), __FILE__, __FUNCTION__, __LINE__);
491 491
 			return false;
492 492
 		}
493
-		return $attendee->save_and_clean_billing_info_for_payment_method($billing_form, $transaction->payment_method() );
493
+		return $attendee->save_and_clean_billing_info_for_payment_method($billing_form, $transaction->payment_method());
494 494
 
495 495
 	}
496 496
 
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 	 * @param array $req_data
504 504
 	 * @return EE_Payment
505 505
 	 */
506
-	protected function find_payment_for_ipn( EE_Transaction $transaction, $req_data = array() ){
506
+	protected function find_payment_for_ipn(EE_Transaction $transaction, $req_data = array()) {
507 507
 		return $transaction->last_payment();
508 508
 	}
509 509
 
@@ -520,8 +520,8 @@  discard block
 block discarded – undo
520 520
 	 * and identifies the IPN as being for this payment method (not just fo ra payment method of this type)
521 521
 	 * @throws EE_Error
522 522
 	 */
523
-	public function handle_unclaimed_ipn( $req_data = array() ){
524
-		throw new EE_Error(sprintf(__("Payment Method '%s' cannot handle unclaimed IPNs", "event_espresso"), get_class($this) ));
523
+	public function handle_unclaimed_ipn($req_data = array()) {
524
+		throw new EE_Error(sprintf(__("Payment Method '%s' cannot handle unclaimed IPNs", "event_espresso"), get_class($this)));
525 525
 	}
526 526
 
527 527
 
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
 	 * @param EE_Transaction $transaction
538 538
 	 * @return EE_Payment
539 539
 	 */
540
-	public function finalize_payment_for($transaction){
540
+	public function finalize_payment_for($transaction) {
541 541
 		return $transaction->last_payment();
542 542
 	}
543 543
 
@@ -547,10 +547,10 @@  discard block
 block discarded – undo
547 547
 	 * Whether or not this payment method's gateway supports sending refund requests
548 548
 	 * @return boolean
549 549
 	 */
550
-	public function supports_sending_refunds(){
551
-		if($this->_gateway && $this->_gateway instanceof EE_Gateway){
550
+	public function supports_sending_refunds() {
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
 	}
@@ -564,14 +564,14 @@  discard block
 block discarded – undo
564 564
 	 * @throws EE_Error
565 565
 	 * @return EE_Payment
566 566
 	 */
567
-	public function process_refund( EE_Payment $payment, $refund_info = array()){
568
-		if ( $this->_gateway && $this->_gateway instanceof EE_Gateway ) {
569
-			return $this->_gateway->do_direct_refund( $payment, $refund_info );
567
+	public function process_refund(EE_Payment $payment, $refund_info = array()) {
568
+		if ($this->_gateway && $this->_gateway instanceof EE_Gateway) {
569
+			return $this->_gateway->do_direct_refund($payment, $refund_info);
570 570
 		} else {
571 571
 			throw new EE_Error(
572 572
 				sprintf(
573
-					__( 'Payment Method Type "%s" does not support sending refund requests', 'event_espresso' ),
574
-					get_class( $this )
573
+					__('Payment Method Type "%s" does not support sending refund requests', 'event_espresso'),
574
+					get_class($this)
575 575
 				)
576 576
 			);
577 577
 		}
@@ -585,15 +585,15 @@  discard block
 block discarded – undo
585 585
 	 * @return string
586 586
 	 * @throws EE_Error
587 587
 	 */
588
-	public function payment_occurs(){
589
-		if( ! $this->_gateway){
588
+	public function payment_occurs() {
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{
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)));
595
+		} else {
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
 	}
599 599
 
@@ -606,9 +606,9 @@  discard block
 block discarded – undo
606 606
 	 * @param EE_Payment $payment
607 607
 	 * @return string
608 608
 	 */
609
-	public function payment_overview_content(EE_Payment $payment){
609
+	public function payment_overview_content(EE_Payment $payment) {
610 610
 		EE_Registry::instance()->load_helper('Template');
611
-		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);
611
+		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);
612 612
 	}
613 613
 
614 614
 
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
 	 *	@type array $template_args any arguments you want passed to the template file while rendering. 
622 622
 	 *				Keys will be variable names and values with be their values.
623 623
 	 */
624
-	public function help_tabs_config(){
624
+	public function help_tabs_config() {
625 625
 		return array();
626 626
 	}
627 627
 
@@ -632,9 +632,9 @@  discard block
 block discarded – undo
632 632
 	 * the payment method's table's PMT_type column)
633 633
 	 * @return string
634 634
 	 */
635
-	public function system_name(){
635
+	public function system_name() {
636 636
 		$classname = get_class($this);
637
-		return str_replace("EE_PMT_",'',$classname);
637
+		return str_replace("EE_PMT_", '', $classname);
638 638
 	}
639 639
 
640 640
 
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
 	 * A pretty i18n version of the PMT name
644 644
 	 * @return string
645 645
 	 */
646
-	public function pretty_name(){
646
+	public function pretty_name() {
647 647
 		return $this->_pretty_name;
648 648
 	}
649 649
 
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
 	 * Gets the default absolute URL to the payment method type's button
654 654
 	 * @return string
655 655
 	 */
656
-	public function default_button_url(){
656
+	public function default_button_url() {
657 657
 		return $this->_default_button_url;
658 658
 	}
659 659
 
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
 	 * Gets the gateway used by this payment method (if any)
664 664
 	 * @return EE_Gateway
665 665
 	 */
666
-	public function get_gateway(){
666
+	public function get_gateway() {
667 667
 		return $this->_gateway;
668 668
 	}
669 669
 
@@ -672,9 +672,9 @@  discard block
 block discarded – undo
672 672
 	/**
673 673
 	 * @return string html for the link to a help tab
674 674
 	 */
675
-	public function get_help_tab_link(){
676
-		EE_Registry::instance()->load_helper( 'Template' );
677
-		return EEH_Template::get_help_tab_link( $this->get_help_tab_name() );
675
+	public function get_help_tab_link() {
676
+		EE_Registry::instance()->load_helper('Template');
677
+		return EEH_Template::get_help_tab_link($this->get_help_tab_name());
678 678
 	}
679 679
 
680 680
 
@@ -683,8 +683,8 @@  discard block
 block discarded – undo
683 683
 	 * Returns the name of the help tab for this PMT
684 684
 	 * @return string
685 685
 	 */
686
-	public function get_help_tab_name(){
687
-		return 'ee_' . strtolower( $this->system_name() ) . '_help_tab';
686
+	public function get_help_tab_name() {
687
+		return 'ee_'.strtolower($this->system_name()).'_help_tab';
688 688
 	}
689 689
 
690 690
 	/**
@@ -692,8 +692,8 @@  discard block
 block discarded – undo
692 692
 	 * this PMT by an admin
693 693
 	 * @return string
694 694
 	 */
695
-	public function cap_name(){
696
-		return 'ee_payment_method_' . strtolower( $this->system_name() );
695
+	public function cap_name() {
696
+		return 'ee_payment_method_'.strtolower($this->system_name());
697 697
 	}
698 698
 
699 699
 	/**
@@ -705,9 +705,9 @@  discard block
 block discarded – undo
705 705
 	 * @param EE_Payment $payment
706 706
 	 * @return void
707 707
 	 */
708
-	public function update_txn_based_on_payment( $payment ){
709
-		if( $this->_gateway instanceof EE_Gateway ){
710
-			$this->_gateway->update_txn_based_on_payment( $payment );
708
+	public function update_txn_based_on_payment($payment) {
709
+		if ($this->_gateway instanceof EE_Gateway) {
710
+			$this->_gateway->update_txn_based_on_payment($payment);
711 711
 		}
712 712
 	}
713 713
 
Please login to merge, or discard this patch.