Completed
Branch BUG-11137-domain-base (f3289e)
by
unknown
34:40 queued 23:11
created
core/business/EE_Transaction_Payments.class.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@
 block discarded – undo
161 161
 	 * @param EE_Transaction $transaction
162 162
 	 * @param string         $payment_status One of EEM_Payment's statuses, like 'PAP' (Approved).
163 163
 	 *                                       By default, searches for approved payments
164
-	 * @return float|false   float on success, false on fail
164
+	 * @return double   float on success, false on fail
165 165
 	 * @throws \EE_Error
166 166
 	 */
167 167
 	public function recalculate_total_payments_for_transaction( EE_Transaction $transaction, $payment_status = EEM_Payment::status_id_approved ) {
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -233,8 +233,8 @@
 block discarded – undo
233 233
 					if ( $registration instanceof EE_Registration ) {
234 234
 						$registration->set_paid( $registration->paid() - $amount_paid );
235 235
 						if ($registration->save() !== false) {
236
-						    $registration_payment->delete_permanently();
237
-                            $save_payment = true;
236
+							$registration_payment->delete_permanently();
237
+							$save_payment = true;
238 238
 						}
239 239
 					} else {
240 240
 						EE_Error::add_error(
Please login to merge, or discard this patch.
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { exit('No direct script access allowed'); }
2
-EE_Registry::instance()->load_class( 'Processor_Base' );
2
+EE_Registry::instance()->load_class('Processor_Base');
3 3
 
4 4
 /**
5 5
  * Class EE_Transaction_Payments
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	 */
43 43
 	public static function instance() {
44 44
 		// check if class object is instantiated
45
-		if ( ! self::$_instance instanceof EE_Transaction_Payments ) {
45
+		if ( ! self::$_instance instanceof EE_Transaction_Payments) {
46 46
 			self::$_instance = new self();
47 47
 		}
48 48
 		return self::$_instance;
@@ -59,18 +59,18 @@  discard block
 block discarded – undo
59 59
 	 * @return bool true if TXN total was updated, false if not
60 60
 	 * @throws \EE_Error
61 61
 	 */
62
-	public function recalculate_transaction_total( EE_Transaction $transaction, $update_txn = true ) {
62
+	public function recalculate_transaction_total(EE_Transaction $transaction, $update_txn = true) {
63 63
 		$total_line_item = $transaction->total_line_item();
64
-		if ( ! $total_line_item instanceof EE_Line_Item ) {
64
+		if ( ! $total_line_item instanceof EE_Line_Item) {
65 65
 			EE_Error::add_error(
66
-				sprintf( __( 'The Total Line Item for Transaction %1$d\'s was not found or is invalid.', 'event_espresso' ), $transaction->ID() ),
66
+				sprintf(__('The Total Line Item for Transaction %1$d\'s was not found or is invalid.', 'event_espresso'), $transaction->ID()),
67 67
 				__FILE__, __FUNCTION__, __LINE__
68 68
 			);
69 69
 			return false;
70 70
 		}
71 71
 		$new_total = $total_line_item->recalculate_total_including_taxes();
72
-		$transaction->set_total( $new_total );
73
-		if ( $update_txn ) {
72
+		$transaction->set_total($new_total);
73
+		if ($update_txn) {
74 74
 			return $transaction->save() ? true : false;
75 75
 		}
76 76
 		return false;
@@ -93,20 +93,20 @@  discard block
 block discarded – undo
93 93
 	 * @return    boolean        whether the TXN was saved
94 94
 	 * @throws \EE_Error
95 95
 	 */
96
-	public function calculate_total_payments_and_update_status( EE_Transaction $transaction, $update_txn = true ){
96
+	public function calculate_total_payments_and_update_status(EE_Transaction $transaction, $update_txn = true) {
97 97
 		// verify transaction
98
-		if ( ! $transaction instanceof EE_Transaction ) {
99
-			EE_Error::add_error( __( 'Please provide a valid EE_Transaction object.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
98
+		if ( ! $transaction instanceof EE_Transaction) {
99
+			EE_Error::add_error(__('Please provide a valid EE_Transaction object.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
100 100
 			return false;
101 101
 		}
102 102
 		// calculate total paid
103
-		$total_paid = $this->recalculate_total_payments_for_transaction( $transaction );
103
+		$total_paid = $this->recalculate_total_payments_for_transaction($transaction);
104 104
 		// if total paid has changed
105
-		if ( $total_paid !== false && (float)$total_paid !== $transaction->paid() ) {
106
-			$transaction->set_paid( $total_paid );
105
+		if ($total_paid !== false && (float) $total_paid !== $transaction->paid()) {
106
+			$transaction->set_paid($total_paid);
107 107
 			// maybe update status, and make sure to save transaction if not done already
108
-			if ( ! $transaction->update_status_based_on_total_paid( $update_txn ) ) {
109
-				if ( $update_txn ) {
108
+			if ( ! $transaction->update_status_based_on_total_paid($update_txn)) {
109
+				if ($update_txn) {
110 110
 					return $transaction->save() ? true : false;
111 111
 				}
112 112
 			} else {
@@ -130,18 +130,18 @@  discard block
 block discarded – undo
130 130
 	 * @return float|false   float on success, false on fail
131 131
 	 * @throws \EE_Error
132 132
 	 */
133
-	public function recalculate_total_payments_for_transaction( EE_Transaction $transaction, $payment_status = EEM_Payment::status_id_approved ) {
133
+	public function recalculate_total_payments_for_transaction(EE_Transaction $transaction, $payment_status = EEM_Payment::status_id_approved) {
134 134
 		// verify transaction
135
-		if ( ! $transaction instanceof EE_Transaction ) {
136
-			EE_Error::add_error( __( 'Please provide a valid EE_Transaction object.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
135
+		if ( ! $transaction instanceof EE_Transaction) {
136
+			EE_Error::add_error(__('Please provide a valid EE_Transaction object.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
137 137
 			return false;
138 138
 		}
139 139
 		// ensure Payment model is loaded
140
-		EE_Registry::instance()->load_model( 'Payment' );
140
+		EE_Registry::instance()->load_model('Payment');
141 141
 		// calls EEM_Base::sum()
142 142
 		return EEM_Payment::instance()->sum(
143 143
 			// query params
144
-			array( array( 'TXN_ID' => $transaction->ID(), 'STS_ID' => $payment_status )),
144
+			array(array('TXN_ID' => $transaction->ID(), 'STS_ID' => $payment_status)),
145 145
 			// field to sum
146 146
 			'PAY_amount'
147 147
 		);
@@ -159,17 +159,17 @@  discard block
 block discarded – undo
159 159
 	 * @return boolean
160 160
 	 * @throws \EE_Error
161 161
 	 */
162
-	public function delete_payment_and_update_transaction( EE_Payment $payment ) {
162
+	public function delete_payment_and_update_transaction(EE_Payment $payment) {
163 163
 		// verify payment
164
-		if ( ! $payment instanceof EE_Payment ) {
165
-			EE_Error::add_error( __( 'A valid Payment object was not received.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
164
+		if ( ! $payment instanceof EE_Payment) {
165
+			EE_Error::add_error(__('A valid Payment object was not received.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
166 166
 			return false;
167 167
 		}
168
-		if ( ! $this->delete_registration_payments_and_update_registrations( $payment ) ) {
168
+		if ( ! $this->delete_registration_payments_and_update_registrations($payment)) {
169 169
 			return false;
170 170
 		}
171
-		if ( ! $payment->delete() ) {
172
-			EE_Error::add_error( __( 'The payment could not be deleted.', 'event_espresso' ), __FILE__, __FUNCTION__, __LINE__ );
171
+		if ( ! $payment->delete()) {
172
+			EE_Error::add_error(__('The payment could not be deleted.', 'event_espresso'), __FILE__, __FUNCTION__, __LINE__);
173 173
 			return false;
174 174
 		}
175 175
 
@@ -180,14 +180,14 @@  discard block
 block discarded – undo
180 180
 			|| $TXN_status === EEM_Transaction::failed_status_code
181 181
 			|| $payment->amount() === 0
182 182
 		) {
183
-			EE_Error::add_success( __( 'The Payment was successfully deleted.', 'event_espresso' ) );
183
+			EE_Error::add_success(__('The Payment was successfully deleted.', 'event_espresso'));
184 184
 			return true;
185 185
 		}
186 186
 
187 187
 
188 188
 		//if this fails, that just means that the transaction didn't get its status changed and/or updated.
189 189
 		//however the payment was still deleted.
190
-		if ( ! $this->calculate_total_payments_and_update_status( $transaction ) ) {
190
+		if ( ! $this->calculate_total_payments_and_update_status($transaction)) {
191 191
 
192 192
 			EE_Error::add_attention(
193 193
 				__(
@@ -221,17 +221,17 @@  discard block
 block discarded – undo
221 221
 	 * @return bool
222 222
 	 * @throws \EE_Error
223 223
 	 */
224
-	public function delete_registration_payments_and_update_registrations( EE_Payment $payment, $reg_payment_query_params = array() ) {
224
+	public function delete_registration_payments_and_update_registrations(EE_Payment $payment, $reg_payment_query_params = array()) {
225 225
 		$save_payment = false;
226
-		$reg_payment_query_params = ! empty( $reg_payment_query_params ) ? $reg_payment_query_params : array( array( 'PAY_ID' => $payment->ID() ) );
227
-		$registration_payments = EEM_Registration_Payment::instance()->get_all( $reg_payment_query_params );
228
-		if ( ! empty( $registration_payments )) {
229
-			foreach ( $registration_payments as $registration_payment ) {
230
-				if ( $registration_payment instanceof EE_Registration_Payment ) {
226
+		$reg_payment_query_params = ! empty($reg_payment_query_params) ? $reg_payment_query_params : array(array('PAY_ID' => $payment->ID()));
227
+		$registration_payments = EEM_Registration_Payment::instance()->get_all($reg_payment_query_params);
228
+		if ( ! empty($registration_payments)) {
229
+			foreach ($registration_payments as $registration_payment) {
230
+				if ($registration_payment instanceof EE_Registration_Payment) {
231 231
 					$amount_paid = $registration_payment->amount();
232 232
 					$registration = $registration_payment->registration();
233
-					if ( $registration instanceof EE_Registration ) {
234
-						$registration->set_paid( $registration->paid() - $amount_paid );
233
+					if ($registration instanceof EE_Registration) {
234
+						$registration->set_paid($registration->paid() - $amount_paid);
235 235
 						if ($registration->save() !== false) {
236 236
 						    $registration_payment->delete_permanently();
237 237
                             $save_payment = true;
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 					} else {
240 240
 						EE_Error::add_error(
241 241
 							sprintf(
242
-								__( 'An invalid Registration object was associated with Registration Payment ID# %1$d.', 'event_espresso' ),
242
+								__('An invalid Registration object was associated with Registration Payment ID# %1$d.', 'event_espresso'),
243 243
 								$registration_payment->ID()
244 244
 							),
245 245
 							__FILE__, __FUNCTION__, __LINE__
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 				} else {
250 250
 					EE_Error::add_error(
251 251
 						sprintf(
252
-							__( 'An invalid Registration Payment object was associated with payment ID# %1$d.', 'event_espresso' ),
252
+							__('An invalid Registration Payment object was associated with payment ID# %1$d.', 'event_espresso'),
253 253
 							$payment->ID()
254 254
 						),
255 255
 						__FILE__, __FUNCTION__, __LINE__
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 				}
259 259
 			}
260 260
 		}
261
-		if ( $save_payment ) {
261
+		if ($save_payment) {
262 262
 			$payment->save();
263 263
 		}
264 264
 		return true;
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
 	public function update_transaction_status_based_on_total_paid(EE_Transaction $transaction, $update_txn = true)
283 283
 	{
284 284
 		EE_Error::doing_it_wrong(
285
-			__CLASS__ . '::' . __FUNCTION__,
285
+			__CLASS__.'::'.__FUNCTION__,
286 286
 			sprintf(__('This method is deprecated. Please use "%s" instead', 'event_espresso'),
287 287
 				'EE_Transaction::update_status_based_on_total_paid()'),
288 288
 			'4.9.1',
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 	 * @deprecated 4.9.12
325 325
 	 * @param string $old_txn_status
326 326
 	 */
327
-	public function set_old_txn_status( $old_txn_status ) {
327
+	public function set_old_txn_status($old_txn_status) {
328 328
 		EE_Error::doing_it_wrong(
329 329
 			__METHOD__,
330 330
 			esc_html__(
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
 			'4.9.12'
335 335
 		);
336 336
 		// only set the first time
337
-		if ( $this->_old_txn_status === null ) {
337
+		if ($this->_old_txn_status === null) {
338 338
 			$this->_old_txn_status = $old_txn_status;
339 339
 		}
340 340
 	}
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 	 * @deprecated 4.9.12
364 364
 	 * @param string $new_txn_status
365 365
 	 */
366
-	public function set_new_txn_status( $new_txn_status ) {
366
+	public function set_new_txn_status($new_txn_status) {
367 367
 		EE_Error::doing_it_wrong(
368 368
 			__METHOD__,
369 369
 			esc_html__(
Please login to merge, or discard this patch.
core/db_classes/EE_Question.class.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 	 * Adds an option for this question. Note: if the option were previously associated with a different
370 370
 	 * Question, that relationship will be overwritten.
371 371
 	 * @param EE_Question_Option $option
372
-	 * @return boolean success
372
+	 * @return EE_Base_Class success
373 373
 	 */
374 374
 	public function add_option( EE_Question_Option $option ) {
375 375
 		return $this->_add_relation_to( $option, 'Question_Option' );
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 	/**
393 393
 	 * Marks the option as deleted.
394 394
 	 * @param EE_Question_Option $option
395
-	 * @return boolean success
395
+	 * @return EE_Base_Class success
396 396
 	 */
397 397
 	public function remove_option( EE_Question_Option $option ) {
398 398
 		return $this->_remove_relation_to( $option, 'Question_Option' );
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -445,8 +445,8 @@  discard block
 block discarded – undo
445 445
 		$new_question->set_admin_label( sprintf( __( '%s **Duplicate**', 'event_espresso' ), $this->admin_label() ) );
446 446
 		$new_question->set_system_ID( null );
447 447
 		$new_question->set_wp_user( get_current_user_id() );
448
-                //if we're duplicating a trashed question, assume we don't want the new one to be trashed
449
-                $new_question->set_deleted( false );
448
+				//if we're duplicating a trashed question, assume we don't want the new one to be trashed
449
+				$new_question->set_deleted( false );
450 450
 		$success = $new_question->save();
451 451
 		if( $success ) {
452 452
 			//we don't totally want to duplicate the question options, because we want them to be for the NEW question
@@ -501,8 +501,8 @@  discard block
 block discarded – undo
501 501
 		}
502 502
 		// has this question been answered ?
503 503
 		if ( $answer instanceof EE_Answer
504
-             && $answer->value() !== ''
505
-        ) {
504
+			 && $answer->value() !== ''
505
+		) {
506 506
 			//answer gets htmlspecialchars called on it, undo that please
507 507
 			//because the form input's display strategy may call esc_attr too
508 508
 			//which also does html special characters
Please login to merge, or discard this patch.
Spacing   +110 added lines, -110 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<?php if ( !defined( 'EVENT_ESPRESSO_VERSION' ) ) {
2
-	exit( 'No direct script access allowed' );
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 /**
5 5
  * Event Espresso
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
 	 *                             		    date_format and the second value is the time format
38 38
 	 * @return EE_Question
39 39
 	 */
40
-	public static function new_instance( $props_n_values = array(), $timezone = null, $date_formats = array() ) {
41
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats );
42
-		return $has_object ? $has_object : new self( $props_n_values, false, $timezone, $date_formats );
40
+	public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array()) {
41
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
42
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
43 43
 	}
44 44
 
45 45
 
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 	 *                          		the website will be used.
51 51
 	 * @return EE_Question
52 52
 	 */
53
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
54
-		return new self( $props_n_values, TRUE, $timezone );
53
+	public static function new_instance_from_db($props_n_values = array(), $timezone = null) {
54
+		return new self($props_n_values, TRUE, $timezone);
55 55
 	}
56 56
 
57 57
 
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 	 * @access        public
63 63
 	 * @param string $QST_display_text
64 64
 	 */
65
-	public function set_display_text( $QST_display_text = '' ) {
66
-		$this->set( 'QST_display_text', $QST_display_text );
65
+	public function set_display_text($QST_display_text = '') {
66
+		$this->set('QST_display_text', $QST_display_text);
67 67
 	}
68 68
 
69 69
 
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
 	 * @access        public
75 75
 	 * @param        string $QST_admin_label
76 76
 	 */
77
-	public function set_admin_label( $QST_admin_label = '' ) {
78
-		$this->set( 'QST_admin_label', $QST_admin_label );
77
+	public function set_admin_label($QST_admin_label = '') {
78
+		$this->set('QST_admin_label', $QST_admin_label);
79 79
 	}
80 80
 
81 81
 
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
 	 * @access        public
87 87
 	 * @param        mixed $QST_system
88 88
 	 */
89
-	public function set_system_ID( $QST_system = '' ) {
90
-		$this->set( 'QST_system', $QST_system );
89
+	public function set_system_ID($QST_system = '') {
90
+		$this->set('QST_system', $QST_system);
91 91
 	}
92 92
 
93 93
 
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 	 * @access        public
99 99
 	 * @param        string $QST_type
100 100
 	 */
101
-	public function set_question_type( $QST_type = '' ) {
102
-		$this->set( 'QST_type', $QST_type );
101
+	public function set_question_type($QST_type = '') {
102
+		$this->set('QST_type', $QST_type);
103 103
 	}
104 104
 
105 105
 
@@ -110,8 +110,8 @@  discard block
 block discarded – undo
110 110
 	 * @access        public
111 111
 	 * @param        bool $QST_required
112 112
 	 */
113
-	public function set_required( $QST_required = FALSE ) {
114
-		$this->set( 'QST_required', $QST_required );
113
+	public function set_required($QST_required = FALSE) {
114
+		$this->set('QST_required', $QST_required);
115 115
 	}
116 116
 
117 117
 
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
 	 * @access        public
123 123
 	 * @param        string $QST_required_text
124 124
 	 */
125
-	public function set_required_text( $QST_required_text = '' ) {
126
-		$this->set( 'QST_required_text', $QST_required_text );
125
+	public function set_required_text($QST_required_text = '') {
126
+		$this->set('QST_required_text', $QST_required_text);
127 127
 	}
128 128
 
129 129
 
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
 	 * @access        public
135 135
 	 * @param        int $QST_order
136 136
 	 */
137
-	public function set_order( $QST_order = 0 ) {
138
-		$this->set( 'QST_order', $QST_order );
137
+	public function set_order($QST_order = 0) {
138
+		$this->set('QST_order', $QST_order);
139 139
 	}
140 140
 
141 141
 
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
 	 * @access        public
147 147
 	 * @param        bool $QST_admin_only
148 148
 	 */
149
-	public function set_admin_only( $QST_admin_only = FALSE ) {
150
-		$this->set( 'QST_admin_only', $QST_admin_only );
149
+	public function set_admin_only($QST_admin_only = FALSE) {
150
+		$this->set('QST_admin_only', $QST_admin_only);
151 151
 	}
152 152
 
153 153
 
@@ -158,8 +158,8 @@  discard block
 block discarded – undo
158 158
 	 * @access        public
159 159
 	 * @param        int $QST_wp_user
160 160
 	 */
161
-	public function set_wp_user( $QST_wp_user = 1 ) {
162
-		$this->set( 'QST_wp_user', $QST_wp_user );
161
+	public function set_wp_user($QST_wp_user = 1) {
162
+		$this->set('QST_wp_user', $QST_wp_user);
163 163
 	}
164 164
 
165 165
 
@@ -175,8 +175,8 @@  discard block
 block discarded – undo
175 175
 	 * @access        public
176 176
 	 * @param 	bool $QST_deleted
177 177
 	 */
178
-	public function set_deleted( $QST_deleted = FALSE ) {
179
-		$this->set( 'QST_deleted', $QST_deleted );
178
+	public function set_deleted($QST_deleted = FALSE) {
179
+		$this->set('QST_deleted', $QST_deleted);
180 180
 	}
181 181
 
182 182
 
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
 	 * @return string
188 188
 	 */
189 189
 	public function display_text() {
190
-		return $this->get( 'QST_display_text' );
190
+		return $this->get('QST_display_text');
191 191
 	}
192 192
 
193 193
 
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 	 * @return string
199 199
 	 */
200 200
 	public function admin_label() {
201
-		return $this->get( 'QST_admin_label' );
201
+		return $this->get('QST_admin_label');
202 202
 	}
203 203
 
204 204
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 	 * @return string
210 210
 	 */
211 211
 	public function system_ID() {
212
-		return $this->get( 'QST_system' );
212
+		return $this->get('QST_system');
213 213
 	}
214 214
 
215 215
 
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 	 * @return boolean
221 221
 	 */
222 222
 	public function required() {
223
-		return $this->get( 'QST_required' );
223
+		return $this->get('QST_required');
224 224
 	}
225 225
 
226 226
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
 	 * @return string
233 233
 	 */
234 234
 	public function required_text() {
235
-		return $this->get( 'QST_required_text' );
235
+		return $this->get('QST_required_text');
236 236
 	}
237 237
 
238 238
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 	 * @return string
244 244
 	 */
245 245
 	public function type() {
246
-		return $this->get( 'QST_type' );
246
+		return $this->get('QST_type');
247 247
 	}
248 248
 
249 249
 
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 	 * @return int
256 256
 	 */
257 257
 	public function order() {
258
-		return $this->get( 'QST_order' );
258
+		return $this->get('QST_order');
259 259
 	}
260 260
 
261 261
 
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 	 * @return boolean
268 268
 	 */
269 269
 	public function admin_only() {
270
-		return $this->get( 'QST_admin_only' );
270
+		return $this->get('QST_admin_only');
271 271
 	}
272 272
 
273 273
 
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 	 * @return int
279 279
 	 */
280 280
 	public function wp_user() {
281
-		return $this->get( 'QST_wp_user' );
281
+		return $this->get('QST_wp_user');
282 282
 	}
283 283
 
284 284
 
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 	 * @return boolean
290 290
 	 */
291 291
 	public function deleted() {
292
-		return $this->get( 'QST_deleted' );
292
+		return $this->get('QST_deleted');
293 293
 	}
294 294
 
295 295
 
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 	 * @return EE_Answer[]
300 300
 	 */
301 301
 	public function answers() {
302
-		return $this->get_many_related( 'Answer' );
302
+		return $this->get_many_related('Answer');
303 303
 	}
304 304
 
305 305
 
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 	 * @return boolean true = has answers, false = no answers.
310 310
 	 */
311 311
 	public function has_answers() {
312
-		return $this->count_related( 'Answer' ) > 0 ? TRUE : FALSE;
312
+		return $this->count_related('Answer') > 0 ? TRUE : FALSE;
313 313
 	}
314 314
 
315 315
 
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
 	 * @return EE_Question_Group[]
320 320
 	 */
321 321
 	public function question_groups() {
322
-		return $this->get_many_related( 'Question_Group' );
322
+		return $this->get_many_related('Question_Group');
323 323
 	}
324 324
 
325 325
 
@@ -333,24 +333,24 @@  discard block
 block discarded – undo
333 333
 	 *                                                       whether it was trashed or not.
334 334
 	 * @return EE_Question_Option[]
335 335
 	 */
336
-	public function options( $notDeletedOptionsOnly = TRUE, $selected_value_to_always_include = NULL ) {
337
-		if ( ! $this->ID() ) {
336
+	public function options($notDeletedOptionsOnly = TRUE, $selected_value_to_always_include = NULL) {
337
+		if ( ! $this->ID()) {
338 338
 			return array();
339 339
 		}
340 340
 		$query_params = array();
341
-		if ( $selected_value_to_always_include ) {
342
-			if ( is_array( $selected_value_to_always_include ) ) {
343
-				$query_params[ 0 ][ 'OR*options-query' ][ 'QSO_value' ] = array( 'IN', $selected_value_to_always_include );
341
+		if ($selected_value_to_always_include) {
342
+			if (is_array($selected_value_to_always_include)) {
343
+				$query_params[0]['OR*options-query']['QSO_value'] = array('IN', $selected_value_to_always_include);
344 344
 			} else {
345
-				$query_params[ 0 ][ 'OR*options-query' ][ 'QSO_value' ] = $selected_value_to_always_include;
345
+				$query_params[0]['OR*options-query']['QSO_value'] = $selected_value_to_always_include;
346 346
 			}
347 347
 		}
348
-		if ( $notDeletedOptionsOnly ) {
349
-			$query_params[ 0 ][ 'OR*options-query' ][ 'QSO_deleted' ] = FALSE;
348
+		if ($notDeletedOptionsOnly) {
349
+			$query_params[0]['OR*options-query']['QSO_deleted'] = FALSE;
350 350
 		}
351 351
 		//order by QSO_order
352
-		$query_params[ 'order_by' ] = array( 'QSO_order' => 'ASC' );
353
-		return $this->get_many_related( 'Question_Option', $query_params );
352
+		$query_params['order_by'] = array('QSO_order' => 'ASC');
353
+		return $this->get_many_related('Question_Option', $query_params);
354 354
 	}
355 355
 
356 356
 
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 	 * @return \EE_Question_Option[]
361 361
 	 */
362 362
 	public function temp_options() {
363
-		return $this->_model_relations[ 'Question_Option' ];
363
+		return $this->_model_relations['Question_Option'];
364 364
 	}
365 365
 
366 366
 
@@ -371,8 +371,8 @@  discard block
 block discarded – undo
371 371
 	 * @param EE_Question_Option $option
372 372
 	 * @return boolean success
373 373
 	 */
374
-	public function add_option( EE_Question_Option $option ) {
375
-		return $this->_add_relation_to( $option, 'Question_Option' );
374
+	public function add_option(EE_Question_Option $option) {
375
+		return $this->_add_relation_to($option, 'Question_Option');
376 376
 	}
377 377
 
378 378
 
@@ -382,8 +382,8 @@  discard block
 block discarded – undo
382 382
 	 * @param EE_Question_Option $option
383 383
 	 * @return boolean success
384 384
 	 */
385
-	public function add_temp_option( EE_Question_Option $option ) {
386
-		$this->_model_relations[ 'Question_Option' ][ ] = $option;
385
+	public function add_temp_option(EE_Question_Option $option) {
386
+		$this->_model_relations['Question_Option'][] = $option;
387 387
 		return TRUE;
388 388
 	}
389 389
 
@@ -394,8 +394,8 @@  discard block
 block discarded – undo
394 394
 	 * @param EE_Question_Option $option
395 395
 	 * @return boolean success
396 396
 	 */
397
-	public function remove_option( EE_Question_Option $option ) {
398
-		return $this->_remove_relation_to( $option, 'Question_Option' );
397
+	public function remove_option(EE_Question_Option $option) {
398
+		return $this->_remove_relation_to($option, 'Question_Option');
399 399
 	}
400 400
 
401 401
 
@@ -404,8 +404,8 @@  discard block
 block discarded – undo
404 404
 	 * @return bool
405 405
 	 */
406 406
 	public function is_system_question() {
407
-		$system_ID = $this->get( 'QST_system' );
408
-		return ! empty( $system_ID ) ? TRUE : FALSE;
407
+		$system_ID = $this->get('QST_system');
408
+		return ! empty($system_ID) ? TRUE : FALSE;
409 409
 	}
410 410
 
411 411
 
@@ -418,8 +418,8 @@  discard block
 block discarded – undo
418 418
 	 */
419 419
 	public function set_order_to_latest() {
420 420
 		$latest_order = $this->get_model()->get_latest_question_order();
421
-		$latest_order ++;
422
-		$this->set( 'QST_order', $latest_order );
421
+		$latest_order++;
422
+		$this->set('QST_order', $latest_order);
423 423
 	}
424 424
 
425 425
 
@@ -438,20 +438,20 @@  discard block
 block discarded – undo
438 438
 	 * Duplicates this question and its question options
439 439
 	 * @return \EE_Question
440 440
 	 */
441
-	public function duplicate( $options = array() ) {
441
+	public function duplicate($options = array()) {
442 442
 		$new_question = clone $this;
443
-		$new_question->set( 'QST_ID', null );
444
-		$new_question->set_display_text( sprintf( __( '%s **Duplicate**', 'event_espresso' ), $this->display_text() ) );
445
-		$new_question->set_admin_label( sprintf( __( '%s **Duplicate**', 'event_espresso' ), $this->admin_label() ) );
446
-		$new_question->set_system_ID( null );
447
-		$new_question->set_wp_user( get_current_user_id() );
443
+		$new_question->set('QST_ID', null);
444
+		$new_question->set_display_text(sprintf(__('%s **Duplicate**', 'event_espresso'), $this->display_text()));
445
+		$new_question->set_admin_label(sprintf(__('%s **Duplicate**', 'event_espresso'), $this->admin_label()));
446
+		$new_question->set_system_ID(null);
447
+		$new_question->set_wp_user(get_current_user_id());
448 448
                 //if we're duplicating a trashed question, assume we don't want the new one to be trashed
449
-                $new_question->set_deleted( false );
449
+                $new_question->set_deleted(false);
450 450
 		$success = $new_question->save();
451
-		if( $success ) {
451
+		if ($success) {
452 452
 			//we don't totally want to duplicate the question options, because we want them to be for the NEW question
453
-			foreach( $this->options() as $question_option ) {
454
-				$question_option->duplicate( array( 'QST_ID' => $new_question->ID() ) );
453
+			foreach ($this->options() as $question_option) {
454
+				$question_option->duplicate(array('QST_ID' => $new_question->ID()));
455 455
 			}
456 456
 			return $new_question;
457 457
 		} else {
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
 	 * @return int|float
465 465
 	 */
466 466
 	public function max() {
467
-		return $this->get( 'QST_max' );
467
+		return $this->get('QST_max');
468 468
 	}
469 469
 
470 470
 	/**
@@ -472,8 +472,8 @@  discard block
 block discarded – undo
472 472
 	 * @param int|float $new_max
473 473
 	 * @return void
474 474
 	 */
475
-	public function set_max( $new_max ) {
476
-		$this->set( 'QST_max', $new_max );
475
+	public function set_max($new_max) {
476
+		$this->set('QST_max', $new_max);
477 477
 	}
478 478
 
479 479
 
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
 	 * @param array $input_constructor_args
486 486
 	 * @return EE_Form_Input_Base
487 487
 	 */
488
-	public function generate_form_input( $registration = null, $answer = null, $input_constructor_args = array() ) {
488
+	public function generate_form_input($registration = null, $answer = null, $input_constructor_args = array()) {
489 489
 		$identifier = $this->is_system_question() ? $this->system_ID() : $this->ID();
490 490
 
491 491
 		$input_constructor_args = array_merge(
@@ -496,29 +496,29 @@  discard block
 block discarded – undo
496 496
 				),
497 497
 				$input_constructor_args
498 498
 			);
499
-		if( ! $answer instanceof EE_Answer && $registration instanceof EE_Registration ) {
500
-			$answer = EEM_Answer::instance()->get_registration_question_answer_object( $registration, $this->ID() );
499
+		if ( ! $answer instanceof EE_Answer && $registration instanceof EE_Registration) {
500
+			$answer = EEM_Answer::instance()->get_registration_question_answer_object($registration, $this->ID());
501 501
 		}
502 502
 		// has this question been answered ?
503
-		if ( $answer instanceof EE_Answer
503
+		if ($answer instanceof EE_Answer
504 504
              && $answer->value() !== ''
505 505
         ) {
506 506
 			//answer gets htmlspecialchars called on it, undo that please
507 507
 			//because the form input's display strategy may call esc_attr too
508 508
 			//which also does html special characters
509 509
 			$values_with_html_special_chars = $answer->value();
510
-			if( is_array( $values_with_html_special_chars ) ) {
511
-				$default_value = array_map( 'htmlspecialchars_decode', $values_with_html_special_chars );
510
+			if (is_array($values_with_html_special_chars)) {
511
+				$default_value = array_map('htmlspecialchars_decode', $values_with_html_special_chars);
512 512
 			} else {
513
-				$default_value = htmlspecialchars_decode( $values_with_html_special_chars );
513
+				$default_value = htmlspecialchars_decode($values_with_html_special_chars);
514 514
 			}
515 515
 			$input_constructor_args['default'] = $default_value;
516 516
 		}
517
-		$max_max_for_question = EEM_Question::instance()->absolute_max_for_system_question( $this->system_ID() );
518
-		if( EEM_Question::instance()->question_type_is_in_category(  $this->type(), 'text' ) ) {
519
-			$input_constructor_args[ 'validation_strategies' ][] = new EE_Max_Length_Validation_Strategy(
517
+		$max_max_for_question = EEM_Question::instance()->absolute_max_for_system_question($this->system_ID());
518
+		if (EEM_Question::instance()->question_type_is_in_category($this->type(), 'text')) {
519
+			$input_constructor_args['validation_strategies'][] = new EE_Max_Length_Validation_Strategy(
520 520
 				null,
521
-				min( $max_max_for_question, $this->max() )
521
+				min($max_max_for_question, $this->max())
522 522
 			);
523 523
 		}
524 524
 		$input_constructor_args = apply_filters(
@@ -530,22 +530,22 @@  discard block
 block discarded – undo
530 530
 		);
531 531
 
532 532
 		$result = null;
533
-		switch ( $this->type() ) {
533
+		switch ($this->type()) {
534 534
 			// Text
535 535
 			case EEM_Question::QST_type_text :
536
-				$result = new EE_Text_Input( $input_constructor_args );
536
+				$result = new EE_Text_Input($input_constructor_args);
537 537
 				break;
538 538
 			// Textarea
539 539
 			case EEM_Question::QST_type_textarea :
540
-				$result = new EE_Text_Area_Input( $input_constructor_args );
540
+				$result = new EE_Text_Area_Input($input_constructor_args);
541 541
 				break;
542 542
 			// Radio Buttons
543 543
 			case EEM_Question::QST_type_radio :
544
-				$result = new EE_Radio_Button_Input( $this->options(), $input_constructor_args );
544
+				$result = new EE_Radio_Button_Input($this->options(), $input_constructor_args);
545 545
 				break;
546 546
 			// Dropdown
547 547
 			case EEM_Question::QST_type_dropdown :
548
-				$result = new EE_Select_Input( $this->options(), $input_constructor_args );
548
+				$result = new EE_Select_Input($this->options(), $input_constructor_args);
549 549
 				break;
550 550
 			// State Dropdown
551 551
 			case EEM_Question::QST_type_state :
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
 					$registration,
557 557
 					$answer
558 558
 				);				
559
-				$result = new EE_State_Select_Input( $state_options, $input_constructor_args );
559
+				$result = new EE_State_Select_Input($state_options, $input_constructor_args);
560 560
 				break;
561 561
 			// Country Dropdown
562 562
 			case EEM_Question::QST_type_country :
@@ -567,47 +567,47 @@  discard block
 block discarded – undo
567 567
 					$registration,
568 568
 					$answer
569 569
 				);
570
-				$result = new EE_Country_Select_Input( $country_options, $input_constructor_args );
570
+				$result = new EE_Country_Select_Input($country_options, $input_constructor_args);
571 571
 				break;
572 572
 			// Checkboxes
573 573
 			case EEM_Question::QST_type_checkbox :
574
-				$result = new EE_Checkbox_Multi_Input( $this->options(), $input_constructor_args );
574
+				$result = new EE_Checkbox_Multi_Input($this->options(), $input_constructor_args);
575 575
 				break;
576 576
 			// Date
577 577
 			case EEM_Question::QST_type_date :
578
-				$result = new EE_Datepicker_Input( $input_constructor_args );
578
+				$result = new EE_Datepicker_Input($input_constructor_args);
579 579
 				break;
580 580
 			case EEM_Question::QST_type_html_textarea :
581
-				$input_constructor_args[ 'validation_strategies' ][] = new EE_Simple_HTML_Validation_Strategy();
582
-				$result =  new EE_Text_Area_Input( $input_constructor_args );
583
-				$result->remove_validation_strategy( 'EE_Plaintext_Validation_Strategy' );
581
+				$input_constructor_args['validation_strategies'][] = new EE_Simple_HTML_Validation_Strategy();
582
+				$result = new EE_Text_Area_Input($input_constructor_args);
583
+				$result->remove_validation_strategy('EE_Plaintext_Validation_Strategy');
584 584
 				break;
585 585
 			case EEM_Question::QST_type_email :
586
-				$result = new EE_Email_Input( $input_constructor_args );
586
+				$result = new EE_Email_Input($input_constructor_args);
587 587
 				break;
588 588
 			case EEM_Question::QST_type_us_phone :
589
-				$result = new EE_Phone_Input( $input_constructor_args );
589
+				$result = new EE_Phone_Input($input_constructor_args);
590 590
 				break;
591 591
 			case EEM_Question::QST_type_int :
592
-				$result = new EE_Integer_Input( $input_constructor_args );
592
+				$result = new EE_Integer_Input($input_constructor_args);
593 593
 				break;
594 594
 			case EEM_Question::QST_type_decimal :
595
-				$result = new EE_Float_Input( $input_constructor_args );
595
+				$result = new EE_Float_Input($input_constructor_args);
596 596
 				break;
597 597
 			case EEM_Question::QST_type_url :
598
-				$input_constructor_args[ 'validation_strategies' ][] = new EE_URL_Validation_Strategy();
599
-				$result = new EE_Text_Input( $input_constructor_args );
598
+				$input_constructor_args['validation_strategies'][] = new EE_URL_Validation_Strategy();
599
+				$result = new EE_Text_Input($input_constructor_args);
600 600
 				break;
601 601
 			case EEM_Question::QST_type_year :
602 602
 				$result = new EE_Year_Input(
603 603
 						$input_constructor_args,
604
-						apply_filters( 'FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__year_question__four_digit', true, $this ),
605
-						apply_filters( 'FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__year_question__early_range', 100, $this ),
606
-						apply_filters( 'FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__year_question__end_range', 100, $this )
604
+						apply_filters('FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__year_question__four_digit', true, $this),
605
+						apply_filters('FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__year_question__early_range', 100, $this),
606
+						apply_filters('FHEE__EE_SPCO_Reg_Step_Attendee_Information___generate_question_input__year_question__end_range', 100, $this)
607 607
 						);
608 608
 				break;
609 609
 			case EEM_Question::QST_type_multi_select :
610
-				$result = new EE_Select_Multiple_Input( $this->options(), $input_constructor_args );
610
+				$result = new EE_Select_Multiple_Input($this->options(), $input_constructor_args);
611 611
 				break;
612 612
 			// fallback
613 613
 			default :
@@ -618,12 +618,12 @@  discard block
 block discarded – undo
618 618
 					$this,
619 619
 					$input_constructor_args
620 620
 				);
621
-				if( ! $default_input ){
622
-					$default_input = new EE_Text_Input( $input_constructor_args );
621
+				if ( ! $default_input) {
622
+					$default_input = new EE_Text_Input($input_constructor_args);
623 623
 				}
624 624
 				$result = $default_input;
625 625
 		}
626
-		return apply_filters( 'FHEE__EE_Question__generate_form_input__return', $result, $registration, $this, $answer );
626
+		return apply_filters('FHEE__EE_Question__generate_form_input__return', $result, $registration, $this, $answer);
627 627
 	}
628 628
 
629 629
 
Please login to merge, or discard this patch.
core/db_classes/EE_Venue.class.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 	 * @param array $props_n_values  incoming values from the database
49 49
 	 * @param string $timezone  incoming timezone as set by the model.  If not set the timezone for
50 50
 	 *                          		the website will be used.
51
-	 * @return EE_Attendee
51
+	 * @return EE_Venue
52 52
 	 */
53 53
 	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
54 54
 		return new self( $props_n_values, TRUE, $timezone );
Please login to merge, or discard this patch.
Spacing   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1
-<?php if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
2
-	exit( 'No direct script access allowed' );
1
+<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) {
2
+	exit('No direct script access allowed');
3 3
 }
4 4
 /**
5 5
  * Event Espresso
@@ -37,9 +37,9 @@  discard block
 block discarded – undo
37 37
 	 *                             		    date_format and the second value is the time format
38 38
 	 * @return EE_Attendee
39 39
 	 */
40
-	public static function new_instance( $props_n_values = array(), $timezone = null, $date_formats = array() ) {
41
-		$has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone, $date_formats );
42
-		return $has_object ? $has_object : new self( $props_n_values, false, $timezone, $date_formats );
40
+	public static function new_instance($props_n_values = array(), $timezone = null, $date_formats = array()) {
41
+		$has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone, $date_formats);
42
+		return $has_object ? $has_object : new self($props_n_values, false, $timezone, $date_formats);
43 43
 	}
44 44
 
45 45
 
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 	 *                          		the website will be used.
51 51
 	 * @return EE_Attendee
52 52
 	 */
53
-	public static function new_instance_from_db( $props_n_values = array(), $timezone = null ) {
54
-		return new self( $props_n_values, TRUE, $timezone );
53
+	public static function new_instance_from_db($props_n_values = array(), $timezone = null) {
54
+		return new self($props_n_values, TRUE, $timezone);
55 55
 	}
56 56
 
57 57
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 	 * @return string
62 62
 	 */
63 63
 	function name() {
64
-		return $this->get( 'VNU_name' );
64
+		return $this->get('VNU_name');
65 65
 	}
66 66
 
67 67
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	 * @return string
71 71
 	 */
72 72
 	function phone() {
73
-		return $this->get( 'VNU_phone' );
73
+		return $this->get('VNU_phone');
74 74
 	}
75 75
 
76 76
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 	 * @return string
81 81
 	 */
82 82
 	function venue_url() {
83
-		return $this->get( 'VNU_url' );
83
+		return $this->get('VNU_url');
84 84
 	}
85 85
 
86 86
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 	 * @return string
90 90
 	 */
91 91
 	function description() {
92
-		return $this->get( 'VNU_desc' );
92
+		return $this->get('VNU_desc');
93 93
 	}
94 94
 
95 95
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 * @return string
100 100
 	 */
101 101
 	function excerpt() {
102
-		return $this->get( 'VNU_short_desc' );
102
+		return $this->get('VNU_short_desc');
103 103
 	}
104 104
 
105 105
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 * @return string
110 110
 	 */
111 111
 	function identifier() {
112
-		return $this->get( 'VNU_identifier' );
112
+		return $this->get('VNU_identifier');
113 113
 	}
114 114
 
115 115
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 	 * @return string
120 120
 	 */
121 121
 	function address() {
122
-		return $this->get( 'VNU_address' );
122
+		return $this->get('VNU_address');
123 123
 	}
124 124
 
125 125
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 	 * @return string
130 130
 	 */
131 131
 	function address2() {
132
-		return $this->get( 'VNU_address2' );
132
+		return $this->get('VNU_address2');
133 133
 	}
134 134
 
135 135
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 	 * @return string
141 141
 	 */
142 142
 	function city() {
143
-		return $this->get( 'VNU_city' );
143
+		return $this->get('VNU_city');
144 144
 	}
145 145
 
146 146
 	/**
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	 * @return int
149 149
 	 */
150 150
 	function state_ID() {
151
-		return $this->get( 'STA_ID' );
151
+		return $this->get('STA_ID');
152 152
 	}
153 153
 
154 154
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 	 * @return string
167 167
 	 */
168 168
 	public function state_name() {
169
-		return $this->state_obj() instanceof EE_State ? $this->state_obj()->name() :  '';
169
+		return $this->state_obj() instanceof EE_State ? $this->state_obj()->name() : '';
170 170
 	}
171 171
 
172 172
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 	 * @return EE_State
177 177
 	 */
178 178
 	function state_obj() {
179
-		return $this->get_first_related( 'State' );
179
+		return $this->get_first_related('State');
180 180
 	}
181 181
 
182 182
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 	 * @return string
189 189
 	 */
190 190
 	public function state() {
191
-		if ( apply_filters( 'FHEE__EEI_Address__state__use_abbreviation', true, $this->state_obj() ) ) {
191
+		if (apply_filters('FHEE__EEI_Address__state__use_abbreviation', true, $this->state_obj())) {
192 192
 			return $this->state_abbrev();
193 193
 		} else {
194 194
 			return $this->state_name();
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 	 * @return string
203 203
 	 */
204 204
 	function country_ID() {
205
-		return $this->get( 'CNT_ISO' );
205
+		return $this->get('CNT_ISO');
206 206
 	}
207 207
 
208 208
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 	 * @return string
212 212
 	 */
213 213
 	public function country_name() {
214
-		return $this->country_obj() instanceof EE_Country ? $this->country_obj()->name() :  '';
214
+		return $this->country_obj() instanceof EE_Country ? $this->country_obj()->name() : '';
215 215
 	}
216 216
 
217 217
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 	 * @return EE_Country
222 222
 	 */
223 223
 	function country_obj() {
224
-		return $this->get_first_related( 'Country' );
224
+		return $this->get_first_related('Country');
225 225
 	}
226 226
 
227 227
 
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 	 * @return string
234 234
 	 */
235 235
 	public function country() {
236
-		if ( apply_filters( 'FHEE__EEI_Address__country__use_abbreviation', true, $this->country_obj() ) ) {
236
+		if (apply_filters('FHEE__EEI_Address__country__use_abbreviation', true, $this->country_obj())) {
237 237
 			return $this->country_ID();
238 238
 		} else {
239 239
 			return $this->country_name();
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 	 * @return string
248 248
 	 */
249 249
 	function zip() {
250
-		return $this->get( 'VNU_zip' );
250
+		return $this->get('VNU_zip');
251 251
 	}
252 252
 
253 253
 
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 	 * @return int
258 258
 	 */
259 259
 	function capacity() {
260
-		return $this->get_pretty( 'VNU_capacity', 'symbol' );
260
+		return $this->get_pretty('VNU_capacity', 'symbol');
261 261
 	}
262 262
 
263 263
 
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 	 * @return string
268 268
 	 */
269 269
 	function created() {
270
-		return $this->get( 'VNU_created' );
270
+		return $this->get('VNU_created');
271 271
 	}
272 272
 
273 273
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 	 * @return string
278 278
 	 */
279 279
 	function modified() {
280
-		return $this->get( 'VNU_modified' );
280
+		return $this->get('VNU_modified');
281 281
 	}
282 282
 
283 283
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	 * @return int
288 288
 	 */
289 289
 	function order() {
290
-		return $this->get( 'VNU_order' );
290
+		return $this->get('VNU_order');
291 291
 	}
292 292
 
293 293
 
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
 	 * @return int
298 298
 	 */
299 299
 	function wp_user() {
300
-		return $this->get( 'VNU_wp_user' );
300
+		return $this->get('VNU_wp_user');
301 301
 	}
302 302
 
303 303
 
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 	 * @return string
307 307
 	 */
308 308
 	function virtual_phone() {
309
-		return $this->get( 'VNU_virtual_phone' );
309
+		return $this->get('VNU_virtual_phone');
310 310
 	}
311 311
 
312 312
 
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 	 * @return string
316 316
 	 */
317 317
 	function virtual_url() {
318
-		return $this->get( 'VNU_virtual_url' );
318
+		return $this->get('VNU_virtual_url');
319 319
 	}
320 320
 
321 321
 
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 	 * @return bool
325 325
 	 */
326 326
 	function enable_for_gmap() {
327
-		return $this->get( 'VNU_enable_for_gmap' );
327
+		return $this->get('VNU_enable_for_gmap');
328 328
 	}
329 329
 
330 330
 
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 	 * @return string
334 334
 	 */
335 335
 	function google_map_link() {
336
-		return $this->get( 'VNU_google_map_link' );
336
+		return $this->get('VNU_google_map_link');
337 337
 	}
338 338
 
339 339
 
@@ -345,16 +345,16 @@  discard block
 block discarded – undo
345 345
 	 * @param bool  $upcoming
346 346
 	 * @return EE_Event[]
347 347
 	 */
348
-	function events( $query_params = array(), $upcoming = FALSE ) {
349
-		if ( $upcoming ) {
348
+	function events($query_params = array(), $upcoming = FALSE) {
349
+		if ($upcoming) {
350 350
 			$query_params = array(
351 351
 				array(
352 352
 					'status' => 'publish',
353
-					'Datetime.DTT_EVT_start' => array( '>',  EEM_Datetime::instance()->current_time_for_query( 'DTT_EVT_start' ) )
353
+					'Datetime.DTT_EVT_start' => array('>', EEM_Datetime::instance()->current_time_for_query('DTT_EVT_start'))
354 354
 				)
355 355
 			);
356 356
 		}
357
-		return $this->get_many_related( 'Event', $query_params );
357
+		return $this->get_many_related('Event', $query_params);
358 358
 	}
359 359
 
360 360
 
@@ -372,8 +372,8 @@  discard block
 block discarded – undo
372 372
 	/**
373 373
 	 * Sets address
374 374
 	 */
375
-	function set_address( $address = '' ) {
376
-		$this->set( 'VNU_address', $address );
375
+	function set_address($address = '') {
376
+		$this->set('VNU_address', $address);
377 377
 	}
378 378
 
379 379
 
@@ -381,8 +381,8 @@  discard block
 block discarded – undo
381 381
 	/**
382 382
 	 * @param string $address2
383 383
 	 */
384
-	function set_address2( $address2 = '' ) {
385
-		$this->set( 'VNU_address2', $address2 );
384
+	function set_address2($address2 = '') {
385
+		$this->set('VNU_address2', $address2);
386 386
 	}
387 387
 
388 388
 
@@ -390,8 +390,8 @@  discard block
 block discarded – undo
390 390
 	/**
391 391
 	 * @param string $city
392 392
 	 */
393
-	function set_city( $city = '' ) {
394
-		$this->set( 'VNU_city', $city );
393
+	function set_city($city = '') {
394
+		$this->set('VNU_city', $city);
395 395
 	}
396 396
 
397 397
 
@@ -399,8 +399,8 @@  discard block
 block discarded – undo
399 399
 	/**
400 400
 	 * @param int $state
401 401
 	 */
402
-	function set_state_ID( $state = 0 ) {
403
-		$this->set( 'STA_ID', $state );
402
+	function set_state_ID($state = 0) {
403
+		$this->set('STA_ID', $state);
404 404
 	}
405 405
 
406 406
 
@@ -411,8 +411,8 @@  discard block
 block discarded – undo
411 411
 	 * @param EE_State /int $state_id_or_obj
412 412
 	 * @return EE_State
413 413
 	 */
414
-	function set_state_obj( $state_id_or_obj ) {
415
-		return $this->_add_relation_to( $state_id_or_obj, 'State' );
414
+	function set_state_obj($state_id_or_obj) {
415
+		return $this->_add_relation_to($state_id_or_obj, 'State');
416 416
 	}
417 417
 
418 418
 
@@ -420,8 +420,8 @@  discard block
 block discarded – undo
420 420
 	/**
421 421
 	 * @param int $country_ID
422 422
 	 */
423
-	function set_country_ID( $country_ID = 0 ) {
424
-		$this->set( 'CNT_ISO', $country_ID );
423
+	function set_country_ID($country_ID = 0) {
424
+		$this->set('CNT_ISO', $country_ID);
425 425
 	}
426 426
 
427 427
 
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
 	 * @param EE_Country /string $country_id_or_obj
431 431
 	 * @return EE_Country
432 432
 	 */
433
-	function set_country_obj( $country_id_or_obj ) {
433
+	function set_country_obj($country_id_or_obj) {
434 434
 		return $this->_add_relation_to($country_id_or_obj, 'Country');
435 435
 	}
436 436
 
@@ -439,8 +439,8 @@  discard block
 block discarded – undo
439 439
 	/**
440 440
 	 * @param string $zip
441 441
 	 */
442
-	function set_zip( $zip = '' ) {
443
-		$this->set( 'VNU_zip', $zip );
442
+	function set_zip($zip = '') {
443
+		$this->set('VNU_zip', $zip);
444 444
 	}
445 445
 
446 446
 
@@ -448,8 +448,8 @@  discard block
 block discarded – undo
448 448
 	/**
449 449
 	 * @param int $capacity
450 450
 	 */
451
-	function set_capacity( $capacity = 0 ) {
452
-		$this->set( 'VNU_capacity', $capacity );
451
+	function set_capacity($capacity = 0) {
452
+		$this->set('VNU_capacity', $capacity);
453 453
 	}
454 454
 
455 455
 
@@ -457,8 +457,8 @@  discard block
 block discarded – undo
457 457
 	/**
458 458
 	 * @param string $created
459 459
 	 */
460
-	function set_created( $created = '' ) {
461
-		$this->set( 'VNU_created', $created );
460
+	function set_created($created = '') {
461
+		$this->set('VNU_created', $created);
462 462
 	}
463 463
 
464 464
 
@@ -466,8 +466,8 @@  discard block
 block discarded – undo
466 466
 	/**
467 467
 	 * @param string $desc
468 468
 	 */
469
-	function set_description( $desc = '' ) {
470
-		$this->set( 'VNU_desc', $desc );
469
+	function set_description($desc = '') {
470
+		$this->set('VNU_desc', $desc);
471 471
 	}
472 472
 
473 473
 
@@ -475,8 +475,8 @@  discard block
 block discarded – undo
475 475
 	/**
476 476
 	 * @param string $identifier
477 477
 	 */
478
-	function set_identifier( $identifier = '' ) {
479
-		$this->set( 'VNU_identifier', $identifier );
478
+	function set_identifier($identifier = '') {
479
+		$this->set('VNU_identifier', $identifier);
480 480
 	}
481 481
 
482 482
 
@@ -484,8 +484,8 @@  discard block
 block discarded – undo
484 484
 	/**
485 485
 	 * @param string $modified
486 486
 	 */
487
-	function set_modified( $modified = '' ) {
488
-		$this->set( 'VNU_modified', $modified );
487
+	function set_modified($modified = '') {
488
+		$this->set('VNU_modified', $modified);
489 489
 	}
490 490
 
491 491
 
@@ -493,8 +493,8 @@  discard block
 block discarded – undo
493 493
 	/**
494 494
 	 * @param string $name
495 495
 	 */
496
-	function set_name( $name = '' ) {
497
-		$this->set( 'VNU_name', $name );
496
+	function set_name($name = '') {
497
+		$this->set('VNU_name', $name);
498 498
 	}
499 499
 
500 500
 
@@ -502,8 +502,8 @@  discard block
 block discarded – undo
502 502
 	/**
503 503
 	 * @param int $order
504 504
 	 */
505
-	function set_order( $order = 0 ) {
506
-		$this->set( 'VNU_order', $order );
505
+	function set_order($order = 0) {
506
+		$this->set('VNU_order', $order);
507 507
 	}
508 508
 
509 509
 
@@ -511,8 +511,8 @@  discard block
 block discarded – undo
511 511
 	/**
512 512
 	 * @param string $phone
513 513
 	 */
514
-	function set_phone( $phone = '' ) {
515
-		$this->set( 'VNU_phone', $phone );
514
+	function set_phone($phone = '') {
515
+		$this->set('VNU_phone', $phone);
516 516
 	}
517 517
 
518 518
 
@@ -520,8 +520,8 @@  discard block
 block discarded – undo
520 520
 	/**
521 521
 	 * @param int $wp_user
522 522
 	 */
523
-	function set_wp_user( $wp_user = 1 ) {
524
-		$this->set( 'VNU_wp_user', $wp_user );
523
+	function set_wp_user($wp_user = 1) {
524
+		$this->set('VNU_wp_user', $wp_user);
525 525
 	}
526 526
 
527 527
 
@@ -529,8 +529,8 @@  discard block
 block discarded – undo
529 529
 	/**
530 530
 	 * @param string $url
531 531
 	 */
532
-	function set_venue_url( $url = '' ) {
533
-		$this->set( 'VNU_url', $url );
532
+	function set_venue_url($url = '') {
533
+		$this->set('VNU_url', $url);
534 534
 	}
535 535
 
536 536
 
@@ -538,8 +538,8 @@  discard block
 block discarded – undo
538 538
 	/**
539 539
 	 * @param string $phone
540 540
 	 */
541
-	function set_virtual_phone( $phone = '' ) {
542
-		$this->set( 'VNU_virtual_phone', $phone );
541
+	function set_virtual_phone($phone = '') {
542
+		$this->set('VNU_virtual_phone', $phone);
543 543
 	}
544 544
 
545 545
 
@@ -547,8 +547,8 @@  discard block
 block discarded – undo
547 547
 	/**
548 548
 	 * @param string $url
549 549
 	 */
550
-	function set_virtual_url( $url = '' ) {
551
-		$this->set( 'VNU_virtual_url', $url );
550
+	function set_virtual_url($url = '') {
551
+		$this->set('VNU_virtual_url', $url);
552 552
 	}
553 553
 
554 554
 
@@ -556,8 +556,8 @@  discard block
 block discarded – undo
556 556
 	/**
557 557
 	 * @param string $enable
558 558
 	 */
559
-	function set_enable_for_gmap( $enable = '' ) {
560
-		$this->set( 'VNU_enable_for_gmap', $enable );
559
+	function set_enable_for_gmap($enable = '') {
560
+		$this->set('VNU_enable_for_gmap', $enable);
561 561
 	}
562 562
 
563 563
 
@@ -565,8 +565,8 @@  discard block
 block discarded – undo
565 565
 	/**
566 566
 	 * @param string $google_map_link
567 567
 	 */
568
-	function set_google_map_link( $google_map_link = '' ) {
569
-		$this->set( 'VNU_google_map_link', $google_map_link );
568
+	function set_google_map_link($google_map_link = '') {
569
+		$this->set('VNU_google_map_link', $google_map_link);
570 570
 	}
571 571
 
572 572
 
Please login to merge, or discard this patch.
payment_methods/Paypal_Standard/EE_PMT_Paypal_Standard.pm.php 2 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
  * @since 				$VID:$
11 11
  *
12 12
  */
13
-class EE_PMT_Paypal_Standard extends EE_PMT_Base{
13
+class EE_PMT_Paypal_Standard extends EE_PMT_Base {
14 14
 
15 15
 	const shipping_info_none = 1;
16 16
 	const shipping_info_optional = 0;
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 	 * @param \EE_Transaction $transaction
47 47
 	 * @return NULL
48 48
 	 */
49
-	public function generate_new_billing_form( EE_Transaction $transaction = NULL ) {
49
+	public function generate_new_billing_form(EE_Transaction $transaction = NULL) {
50 50
 		return NULL;
51 51
 	}
52 52
 
@@ -59,13 +59,13 @@  discard block
 block discarded – undo
59 59
 	 * @throws \EE_Error
60 60
 	 */
61 61
 	public function generate_new_settings_form() {
62
-		require_once( $this->file_folder() . 'EE_Paypal_Standard_Form.form.php' );
63
-		$form =  new EE_Paypal_Standard_Form( $this );
64
-		$form->get_input( 'PMD_debug_mode' )->set_html_label_text(
65
-			sprintf( __( "Use PayPal Sandbox %s", 'event_espresso' ), $this->get_help_tab_link() )
62
+		require_once($this->file_folder().'EE_Paypal_Standard_Form.form.php');
63
+		$form = new EE_Paypal_Standard_Form($this);
64
+		$form->get_input('PMD_debug_mode')->set_html_label_text(
65
+			sprintf(__("Use PayPal Sandbox %s", 'event_espresso'), $this->get_help_tab_link())
66 66
 		);
67
-		$form->get_input( 'shipping_details' )->set_html_label_text(
68
-			sprintf( __( "Shipping Address Options %s", "event_espresso" ), $this->get_help_tab_link() )
67
+		$form->get_input('shipping_details')->set_html_label_text(
68
+			sprintf(__("Shipping Address Options %s", "event_espresso"), $this->get_help_tab_link())
69 69
 		);
70 70
 		return $form;
71 71
 	}
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	 * @see EE_PMT_Base::help_tabs_config()
78 78
 	 * @return array
79 79
 	 */
80
-	public function help_tabs_config(){
80
+	public function help_tabs_config() {
81 81
 		return array(
82 82
 			$this->get_help_tab_name() => array(
83 83
 				'title'=>  __("PayPal Standard Settings", 'event_espresso'),
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
 	 * @return EE_Payment
100 100
 	 * @throws \EE_Error
101 101
 	 */
102
-	public function finalize_payment_for($transaction){
102
+	public function finalize_payment_for($transaction) {
103 103
 		// PayPal standard actually sends the IPN info along with the user when they return to our site
104 104
 		// so in case the IPN is arriving later, let's try to process an IPN!
105
-		if( $_SERVER['REQUEST_METHOD'] === 'POST' ){
106
-			return $this->handle_ipn($_POST, $transaction );
107
-		}else{
108
-			return parent::finalize_payment_for( $transaction );
105
+		if ($_SERVER['REQUEST_METHOD'] === 'POST') {
106
+			return $this->handle_ipn($_POST, $transaction);
107
+		} else {
108
+			return parent::finalize_payment_for($transaction);
109 109
 		}
110 110
 	}
111 111
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
 		// so in case the IPN is arriving later, let's try to process an IPN!
105 105
 		if( $_SERVER['REQUEST_METHOD'] === 'POST' ){
106 106
 			return $this->handle_ipn($_POST, $transaction );
107
-		}else{
107
+		} else{
108 108
 			return parent::finalize_payment_for( $transaction );
109 109
 		}
110 110
 	}
Please login to merge, or discard this patch.
core/helpers/EEH_Formatter.helper.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -74,6 +74,7 @@
 block discarded – undo
74 74
 	 * [ee_tep_not_null description]
75 75
 	 *
76 76
 	 * @param  string | array $value [description]
77
+	 * @param string $value
77 78
 	 * @return bool       [description]
78 79
 	 */
79 80
 	static public function ee_tep_not_null( $value ) {
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'EVENT_ESPRESSO_VERSION' ) ) {
3
-	exit( 'NO direct script access allowed' );
2
+if ( ! defined('EVENT_ESPRESSO_VERSION')) {
3
+	exit('NO direct script access allowed');
4 4
 }
5 5
 
6 6
 
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 	 * @param  string $content content to format
27 27
 	 * @return string          formatted content
28 28
 	 */
29
-	static public function admin_format_content( $content = '' ) {
30
-		return wpautop( stripslashes_deep( html_entity_decode( $content, ENT_QUOTES, "UTF-8" ) ) );
29
+	static public function admin_format_content($content = '') {
30
+		return wpautop(stripslashes_deep(html_entity_decode($content, ENT_QUOTES, "UTF-8")));
31 31
 	}
32 32
 
33 33
 
@@ -43,14 +43,14 @@  discard block
 block discarded – undo
43 43
 	 * @param  boolean $protected true then we run htmlspecialchars and return
44 44
 	 * @return string
45 45
 	 */
46
-	static public function ee_tep_output_string( $string, $translate = false, $protected = false ) {
47
-		if ( $protected === true ) {
48
-			return htmlspecialchars( $string );
46
+	static public function ee_tep_output_string($string, $translate = false, $protected = false) {
47
+		if ($protected === true) {
48
+			return htmlspecialchars($string);
49 49
 		} else {
50
-			if ( $translate === false ) {
51
-				return self::ee_tep_parse_input_field_data( $string, array( '"' => '&quot;' ) );
50
+			if ($translate === false) {
51
+				return self::ee_tep_parse_input_field_data($string, array('"' => '&quot;'));
52 52
 			} else {
53
-				return self::ee_tep_parse_input_field_data( $string, $translate );
53
+				return self::ee_tep_parse_input_field_data($string, $translate);
54 54
 			}
55 55
 		}
56 56
 	}
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
 	 * @param         array ] $parse array in the form array( 'from' => 'to', ... )
65 65
 	 * @return string
66 66
 	 */
67
-	static public function ee_tep_parse_input_field_data( $data, $parse ) {
68
-		return strtr( trim( $data ), $parse );
67
+	static public function ee_tep_parse_input_field_data($data, $parse) {
68
+		return strtr(trim($data), $parse);
69 69
 	}
70 70
 
71 71
 
@@ -76,15 +76,15 @@  discard block
 block discarded – undo
76 76
 	 * @param  string | array $value [description]
77 77
 	 * @return bool       [description]
78 78
 	 */
79
-	static public function ee_tep_not_null( $value ) {
80
-		if ( is_array( $value ) ) {
81
-			if ( count( $value ) > 0 ) {
79
+	static public function ee_tep_not_null($value) {
80
+		if (is_array($value)) {
81
+			if (count($value) > 0) {
82 82
 				return true;
83 83
 			} else {
84 84
 				return false;
85 85
 			}
86 86
 		} else {
87
-			if ( ( $value !== '' ) && ( strtolower( $value ) !== 'null' ) && ( strlen( trim( $value ) ) > 0 ) ) {
87
+			if (($value !== '') && (strtolower($value) !== 'null') && (strlen(trim($value)) > 0)) {
88 88
 				return true;
89 89
 			} else {
90 90
 				return false;
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	 * @return string
105 105
 	 * @deprecated v4.6.21
106 106
 	 */
107
-	static public function event_date_display( $date, $format = '' ) {
107
+	static public function event_date_display($date, $format = '') {
108 108
 		EE_Error::doing_it_wrong(
109 109
 			__METHOD__,
110 110
 			__(
Please login to merge, or discard this patch.
event_single_caff/templates/admin-event-single-settings.template.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2
-add_filter( 'FHEE__EEH_Form_Fields__label_html', '__return_empty_string' );
2
+add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string');
3 3
 $values = EEH_Form_Fields::prep_answer_options(
4 4
 	array(
5
-		array( 'id' => 1, 'text' => __( 'Yes', 'event_espresso' ) ),
6
-		array( 'id' => 0, 'text' => __( 'No', 'event_espresso' ) )
5
+		array('id' => 1, 'text' => __('Yes', 'event_espresso')),
6
+		array('id' => 0, 'text' => __('No', 'event_espresso'))
7 7
 	)
8 8
 );
9 9
 ?>
@@ -22,27 +22,27 @@  discard block
 block discarded – undo
22 22
 					</label>
23 23
 				</th>
24 24
 				<td>
25
-					<?php echo EEH_Form_Fields::select( 'display_status_banner_single', $display_status_banner_single, $values, 'display_status_banner_single', 'display_status_banner_single' ); ?>
26
-					<p class="description"><?php _e( 'Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the single event page.', 'event_espresso' ); ?></p>
25
+					<?php echo EEH_Form_Fields::select('display_status_banner_single', $display_status_banner_single, $values, 'display_status_banner_single', 'display_status_banner_single'); ?>
26
+					<p class="description"><?php _e('Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the single event page.', 'event_espresso'); ?></p>
27 27
 				</td>
28 28
 			</tr>
29 29
 
30 30
 			<tr>
31 31
 				<th>
32 32
 					<label for="display_venue">
33
-						<?php _e( 'Display Venue Details', 'event_espresso' ); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info');?>
33
+						<?php _e('Display Venue Details', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info'); ?>
34 34
 					</label>
35 35
 				</th>
36 36
 				<td>
37
-					<?php echo EEH_Form_Fields::select( 'display_venue', $display_venue, $values, 'display_venue', 'display_venue' ); ?>
38
-					<p class="description"><?php _e( 'Do not use this if you are using the venue shortcodes in your event description.', 'event_espresso' ); ?></p>
37
+					<?php echo EEH_Form_Fields::select('display_venue', $display_venue, $values, 'display_venue', 'display_venue'); ?>
38
+					<p class="description"><?php _e('Do not use this if you are using the venue shortcodes in your event description.', 'event_espresso'); ?></p>
39 39
 				</td>
40 40
 			</tr>
41 41
 
42 42
 			<tr>
43 43
 				<th>
44 44
 					<label for="EED_Events_Single_use_sortable_display_order">
45
-						<?php _e( 'Use Custom Display Order?', 'event_espresso' ); ?>
45
+						<?php _e('Use Custom Display Order?', 'event_espresso'); ?>
46 46
 					</label>
47 47
 				</th>
48 48
 				<td>
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 					<p class="description ">
59 59
 						<?php
60 60
 						echo sprintf(
61
-							__( '%1$sPlease Note:%2$s%3$sIf you are currently using filters to customize the display order for elements within the Event Single page display, then you do NOT activate this feature until those filters have been removed or disabled. If this feature is activated while still using such filters, duplicate event content such as the ticket selector, datetimes, or venue information could be displayed on the frontend of the site. Please verify that this is not the case after activating this feature.', 'event_espresso' ),
61
+							__('%1$sPlease Note:%2$s%3$sIf you are currently using filters to customize the display order for elements within the Event Single page display, then you do NOT activate this feature until those filters have been removed or disabled. If this feature is activated while still using such filters, duplicate event content such as the ticket selector, datetimes, or venue information could be displayed on the frontend of the site. Please verify that this is not the case after activating this feature.', 'event_espresso'),
62 62
 							'<span class="important-notice">',
63 63
 							'</span>',
64 64
 							'<br />'
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
 
71 71
 			<tr>
72 72
 				<th>
73
-					<?php _e('Display Order', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info');?>
73
+					<?php _e('Display Order', 'event_espresso'); ?><?php echo EEH_Template::get_help_tab_link('display_addresses_in_reg_form_info'); ?>
74 74
 				</th>
75 75
 				<td>
76 76
 
77
-					<?php wp_nonce_field( 'espresso_update_event_single_order', 'espresso_update_event_single_order_nonce', false ); ?>
77
+					<?php wp_nonce_field('espresso_update_event_single_order', 'espresso_update_event_single_order_nonce', false); ?>
78 78
 					<?php echo $event_single_display_order; ?>
79 79
 
80 80
 					<p class="description"><?php _e('Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the single event page.', 'event_espresso'); ?></p>
Please login to merge, or discard this patch.
events_archive_caff/templates/admin-event-list-settings.template.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@  discard block
 block discarded – undo
1 1
 <?php
2
-add_filter( 'FHEE__EEH_Form_Fields__label_html', '__return_empty_string' );
2
+add_filter('FHEE__EEH_Form_Fields__label_html', '__return_empty_string');
3 3
 
4
-$values = EEH_Form_Fields::prep_answer_options( array(
5
-	array( 'id' => 1, 'text' => __('Yes', 'event_espresso')),
6
-	array( 'id' => 0, 'text' => __('No', 'event_espresso'))
4
+$values = EEH_Form_Fields::prep_answer_options(array(
5
+	array('id' => 1, 'text' => __('Yes', 'event_espresso')),
6
+	array('id' => 0, 'text' => __('No', 'event_espresso'))
7 7
 ));
8 8
 
9
-$description = EEH_Form_Fields::prep_answer_options( array(
10
-	array( 'id' => 0, 'text' => __('none', 'event_espresso')),
11
-	array( 'id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')),
12
-	array( 'id' => 2, 'text' => __('full description', 'event_espresso'))
9
+$description = EEH_Form_Fields::prep_answer_options(array(
10
+	array('id' => 0, 'text' => __('none', 'event_espresso')),
11
+	array('id' => 1, 'text' => __('excerpt (short desc)', 'event_espresso')),
12
+	array('id' => 2, 'text' => __('full description', 'event_espresso'))
13 13
 ));
14 14
 
15 15
 ?>
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 			<tr>
28 28
 				<th>
29 29
 					<label for="event_listings_url">
30
-						<?php _e('Event Listings URL', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('event_listings_url_info');?>
30
+						<?php _e('Event Listings URL', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('event_listings_url_info'); ?>
31 31
 					</label>
32 32
 				</th>
33 33
 				<td>
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 					</label>
43 43
 				</th>
44 44
 				<td>
45
-					<p><?php echo site_url() . '/ ' . EEH_Form_Fields::text( 'not_used', EE_Registry::instance()->CFG->core->event_cpt_slug, 'event_cpt_slug', 'event_cpt_slug', 'regular' ); ?></p>
45
+					<p><?php echo site_url().'/ '.EEH_Form_Fields::text('not_used', EE_Registry::instance()->CFG->core->event_cpt_slug, 'event_cpt_slug', 'event_cpt_slug', 'regular'); ?></p>
46 46
 					<p class="description"><?php _e('This allows you to configure what slug is used for the url of all event pages.', 'event_espresso'); ?></p>
47
-					<?php if ( has_filter( 'FHEE__EE_Register_CPTs__register_CPT__rewrite' ) ) : ?>
47
+					<?php if (has_filter('FHEE__EE_Register_CPTs__register_CPT__rewrite')) : ?>
48 48
 						<p class="important-notice">
49 49
 							<?php
50 50
 							sprintf(
51
-								__( 'Usage of the %1$s FHEE__EE_Register_CPTs__register_CPT__rewrite %2$s filter has been detected.  Please be aware that while this filter is being used, this setting has no affect.', 'event_espresso' ),
51
+								__('Usage of the %1$s FHEE__EE_Register_CPTs__register_CPT__rewrite %2$s filter has been detected.  Please be aware that while this filter is being used, this setting has no affect.', 'event_espresso'),
52 52
 								'<code>',
53 53
 								'</code>'
54 54
 							);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 					</label>
66 66
 				</th>
67 67
 				<td>
68
-				<?php echo EEH_Form_Fields::select( 'display_status_banner', $display_status_banner, $values, 'EED_Events_Archive_display_status_banner', 'EED_Events_Archive_display_status_banner' );?>
68
+				<?php echo EEH_Form_Fields::select('display_status_banner', $display_status_banner, $values, 'EED_Events_Archive_display_status_banner', 'EED_Events_Archive_display_status_banner'); ?>
69 69
 					<p class="description"><?php _e('Selecting "Yes" will inject an Event Status banner with the title whenever Events are displaying on the events archive page.', 'event_espresso'); ?></p>
70 70
 				</td>
71 71
 			</tr>
@@ -73,55 +73,55 @@  discard block
 block discarded – undo
73 73
 			<tr>
74 74
 				<th>
75 75
 					<label for="EED_Events_Archive_display_description">
76
-						<?php _e('Display Description', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_description_info');?>
76
+						<?php _e('Display Description', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_description_info'); ?>
77 77
 					</label>
78 78
 				</th>
79 79
 				<td>
80
-					<?php echo EEH_Form_Fields::select( 'description', $display_description, $description, 'EED_Events_Archive_display_description', 'EED_Events_Archive_display_description' );?>
80
+					<?php echo EEH_Form_Fields::select('description', $display_description, $description, 'EED_Events_Archive_display_description', 'EED_Events_Archive_display_description'); ?>
81 81
 				</td>
82 82
 			</tr>
83 83
 
84 84
 			<tr>
85 85
 				<th>
86 86
 					<label for="EED_Events_Archive_display_ticket_selector">
87
-						<?php _e('Display Ticket Selector', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_ticket_selector_info');?>
87
+						<?php _e('Display Ticket Selector', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_ticket_selector_info'); ?>
88 88
 					</label>
89 89
 				</th>
90 90
 				<td>
91
-					<?php echo EEH_Form_Fields::select( 'ticket_selector', $display_ticket_selector, $values, 'EED_Events_Archive_display_ticket_selector', 'EED_Events_Archive_display_ticket_selector' );?>
91
+					<?php echo EEH_Form_Fields::select('ticket_selector', $display_ticket_selector, $values, 'EED_Events_Archive_display_ticket_selector', 'EED_Events_Archive_display_ticket_selector'); ?>
92 92
 				</td>
93 93
 			</tr>
94 94
 
95 95
 			<tr>
96 96
 				<th>
97 97
 					<label for="EED_Events_Archive_display_datetimes">
98
-						<?php _e('Display Datetimes', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_datetimes_info');?>
98
+						<?php _e('Display Datetimes', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_datetimes_info'); ?>
99 99
 					</label>
100 100
 				</th>
101 101
 				<td>
102
-					<?php echo EEH_Form_Fields::select( 'venue_details', $display_datetimes, $values, 'EED_Events_Archive_display_datetimes', 'EED_Events_Archive_display_datetimes' );?>
102
+					<?php echo EEH_Form_Fields::select('venue_details', $display_datetimes, $values, 'EED_Events_Archive_display_datetimes', 'EED_Events_Archive_display_datetimes'); ?>
103 103
 				</td>
104 104
 			</tr>
105 105
 
106 106
 			<tr>
107 107
 				<th>
108 108
 					<label for="EED_Events_Archive_display_venue">
109
-						<?php _e('Display Venue Details', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_venue_details_info');?>
109
+						<?php _e('Display Venue Details', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_venue_details_info'); ?>
110 110
 					</label>
111 111
 				</th>
112 112
 				<td>
113
-					<?php echo EEH_Form_Fields::select( 'display_venue', $display_venue, $values, 'EED_Events_Archive_display_venue', 'EED_Events_Archive_display_venue' );?>
113
+					<?php echo EEH_Form_Fields::select('display_venue', $display_venue, $values, 'EED_Events_Archive_display_venue', 'EED_Events_Archive_display_venue'); ?>
114 114
 				</td>
115 115
 			</tr>
116 116
 
117 117
 			<tr>
118 118
 				<th>
119 119
 					<label for="EED_Events_Archive_display_expired_events">
120
-						<?php _e('Display Expired Events', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_expired_events_info');?>
120
+						<?php _e('Display Expired Events', 'event_espresso'); ?> <?php echo EEH_Template::get_help_tab_link('display_expired_events_info'); ?>
121 121
 					</label>
122 122
 				</th>
123 123
 				<td>
124
-					<?php echo EEH_Form_Fields::select( 'expired_events', $display_expired_events, $values, 'EED_Events_Archive_display_expired_events', 'EED_Events_Archive_display_expired_events' );?>
124
+					<?php echo EEH_Form_Fields::select('expired_events', $display_expired_events, $values, 'EED_Events_Archive_display_expired_events', 'EED_Events_Archive_display_expired_events'); ?>
125 125
 				</td>
126 126
 			</tr>
127 127
 
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
 					</label>
133 133
 				</th>
134 134
 				<td>
135
-					<?php echo EEH_Form_Fields::select( 'use_sortable_display_order', $use_sortable_display_order, $values, 'EED_Events_Archive_use_sortable_display_order', 'EED_Events_Archive_use_sortable_display_order' );?>
135
+					<?php echo EEH_Form_Fields::select('use_sortable_display_order', $use_sortable_display_order, $values, 'EED_Events_Archive_use_sortable_display_order', 'EED_Events_Archive_use_sortable_display_order'); ?>
136 136
 					<p class="description ">
137 137
 						<?php
138 138
 						echo sprintf(
139
-							__( '%1$sPlease Note:%2$s%3$sIf you are currently using filters to customize the display order for elements within the Event Archive listings, then you do NOT activate this feature until those filters have been removed or disabled. If this feature is activated while still using such filters, duplicate event content such as the ticket selector, datetimes, or venue information could be displayed on the frontend of the site. Please verify that this is not the case after activating this feature.', 'event_espresso' ),
139
+							__('%1$sPlease Note:%2$s%3$sIf you are currently using filters to customize the display order for elements within the Event Archive listings, then you do NOT activate this feature until those filters have been removed or disabled. If this feature is activated while still using such filters, duplicate event content such as the ticket selector, datetimes, or venue information could be displayed on the frontend of the site. Please verify that this is not the case after activating this feature.', 'event_espresso'),
140 140
 							'<span class="important-notice">',
141 141
 							'</span>',
142 142
 							'<br />'
@@ -148,14 +148,14 @@  discard block
 block discarded – undo
148 148
 
149 149
 			<tr>
150 150
 				<th>
151
-					<?php _e( 'Display Order', 'event_espresso' ); ?><?php //echo EEH_Template::get_help_tab_link( 'event_archive_order_info' ); ?>
151
+					<?php _e('Display Order', 'event_espresso'); ?><?php //echo EEH_Template::get_help_tab_link( 'event_archive_order_info' ); ?>
152 152
 				</th>
153 153
 				<td>
154 154
 
155
-					<?php wp_nonce_field( 'espresso_update_event_archive_order', 'espresso_update_event_archive_order_nonce', false ); ?>
155
+					<?php wp_nonce_field('espresso_update_event_archive_order', 'espresso_update_event_archive_order_nonce', false); ?>
156 156
 					<?php echo $event_archive_display_order; ?>
157 157
 
158
-					<p class="description"><?php _e( 'Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the event archive page.', 'event_espresso' ); ?></p>
158
+					<p class="description"><?php _e('Drag and Drop the above to determine the display order of the Event Description, Date and Times, Ticket Selector, and Venue Information on the event archive page.', 'event_espresso'); ?></p>
159 159
 
160 160
 				</td>
161 161
 			</tr>
@@ -163,11 +163,11 @@  discard block
 block discarded – undo
163 163
 			<tr>
164 164
 				<th>
165 165
 					<label for="EED_Events_Archive_reset_event_list_settings">
166
-						<?php _e( 'Reset Event List Settings', 'event_espresso' ); ?>
166
+						<?php _e('Reset Event List Settings', 'event_espresso'); ?>
167 167
 					</label>
168 168
 				</th>
169 169
 				<td>
170
-					<?php echo EEH_Form_Fields::select( 'reset_event_list_settings', 0, $values, 'EED_Events_Archive_reset_event_list_settings', 'EED_Events_Archive_reset_event_list_settings' ); ?>
170
+					<?php echo EEH_Form_Fields::select('reset_event_list_settings', 0, $values, 'EED_Events_Archive_reset_event_list_settings', 'EED_Events_Archive_reset_event_list_settings'); ?>
171 171
 				</td>
172 172
 			</tr>
173 173
 
Please login to merge, or discard this patch.
4_6_0_stages/EE_DMS_4_6_0_invoice_settings.dmsstage.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 	 * Just initializes the status of the migration
28 28
 	 */
29 29
 	public function __construct() {
30
-		$this->_pretty_name = __( 'Update Invoice Settings', 'event_espresso' );
30
+		$this->_pretty_name = __('Update Invoice Settings', 'event_espresso');
31 31
 		parent::__construct();
32 32
 	}
33 33
 
@@ -54,13 +54,13 @@  discard block
 block discarded – undo
54 54
 	 * @throws EE_Error
55 55
 	 * @return int number of items ACTUALLY migrated
56 56
 	 */
57
-	protected function _migration_step( $num_items = 1 ){
57
+	protected function _migration_step($num_items = 1) {
58 58
 
59 59
 		$templates_relative_path = 'modules/gateways/Invoice/lib/templates/';
60
-		$overridden_invoice_body = EEH_Template::locate_template( $templates_relative_path . 'invoice_body.template.php', NULL, FALSE, FALSE, TRUE );
61
-		$overridden_receipt_body= EEH_Template::locate_template( $templates_relative_path . 'receipt_body.template.php', NULL, FALSE, FALSE, TRUE );
62
-		if( $overridden_invoice_body || $overridden_receipt_body ) {
63
-			EE_Error::add_persistent_admin_notice( 'invoice_overriding_templates', sprintf( __( 'Note: in this version of Event Espresso, PDF and HTML Invoices and Receipts are now Messages and can be changed just like any other messages; however we noticed you had previously overriden the old default Invoice/Receipt templates. Because of this, your old Invoice/Receipt templates will continue to be used INSTEAD of the new Invoice/Receipt message equivalents (but this will be removed in an upcoming version). We recommend deleting your old Invoice/Receipt templates and using the new messages system. Then modify the new Invoice and Receipt messages\'s content in Messages -> Invoice and Messages -> Receipt.')), TRUE );
60
+		$overridden_invoice_body = EEH_Template::locate_template($templates_relative_path.'invoice_body.template.php', NULL, FALSE, FALSE, TRUE);
61
+		$overridden_receipt_body = EEH_Template::locate_template($templates_relative_path.'receipt_body.template.php', NULL, FALSE, FALSE, TRUE);
62
+		if ($overridden_invoice_body || $overridden_receipt_body) {
63
+			EE_Error::add_persistent_admin_notice('invoice_overriding_templates', sprintf(__('Note: in this version of Event Espresso, PDF and HTML Invoices and Receipts are now Messages and can be changed just like any other messages; however we noticed you had previously overriden the old default Invoice/Receipt templates. Because of this, your old Invoice/Receipt templates will continue to be used INSTEAD of the new Invoice/Receipt message equivalents (but this will be removed in an upcoming version). We recommend deleting your old Invoice/Receipt templates and using the new messages system. Then modify the new Invoice and Receipt messages\'s content in Messages -> Invoice and Messages -> Receipt.')), TRUE);
64 64
 		}
65 65
 
66 66
 		//regardless of whether it worked or not, we ought to continue the migration
Please login to merge, or discard this patch.
libraries/form_sections/base/EE_Form_Section_HTML_From_Template.form.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if ( ! defined('EVENT_ESPRESSO_VERSION'))
4 4
 	exit('No direct script access allowed');
5 5
 
6 6
 /**
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
  *
26 26
  * ------------------------------------------------------------------------
27 27
  */
28
-class EE_Form_Section_HTML_From_Template extends EE_Form_Section_HTML{
29
-	public function __construct($template_file,$args = array(), $options_array = array()) {
30
-		$html = EEH_Template::locate_template( $template_file, $args );
28
+class EE_Form_Section_HTML_From_Template extends EE_Form_Section_HTML {
29
+	public function __construct($template_file, $args = array(), $options_array = array()) {
30
+		$html = EEH_Template::locate_template($template_file, $args);
31 31
 
32 32
 //		echo " filepath:$template_file html $html";
33 33
 		parent::__construct($html, $options_array);
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if (!defined('EVENT_ESPRESSO_VERSION'))
3
+if (!defined('EVENT_ESPRESSO_VERSION')) {
4 4
 	exit('No direct script access allowed');
5
+}
5 6
 
6 7
 /**
7 8
  * Event Espresso
Please login to merge, or discard this patch.