@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | * @param null $timezone |
23 | 23 | * @return EE_Event_Message_Template|mixed |
24 | 24 | */ |
25 | - public static function new_instance( $props_n_values = array(), $timezone = NULL ) { |
|
26 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone ); |
|
27 | - return $has_object ? $has_object : new self( $props_n_values, FALSE, $timezone ); |
|
25 | + public static function new_instance($props_n_values = array(), $timezone = NULL) { |
|
26 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone); |
|
27 | + return $has_object ? $has_object : new self($props_n_values, FALSE, $timezone); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | * @param null $timezone |
35 | 35 | * @return EE_Event_Message_Template |
36 | 36 | */ |
37 | - public static function new_instance_from_db ( $props_n_values = array(), $timezone = NULL ) { |
|
38 | - return new self( $props_n_values, TRUE, $timezone ); |
|
37 | + public static function new_instance_from_db($props_n_values = array(), $timezone = NULL) { |
|
38 | + return new self($props_n_values, TRUE, $timezone); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | } |
@@ -1,4 +1,6 @@ |
||
1 | -<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
|
1 | +<?php if ( ! defined('EVENT_ESPRESSO_VERSION')) { |
|
2 | + exit('No direct script access allowed'); |
|
3 | +} |
|
2 | 4 | /** |
3 | 5 | * Event Espresso |
4 | 6 | * |
@@ -1,18 +1,18 @@ discard block |
||
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 | * Required by EEM_Event_Question_Group in case someone queries for all its model objects |
6 | 6 | */ |
7 | -class EE_Event_Question_Group extends EE_Base_Class{ |
|
7 | +class EE_Event_Question_Group extends EE_Base_Class { |
|
8 | 8 | |
9 | 9 | /** |
10 | 10 | * @param array $props_n_values |
11 | 11 | * @return EE_Event_Question_Group|mixed |
12 | 12 | */ |
13 | - public static function new_instance( $props_n_values = array() ) { |
|
14 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__ ); |
|
15 | - return $has_object ? $has_object : new self( $props_n_values); |
|
13 | + public static function new_instance($props_n_values = array()) { |
|
14 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__); |
|
15 | + return $has_object ? $has_object : new self($props_n_values); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | * @param array $props_n_values |
22 | 22 | * @return EE_Event_Question_Group |
23 | 23 | */ |
24 | - public static function new_instance_from_db ( $props_n_values = array() ) { |
|
25 | - return new self( $props_n_values, TRUE ); |
|
24 | + public static function new_instance_from_db($props_n_values = array()) { |
|
25 | + return new self($props_n_values, TRUE); |
|
26 | 26 | } |
27 | 27 | } |
28 | 28 | \ No newline at end of file |
@@ -2,15 +2,15 @@ discard block |
||
2 | 2 | /** |
3 | 3 | * Required by EEM_Event_Question_Group in case someone queries for all its model objects |
4 | 4 | */ |
5 | -class EE_Event_Venue extends EE_Base_Class{ |
|
5 | +class EE_Event_Venue extends EE_Base_Class { |
|
6 | 6 | |
7 | 7 | /** |
8 | 8 | * @param array $props_n_values |
9 | 9 | * @return EE_Event_Venue|mixed |
10 | 10 | */ |
11 | - public static function new_instance( $props_n_values = array() ) { |
|
12 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__ ); |
|
13 | - return $has_object ? $has_object : new self( $props_n_values); |
|
11 | + public static function new_instance($props_n_values = array()) { |
|
12 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__); |
|
13 | + return $has_object ? $has_object : new self($props_n_values); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | |
@@ -19,8 +19,8 @@ discard block |
||
19 | 19 | * @param array $props_n_values |
20 | 20 | * @return EE_Event_Venue |
21 | 21 | */ |
22 | - public static function new_instance_from_db ( $props_n_values = array() ) { |
|
23 | - return new self( $props_n_values, TRUE ); |
|
22 | + public static function new_instance_from_db($props_n_values = array()) { |
|
23 | + return new self($props_n_values, TRUE); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | } |
27 | 27 | \ No newline at end of file |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | EE_Error::doing_it_wrong('EE_Payment::gateway', __( 'The method EE_Payment::gateway() has been deprecated. Consider instead using EE_Payment::payment_method()->name()', 'event_espresso' ), '4.6.0' ); |
143 | 143 | if( $this->payment_method() ){ |
144 | 144 | return $this->payment_method()->name(); |
145 | - }else{ |
|
145 | + } else{ |
|
146 | 146 | return __( 'Unknown', 'event_espresso' ); |
147 | 147 | } |
148 | 148 | } |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | public function set_payment_made_via_admin( $via_admin = FALSE ) { |
195 | 195 | if($via_admin){ |
196 | 196 | $this->set('PAY_source', EEM_Payment_Method::scope_admin); |
197 | - }else{ |
|
197 | + } else{ |
|
198 | 198 | $this->set('PAY_source', EEM_Payment_Method::scope_cart); |
199 | 199 | } |
200 | 200 | |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | } |
619 | 619 | if( is_array( $item ) ){ |
620 | 620 | array_walk_recursive( $item, array( $this, '_strip_all_tags_within_array' ) ); |
621 | - }else{ |
|
621 | + } else{ |
|
622 | 622 | $item = wp_strip_all_tags( $item ); |
623 | 623 | } |
624 | 624 | } |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | $current_status = $this->status(); |
635 | 635 | if( $original_status !== EEM_Payment::status_id_approved && $current_status === EEM_Payment::status_id_approved ){ |
636 | 636 | return TRUE; |
637 | - }else{ |
|
637 | + } else{ |
|
638 | 638 | return FALSE; |
639 | 639 | } |
640 | 640 | } |
@@ -285,7 +285,7 @@ discard block |
||
285 | 285 | /** |
286 | 286 | * get Payment Amount |
287 | 287 | * @access public |
288 | - * @return float |
|
288 | + * @return boolean |
|
289 | 289 | */ |
290 | 290 | public function amount() { |
291 | 291 | return $this->get( 'PAY_amount' ); |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | |
364 | 364 | /** |
365 | 365 | * Gets redirect_url |
366 | - * @return string |
|
366 | + * @return boolean |
|
367 | 367 | */ |
368 | 368 | function redirect_url() { |
369 | 369 | return $this->get('PAY_redirect_url'); |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | |
374 | 374 | /** |
375 | 375 | * Gets redirect_args |
376 | - * @return array |
|
376 | + * @return boolean |
|
377 | 377 | */ |
378 | 378 | function redirect_args() { |
379 | 379 | return $this->get('PAY_redirect_args'); |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | /** |
511 | 511 | * Gets all the extra meta info on this payment |
512 | 512 | * @param array $query_params like EEM_Base::get_all |
513 | - * @return EE_Extra_Meta |
|
513 | + * @return EE_Base_Class[] |
|
514 | 514 | */ |
515 | 515 | public function extra_meta( $query_params = array() ) { |
516 | 516 | return $this->get_many_related( 'Extra_Meta', $query_params ); |
@@ -1,5 +1,5 @@ discard block |
||
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 |
@@ -22,16 +22,16 @@ discard block |
||
22 | 22 | * @subpackage includes/classes/EE_Payment.class.php |
23 | 23 | * @author Brent Christensen |
24 | 24 | */ |
25 | -class EE_Payment extends EE_Base_Class implements EEI_Payment{ |
|
25 | +class EE_Payment extends EE_Base_Class implements EEI_Payment { |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * |
29 | 29 | * @param array $props_n_values |
30 | 30 | * @return EE_Payment |
31 | 31 | */ |
32 | - public static function new_instance( $props_n_values = array() ) { |
|
33 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__ ); |
|
34 | - return $has_object ? $has_object : new self( $props_n_values ); |
|
32 | + public static function new_instance($props_n_values = array()) { |
|
33 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__); |
|
34 | + return $has_object ? $has_object : new self($props_n_values); |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | * @param null $timezone |
42 | 42 | * @return EE_Payment |
43 | 43 | */ |
44 | - public static function new_instance_from_db( $props_n_values = array(), $timezone = NULL ) { |
|
45 | - return new self( $props_n_values, TRUE, $timezone ); |
|
44 | + public static function new_instance_from_db($props_n_values = array(), $timezone = NULL) { |
|
45 | + return new self($props_n_values, TRUE, $timezone); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | * @access public |
54 | 54 | * @param int $TXN_ID |
55 | 55 | */ |
56 | - public function set_transaction_id( $TXN_ID = 0 ) { |
|
57 | - $this->set( 'TXN_ID', $TXN_ID ); |
|
56 | + public function set_transaction_id($TXN_ID = 0) { |
|
57 | + $this->set('TXN_ID', $TXN_ID); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | * @return EE_Transaction |
65 | 65 | */ |
66 | 66 | public function transaction() { |
67 | - return $this->get_first_related( 'Transaction' ); |
|
67 | + return $this->get_first_related('Transaction'); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | |
@@ -75,8 +75,8 @@ discard block |
||
75 | 75 | * @access public |
76 | 76 | * @param string $STS_ID |
77 | 77 | */ |
78 | - public function set_status( $STS_ID = '' ) { |
|
79 | - $this->set( 'STS_ID', $STS_ID ); |
|
78 | + public function set_status($STS_ID = '') { |
|
79 | + $this->set('STS_ID', $STS_ID); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | * @access public |
88 | 88 | * @param int $timestamp |
89 | 89 | */ |
90 | - public function set_timestamp( $timestamp = 0 ) { |
|
91 | - $this->set( 'PAY_timestamp', $timestamp ); |
|
90 | + public function set_timestamp($timestamp = 0) { |
|
91 | + $this->set('PAY_timestamp', $timestamp); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | |
@@ -99,8 +99,8 @@ discard block |
||
99 | 99 | * @access public |
100 | 100 | * @param string $PAY_source |
101 | 101 | */ |
102 | - public function set_source( $PAY_source = '' ) { |
|
103 | - $this->set('PAY_source',$PAY_source); |
|
102 | + public function set_source($PAY_source = '') { |
|
103 | + $this->set('PAY_source', $PAY_source); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | |
@@ -111,8 +111,8 @@ discard block |
||
111 | 111 | * @access public |
112 | 112 | * @param float $amount |
113 | 113 | */ |
114 | - public function set_amount( $amount = 0.00 ) { |
|
115 | - $this->set( 'PAY_amount', $amount ); |
|
114 | + public function set_amount($amount = 0.00) { |
|
115 | + $this->set('PAY_amount', $amount); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | |
@@ -123,8 +123,8 @@ discard block |
||
123 | 123 | * @access public |
124 | 124 | * @param string $gateway_response |
125 | 125 | */ |
126 | - public function set_gateway_response( $gateway_response = '' ) { |
|
127 | - $this->set( 'PAY_gateway_response', $gateway_response ); |
|
126 | + public function set_gateway_response($gateway_response = '') { |
|
127 | + $this->set('PAY_gateway_response', $gateway_response); |
|
128 | 128 | } |
129 | 129 | /** |
130 | 130 | * Returns the name of the paymetn method used on this payment (previously known merely as 'gateway') |
@@ -133,12 +133,12 @@ discard block |
||
133 | 133 | * @deprecated |
134 | 134 | * @return string |
135 | 135 | */ |
136 | - public function gateway(){ |
|
137 | - EE_Error::doing_it_wrong('EE_Payment::gateway', __( 'The method EE_Payment::gateway() has been deprecated. Consider instead using EE_Payment::payment_method()->name()', 'event_espresso' ), '4.6.0' ); |
|
138 | - if( $this->payment_method() ){ |
|
136 | + public function gateway() { |
|
137 | + EE_Error::doing_it_wrong('EE_Payment::gateway', __('The method EE_Payment::gateway() has been deprecated. Consider instead using EE_Payment::payment_method()->name()', 'event_espresso'), '4.6.0'); |
|
138 | + if ($this->payment_method()) { |
|
139 | 139 | return $this->payment_method()->name(); |
140 | - }else{ |
|
141 | - return __( 'Unknown', 'event_espresso' ); |
|
140 | + } else { |
|
141 | + return __('Unknown', 'event_espresso'); |
|
142 | 142 | } |
143 | 143 | } |
144 | 144 | |
@@ -150,8 +150,8 @@ discard block |
||
150 | 150 | * @access public |
151 | 151 | * @param string $txn_id_chq_nmbr |
152 | 152 | */ |
153 | - public function set_txn_id_chq_nmbr( $txn_id_chq_nmbr = '' ) { |
|
154 | - $this->set( 'PAY_txn_id_chq_nmbr', $txn_id_chq_nmbr ); |
|
153 | + public function set_txn_id_chq_nmbr($txn_id_chq_nmbr = '') { |
|
154 | + $this->set('PAY_txn_id_chq_nmbr', $txn_id_chq_nmbr); |
|
155 | 155 | } |
156 | 156 | |
157 | 157 | |
@@ -162,8 +162,8 @@ discard block |
||
162 | 162 | * @access public |
163 | 163 | * @param string $po_number |
164 | 164 | */ |
165 | - public function set_po_number( $po_number = '' ) { |
|
166 | - $this->set( 'PAY_po_number', $po_number ); |
|
165 | + public function set_po_number($po_number = '') { |
|
166 | + $this->set('PAY_po_number', $po_number); |
|
167 | 167 | } |
168 | 168 | |
169 | 169 | |
@@ -174,8 +174,8 @@ discard block |
||
174 | 174 | * @access public |
175 | 175 | * @param string $extra_accntng |
176 | 176 | */ |
177 | - public function set_extra_accntng( $extra_accntng = '' ) { |
|
178 | - $this->set( 'PAY_extra_accntng', $extra_accntng ); |
|
177 | + public function set_extra_accntng($extra_accntng = '') { |
|
178 | + $this->set('PAY_extra_accntng', $extra_accntng); |
|
179 | 179 | } |
180 | 180 | |
181 | 181 | |
@@ -186,10 +186,10 @@ discard block |
||
186 | 186 | * @access public |
187 | 187 | * @param bool $via_admin |
188 | 188 | */ |
189 | - public function set_payment_made_via_admin( $via_admin = FALSE ) { |
|
190 | - if($via_admin){ |
|
191 | - $this->set('PAY_source', EEM_Payment_Method::scope_admin); |
|
192 | - }else{ |
|
189 | + public function set_payment_made_via_admin($via_admin = FALSE) { |
|
190 | + if ($via_admin) { |
|
191 | + $this->set('PAY_source', EEM_Payment_Method::scope_admin); |
|
192 | + } else { |
|
193 | 193 | $this->set('PAY_source', EEM_Payment_Method::scope_cart); |
194 | 194 | } |
195 | 195 | |
@@ -203,13 +203,13 @@ discard block |
||
203 | 203 | * @access public |
204 | 204 | * @param string $details |
205 | 205 | */ |
206 | - public function set_details( $details = '' ) { |
|
207 | - if ( is_array( $details ) ) { |
|
208 | - array_walk_recursive( $details, array( $this, '_strip_all_tags_within_array' )); |
|
206 | + public function set_details($details = '') { |
|
207 | + if (is_array($details)) { |
|
208 | + array_walk_recursive($details, array($this, '_strip_all_tags_within_array')); |
|
209 | 209 | } else { |
210 | - $details = wp_strip_all_tags( $details ); |
|
210 | + $details = wp_strip_all_tags($details); |
|
211 | 211 | } |
212 | - $this->set( 'PAY_details', $details ); |
|
212 | + $this->set('PAY_details', $details); |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | /** |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | * @access public |
236 | 236 | */ |
237 | 237 | public function TXN_ID() { |
238 | - return $this->get( 'TXN_ID' ); |
|
238 | + return $this->get('TXN_ID'); |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | |
@@ -266,8 +266,8 @@ discard block |
||
266 | 266 | * @param null $date_or_time |
267 | 267 | * @return string |
268 | 268 | */ |
269 | - public function timestamp( $dt_frmt = '', $tm_frmt = '', $date_or_time = NULL ) { |
|
270 | - return $this->get_datetime('PAY_timestamp', $dt_frmt, $tm_frmt, $date_or_time ); |
|
269 | + public function timestamp($dt_frmt = '', $tm_frmt = '', $date_or_time = NULL) { |
|
270 | + return $this->get_datetime('PAY_timestamp', $dt_frmt, $tm_frmt, $date_or_time); |
|
271 | 271 | } |
272 | 272 | |
273 | 273 | |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | * @return float |
289 | 289 | */ |
290 | 290 | public function amount() { |
291 | - return $this->get( 'PAY_amount' ); |
|
291 | + return $this->get('PAY_amount'); |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | * @return mixed |
298 | 298 | */ |
299 | 299 | public function amount_no_code() { |
300 | - return $this->get_pretty( 'PAY_amount', 'no_currency_code' ); |
|
300 | + return $this->get_pretty('PAY_amount', 'no_currency_code'); |
|
301 | 301 | } |
302 | 302 | |
303 | 303 | |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | * @access public |
308 | 308 | */ |
309 | 309 | public function gateway_response() { |
310 | - return $this->get( 'PAY_gateway_response' ); |
|
310 | + return $this->get('PAY_gateway_response'); |
|
311 | 311 | } |
312 | 312 | |
313 | 313 | |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | * @access public |
318 | 318 | */ |
319 | 319 | public function txn_id_chq_nmbr() { |
320 | - return $this->get( 'PAY_txn_id_chq_nmbr' ); |
|
320 | + return $this->get('PAY_txn_id_chq_nmbr'); |
|
321 | 321 | } |
322 | 322 | |
323 | 323 | |
@@ -327,7 +327,7 @@ discard block |
||
327 | 327 | * @access public |
328 | 328 | */ |
329 | 329 | public function po_number() { |
330 | - return $this->get( 'PAY_po_number' ); |
|
330 | + return $this->get('PAY_po_number'); |
|
331 | 331 | } |
332 | 332 | |
333 | 333 | |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | * @access public |
338 | 338 | */ |
339 | 339 | public function extra_accntng() { |
340 | - return $this->get( 'PAY_extra_accntng' ); |
|
340 | + return $this->get('PAY_extra_accntng'); |
|
341 | 341 | } |
342 | 342 | |
343 | 343 | |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | * @access public |
358 | 358 | */ |
359 | 359 | public function details() { |
360 | - return $this->get( 'PAY_details' ); |
|
360 | + return $this->get('PAY_details'); |
|
361 | 361 | } |
362 | 362 | |
363 | 363 | |
@@ -386,8 +386,8 @@ discard block |
||
386 | 386 | * @param bool $show_icons |
387 | 387 | * @return void |
388 | 388 | */ |
389 | - public function e_pretty_status( $show_icons = FALSE ) { |
|
390 | - echo $this->pretty_status( $show_icons ); |
|
389 | + public function e_pretty_status($show_icons = FALSE) { |
|
390 | + echo $this->pretty_status($show_icons); |
|
391 | 391 | } |
392 | 392 | |
393 | 393 | |
@@ -397,10 +397,10 @@ discard block |
||
397 | 397 | * @param bool $show_icons |
398 | 398 | * @return string |
399 | 399 | */ |
400 | - public function pretty_status( $show_icons = FALSE ) { |
|
401 | - $status = EEM_Status::instance()->localized_status( array( $this->STS_ID() => __( 'unknown', 'event_espresso' ) ), FALSE, 'sentence' ); |
|
400 | + public function pretty_status($show_icons = FALSE) { |
|
401 | + $status = EEM_Status::instance()->localized_status(array($this->STS_ID() => __('unknown', 'event_espresso')), FALSE, 'sentence'); |
|
402 | 402 | $icon = ''; |
403 | - switch ( $this->STS_ID() ) { |
|
403 | + switch ($this->STS_ID()) { |
|
404 | 404 | case EEM_Payment::status_id_approved: |
405 | 405 | $icon = $show_icons ? '<span class="dashicons dashicons-yes ee-icon-size-24 green-text"></span>' : ''; |
406 | 406 | break; |
@@ -414,7 +414,7 @@ discard block |
||
414 | 414 | $icon = $show_icons ? '<span class="dashicons dashicons-no ee-icon-size-16 red-text"></span>' : ''; |
415 | 415 | break; |
416 | 416 | } |
417 | - return $icon . $status[ $this->STS_ID() ]; |
|
417 | + return $icon.$status[$this->STS_ID()]; |
|
418 | 418 | } |
419 | 419 | |
420 | 420 | |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | * @return boolean whether the payment is approved or not |
426 | 426 | */ |
427 | 427 | public function is_approved() { |
428 | - return $this->status_is( EEM_Payment::status_id_approved ); |
|
428 | + return $this->status_is(EEM_Payment::status_id_approved); |
|
429 | 429 | } |
430 | 430 | |
431 | 431 | |
@@ -437,8 +437,8 @@ discard block |
||
437 | 437 | * one of the status_id_* on the EEM_Payment model |
438 | 438 | * @return boolean whether the status of this payment equals the status id |
439 | 439 | */ |
440 | - protected function status_is( $STS_ID ) { |
|
441 | - if ( $STS_ID == $this->STS_ID() ) { |
|
440 | + protected function status_is($STS_ID) { |
|
441 | + if ($STS_ID == $this->STS_ID()) { |
|
442 | 442 | return TRUE; |
443 | 443 | } else { |
444 | 444 | return FALSE; |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | * @return boolean whether the payment is pending or not |
453 | 453 | */ |
454 | 454 | public function is_pending() { |
455 | - return $this->status_is( EEM_Payment::status_id_pending ); |
|
455 | + return $this->status_is(EEM_Payment::status_id_pending); |
|
456 | 456 | } |
457 | 457 | |
458 | 458 | |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | * @return boolean |
463 | 463 | */ |
464 | 464 | public function is_cancelled() { |
465 | - return $this->status_is( EEM_Payment::status_id_cancelled ); |
|
465 | + return $this->status_is(EEM_Payment::status_id_cancelled); |
|
466 | 466 | } |
467 | 467 | |
468 | 468 | |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | * @return boolean |
473 | 473 | */ |
474 | 474 | public function is_declined() { |
475 | - return $this->status_is( EEM_Payment::status_id_declined ); |
|
475 | + return $this->status_is(EEM_Payment::status_id_declined); |
|
476 | 476 | } |
477 | 477 | |
478 | 478 | |
@@ -482,7 +482,7 @@ discard block |
||
482 | 482 | * @return boolean |
483 | 483 | */ |
484 | 484 | public function is_failed() { |
485 | - return $this->status_is( EEM_Payment::status_id_failed ); |
|
485 | + return $this->status_is(EEM_Payment::status_id_failed); |
|
486 | 486 | } |
487 | 487 | |
488 | 488 | |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | * @return EE_Status |
503 | 503 | */ |
504 | 504 | public function status_obj() { |
505 | - return $this->get_first_related( 'Status' ); |
|
505 | + return $this->get_first_related('Status'); |
|
506 | 506 | } |
507 | 507 | |
508 | 508 | |
@@ -512,8 +512,8 @@ discard block |
||
512 | 512 | * @param array $query_params like EEM_Base::get_all |
513 | 513 | * @return EE_Extra_Meta |
514 | 514 | */ |
515 | - public function extra_meta( $query_params = array() ) { |
|
516 | - return $this->get_many_related( 'Extra_Meta', $query_params ); |
|
515 | + public function extra_meta($query_params = array()) { |
|
516 | + return $this->get_many_related('Extra_Meta', $query_params); |
|
517 | 517 | } |
518 | 518 | |
519 | 519 | |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | * offline ones, dont' create payments) |
525 | 525 | * @return EE_Payment_Method |
526 | 526 | */ |
527 | - function payment_method(){ |
|
527 | + function payment_method() { |
|
528 | 528 | return $this->get_first_related('Payment_Method'); |
529 | 529 | } |
530 | 530 | |
@@ -539,12 +539,12 @@ discard block |
||
539 | 539 | * @param string $inside_form_html |
540 | 540 | * @return string html |
541 | 541 | */ |
542 | - function redirect_form( $inside_form_html = NULL ) { |
|
542 | + function redirect_form($inside_form_html = NULL) { |
|
543 | 543 | $redirect_url = $this->redirect_url(); |
544 | - if ( ! empty( $redirect_url )) { |
|
544 | + if ( ! empty($redirect_url)) { |
|
545 | 545 | EE_Registry::instance()->load_helper('HTML'); |
546 | 546 | // what ? no inner form content? |
547 | - if( $inside_form_html === NULL ) { |
|
547 | + if ($inside_form_html === NULL) { |
|
548 | 548 | $inside_form_html = EEH_HTML::p( |
549 | 549 | sprintf( |
550 | 550 | __('If you are not automatically redirected to the payment website within 10 seconds... %1$s %2$s Click Here %3$s', 'event_espresso'), |
@@ -556,10 +556,10 @@ discard block |
||
556 | 556 | ); |
557 | 557 | } |
558 | 558 | $method = $this->redirect_args() ? 'POST' : 'GET'; |
559 | - $form = EEH_HTML::nl(1) . '<form method="' . $method . '" name="gateway_form" action="' . $redirect_url . '">'; |
|
560 | - $form .= EEH_HTML::nl(1) . $this->redirect_args_as_inputs(); |
|
559 | + $form = EEH_HTML::nl(1).'<form method="'.$method.'" name="gateway_form" action="'.$redirect_url.'">'; |
|
560 | + $form .= EEH_HTML::nl(1).$this->redirect_args_as_inputs(); |
|
561 | 561 | $form .= $inside_form_html; |
562 | - $form .= EEH_HTML::nl(-1) . '</form>' . EEH_HTML::nl(-1); |
|
562 | + $form .= EEH_HTML::nl(-1).'</form>'.EEH_HTML::nl(-1); |
|
563 | 563 | return $form; |
564 | 564 | } else { |
565 | 565 | return NULL; |
@@ -573,12 +573,12 @@ discard block |
||
573 | 573 | * Changes all the name-value pairs of |
574 | 574 | * @return string |
575 | 575 | */ |
576 | - function redirect_args_as_inputs(){ |
|
576 | + function redirect_args_as_inputs() { |
|
577 | 577 | $html = ''; |
578 | - if( $this->redirect_args() !== NULL && is_array( $this->redirect_args() )) { |
|
578 | + if ($this->redirect_args() !== NULL && is_array($this->redirect_args())) { |
|
579 | 579 | EE_Registry::instance()->load_helper('HTML'); |
580 | - foreach($this->redirect_args() as $name => $value){ |
|
581 | - $html .= EEH_HTML::nl(0) . '<input type="hidden" name="' . $name . '" value="' . esc_attr( $value ) . '"/>'; |
|
580 | + foreach ($this->redirect_args() as $name => $value) { |
|
581 | + $html .= EEH_HTML::nl(0).'<input type="hidden" name="'.$name.'" value="'.esc_attr($value).'"/>'; |
|
582 | 582 | } |
583 | 583 | } |
584 | 584 | return $html; |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | * object itself) |
594 | 594 | * @return string for the currency code |
595 | 595 | */ |
596 | - public function currency_code(){ |
|
596 | + public function currency_code() { |
|
597 | 597 | return EE_Config::instance()->currency->code; |
598 | 598 | } |
599 | 599 | |
@@ -607,14 +607,14 @@ discard block |
||
607 | 607 | * @access private |
608 | 608 | * @param mixed $item |
609 | 609 | */ |
610 | - private function _strip_all_tags_within_array( &$item ) { |
|
611 | - if( is_object( $item ) ) { |
|
610 | + private function _strip_all_tags_within_array(&$item) { |
|
611 | + if (is_object($item)) { |
|
612 | 612 | $item = (array) $item; |
613 | 613 | } |
614 | - if( is_array( $item ) ){ |
|
615 | - array_walk_recursive( $item, array( $this, '_strip_all_tags_within_array' ) ); |
|
616 | - }else{ |
|
617 | - $item = wp_strip_all_tags( $item ); |
|
614 | + if (is_array($item)) { |
|
615 | + array_walk_recursive($item, array($this, '_strip_all_tags_within_array')); |
|
616 | + } else { |
|
617 | + $item = wp_strip_all_tags($item); |
|
618 | 618 | } |
619 | 619 | } |
620 | 620 | |
@@ -623,13 +623,13 @@ discard block |
||
623 | 623 | * is approved and was created during this request). False otherwise. |
624 | 624 | * @return boolean |
625 | 625 | */ |
626 | - public function just_approved(){ |
|
627 | - EE_Registry::instance()->load_helper( 'Array' ); |
|
628 | - $original_status =EEH_Array::is_set( $this->_props_n_values_provided_in_constructor, 'STS_ID', $this->get_model()->field_settings_for( 'STS_ID' )->get_default_value() ); |
|
626 | + public function just_approved() { |
|
627 | + EE_Registry::instance()->load_helper('Array'); |
|
628 | + $original_status = EEH_Array::is_set($this->_props_n_values_provided_in_constructor, 'STS_ID', $this->get_model()->field_settings_for('STS_ID')->get_default_value()); |
|
629 | 629 | $current_status = $this->status(); |
630 | - if( $original_status !== EEM_Payment::status_id_approved && $current_status === EEM_Payment::status_id_approved ){ |
|
630 | + if ($original_status !== EEM_Payment::status_id_approved && $current_status === EEM_Payment::status_id_approved) { |
|
631 | 631 | return TRUE; |
632 | - }else{ |
|
632 | + } else { |
|
633 | 633 | return FALSE; |
634 | 634 | } |
635 | 635 | } |
@@ -641,11 +641,11 @@ discard block |
||
641 | 641 | * @param string $extra_cache_ref This allows the user to specify an extra cache ref for the given property (in cases where the same property may be used for different outputs - i.e. datetime, money etc.) |
642 | 642 | * @return mixed |
643 | 643 | */ |
644 | - public function get_pretty($field_name, $extra_cache_ref = NULL){ |
|
645 | - if( $field_name == 'PAY_gateway' ){ |
|
644 | + public function get_pretty($field_name, $extra_cache_ref = NULL) { |
|
645 | + if ($field_name == 'PAY_gateway') { |
|
646 | 646 | return $this->gateway(); |
647 | 647 | } |
648 | - return $this->_get_cached_property( $field_name, TRUE, $extra_cache_ref ); |
|
648 | + return $this->_get_cached_property($field_name, TRUE, $extra_cache_ref); |
|
649 | 649 | } |
650 | 650 | } |
651 | 651 |
@@ -99,11 +99,11 @@ discard block |
||
99 | 99 | |
100 | 100 | |
101 | 101 | /** |
102 | - * Set Payment Method |
|
103 | - * |
|
104 | - * @access public |
|
105 | - * @param string $PAY_source |
|
106 | - */ |
|
102 | + * Set Payment Method |
|
103 | + * |
|
104 | + * @access public |
|
105 | + * @param string $PAY_source |
|
106 | + */ |
|
107 | 107 | public function set_source( $PAY_source = '' ) { |
108 | 108 | $this->set('PAY_source',$PAY_source); |
109 | 109 | } |
@@ -246,16 +246,16 @@ discard block |
||
246 | 246 | |
247 | 247 | |
248 | 248 | /** |
249 | - * get Payment Status |
|
250 | - * @access public |
|
251 | - */ |
|
249 | + * get Payment Status |
|
250 | + * @access public |
|
251 | + */ |
|
252 | 252 | public function status() { |
253 | 253 | return $this->get('STS_ID'); |
254 | 254 | } |
255 | 255 | /** |
256 | - * get Payment Status |
|
257 | - * @access public |
|
258 | - */ |
|
256 | + * get Payment Status |
|
257 | + * @access public |
|
258 | + */ |
|
259 | 259 | public function STS_ID() { |
260 | 260 | return $this->get('STS_ID'); |
261 | 261 | } |
@@ -278,9 +278,9 @@ discard block |
||
278 | 278 | |
279 | 279 | |
280 | 280 | /** |
281 | - * get Payment Source |
|
282 | - * @access public |
|
283 | - */ |
|
281 | + * get Payment Source |
|
282 | + * @access public |
|
283 | + */ |
|
284 | 284 | public function source() { |
285 | 285 | return $this->get('PAY_source'); |
286 | 286 | } |
@@ -348,9 +348,9 @@ discard block |
||
348 | 348 | |
349 | 349 | |
350 | 350 | /** |
351 | - * get Payment made via admin source |
|
352 | - * @access public |
|
353 | - */ |
|
351 | + * get Payment made via admin source |
|
352 | + * @access public |
|
353 | + */ |
|
354 | 354 | public function payment_made_via_admin() { |
355 | 355 | return ($this->get('PAY_source') == EEM_Payment_Method::scope_admin); |
356 | 356 | } |
@@ -2,15 +2,15 @@ discard block |
||
2 | 2 | /** |
3 | 3 | * Required by EEM_Question_Group_Question in case someone queries for all its model objects |
4 | 4 | */ |
5 | -class EE_Question_Group_Question extends EE_Base_Class{ |
|
5 | +class EE_Question_Group_Question extends EE_Base_Class { |
|
6 | 6 | |
7 | 7 | /** |
8 | 8 | * @param array $props_n_values |
9 | 9 | * @return EE_Question_Group_Question|mixed |
10 | 10 | */ |
11 | - public static function new_instance( $props_n_values = array() ) { |
|
12 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__ ); |
|
13 | - return $has_object ? $has_object : new self( $props_n_values ); |
|
11 | + public static function new_instance($props_n_values = array()) { |
|
12 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__); |
|
13 | + return $has_object ? $has_object : new self($props_n_values); |
|
14 | 14 | } |
15 | 15 | |
16 | 16 | |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @param array $props_n_values |
20 | 20 | * @return EE_Question_Group_Question |
21 | 21 | */ |
22 | - public static function new_instance_from_db ( $props_n_values = array() ) { |
|
23 | - return new self( $props_n_values, TRUE ); |
|
22 | + public static function new_instance_from_db($props_n_values = array()) { |
|
23 | + return new self($props_n_values, TRUE); |
|
24 | 24 | } |
25 | 25 | } |
26 | 26 | \ No newline at end of file |
@@ -1,5 +1,5 @@ discard block |
||
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 |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | * @return boolean success |
34 | 34 | */ |
35 | 35 | public function delete() { |
36 | - return $this->delete_or_restore( TRUE ); |
|
36 | + return $this->delete_or_restore(TRUE); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | * @return boolean success |
44 | 44 | */ |
45 | 45 | public function delete_permanently() { |
46 | - return $this->get_model()->delete_permanently_by_ID( $this->ID() ); |
|
46 | + return $this->get_model()->delete_permanently_by_ID($this->ID()); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | |
@@ -53,9 +53,9 @@ discard block |
||
53 | 53 | * @param bool $delete true=>delete, false=>restore |
54 | 54 | * @return bool |
55 | 55 | */ |
56 | - public function delete_or_restore( $delete = TRUE ) { |
|
56 | + public function delete_or_restore($delete = TRUE) { |
|
57 | 57 | $model = $this->get_model(); |
58 | - return $model->delete_or_restore_by_ID( $delete, $this->ID() ); |
|
58 | + return $model->delete_or_restore_by_ID($delete, $this->ID()); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | |
@@ -65,6 +65,6 @@ discard block |
||
65 | 65 | * @return boolean |
66 | 66 | */ |
67 | 67 | public function restore() { |
68 | - return $this->delete_or_restore( FALSE ); |
|
68 | + return $this->delete_or_restore(FALSE); |
|
69 | 69 | } |
70 | 70 | } |
71 | 71 | \ No newline at end of file |
@@ -36,8 +36,9 @@ |
||
36 | 36 | $tax = 0; |
37 | 37 | $total_tax = 0; |
38 | 38 | //This first checks to see if the given ticket is taxable. |
39 | - if ( ! $ticket->get( 'TKT_taxable' ) ) |
|
40 | - return $tax; |
|
39 | + if ( ! $ticket->get( 'TKT_taxable' ) ) { |
|
40 | + return $tax; |
|
41 | + } |
|
41 | 42 | //get subtotal (notice we're only retrieving a subtotal if there isn't one given) |
42 | 43 | $subtotal = self::get_subtotal_for_admin( $ticket ); |
43 | 44 | //get taxes |
@@ -1,5 +1,5 @@ discard block |
||
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 | * Taxes class |
@@ -32,20 +32,20 @@ discard block |
||
32 | 32 | * @param EE_Ticket $ticket incoming EE_Ticket |
33 | 33 | * @return float total taxes to apply to ticket. |
34 | 34 | */ |
35 | - public static function get_total_taxes_for_admin( EE_Ticket $ticket ) { |
|
35 | + public static function get_total_taxes_for_admin(EE_Ticket $ticket) { |
|
36 | 36 | $tax = 0; |
37 | 37 | $total_tax = 0; |
38 | 38 | //This first checks to see if the given ticket is taxable. |
39 | - if ( ! $ticket->get( 'TKT_taxable' ) ) |
|
39 | + if ( ! $ticket->get('TKT_taxable')) |
|
40 | 40 | return $tax; |
41 | 41 | //get subtotal (notice we're only retrieving a subtotal if there isn't one given) |
42 | - $subtotal = self::get_subtotal_for_admin( $ticket ); |
|
42 | + $subtotal = self::get_subtotal_for_admin($ticket); |
|
43 | 43 | //get taxes |
44 | 44 | $taxes = self::get_taxes_for_admin(); |
45 | 45 | //apply taxes to subtotal |
46 | - foreach ( $taxes as $tax ) { |
|
46 | + foreach ($taxes as $tax) { |
|
47 | 47 | //assuming taxes are not cumulative |
48 | - $total_tax += $subtotal * $tax->get( 'PRC_amount' ) / 100; |
|
48 | + $total_tax += $subtotal * $tax->get('PRC_amount') / 100; |
|
49 | 49 | } |
50 | 50 | return $total_tax; |
51 | 51 | } |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | * @param EE_Ticket $ticket |
57 | 57 | * @return float |
58 | 58 | */ |
59 | - public static function get_subtotal_for_admin( EE_Ticket $ticket ) { |
|
59 | + public static function get_subtotal_for_admin(EE_Ticket $ticket) { |
|
60 | 60 | $TKT_ID = $ticket->ID(); |
61 | - return isset( self::$_subtotal[ $TKT_ID ] ) ? self::$_subtotal[ $TKT_ID ] : self::_get_subtotal_for_admin( $ticket ); |
|
61 | + return isset(self::$_subtotal[$TKT_ID]) ? self::$_subtotal[$TKT_ID] : self::_get_subtotal_for_admin($ticket); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | |
@@ -68,26 +68,26 @@ discard block |
||
68 | 68 | * @param EE_Ticket $ticket |
69 | 69 | * @return float subtotal calculated from all EE_Price[] on Ticket. |
70 | 70 | */ |
71 | - private static function _get_subtotal_for_admin( EE_Ticket $ticket ) { |
|
71 | + private static function _get_subtotal_for_admin(EE_Ticket $ticket) { |
|
72 | 72 | $subtotal = 0; |
73 | 73 | //get all prices |
74 | - $prices = $ticket->get_many_related( 'Price', array( 'default_where_conditions' => 'none', 'order_by' => array( 'PRC_order' => 'ASC' ) ) ); |
|
74 | + $prices = $ticket->get_many_related('Price', array('default_where_conditions' => 'none', 'order_by' => array('PRC_order' => 'ASC'))); |
|
75 | 75 | //let's loop through them (base price is always the first item) |
76 | - foreach ( $prices as $price ) { |
|
77 | - if ( $price instanceof EE_Price ) { |
|
78 | - switch ( $price->type_obj()->base_type() ) { |
|
76 | + foreach ($prices as $price) { |
|
77 | + if ($price instanceof EE_Price) { |
|
78 | + switch ($price->type_obj()->base_type()) { |
|
79 | 79 | case 1: // base price |
80 | 80 | case 3: // surcharges |
81 | - $subtotal += $price->is_percent() ? $subtotal * $price->get( 'PRC_amount' ) / 100 : $price->get( 'PRC_amount' ); |
|
81 | + $subtotal += $price->is_percent() ? $subtotal * $price->get('PRC_amount') / 100 : $price->get('PRC_amount'); |
|
82 | 82 | break; |
83 | 83 | case 2: // discounts |
84 | - $subtotal -= $price->is_percent() ? $subtotal * $price->get( 'PRC_amount' ) / 100 : $price->get( 'PRC_amount' ); |
|
84 | + $subtotal -= $price->is_percent() ? $subtotal * $price->get('PRC_amount') / 100 : $price->get('PRC_amount'); |
|
85 | 85 | break; |
86 | 86 | } |
87 | 87 | } |
88 | 88 | } |
89 | 89 | $TKT_ID = $ticket->ID(); |
90 | - self::$_subtotal = array( $TKT_ID => $subtotal ); |
|
90 | + self::$_subtotal = array($TKT_ID => $subtotal); |
|
91 | 91 | return $subtotal; |
92 | 92 | } |
93 | 93 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * @return EE_Price[] EE_Price objects that have PRT_ID == 4 |
99 | 99 | */ |
100 | 100 | public static function get_taxes_for_admin() { |
101 | - self::$_default_taxes = ! empty( self::$_default_taxes ) ? self::$_default_taxes : EE_Registry::instance()->load_model( 'Price' )->get_all( array( array( 'Price_Type.PBT_ID' => 4 ) ) ); |
|
101 | + self::$_default_taxes = ! empty(self::$_default_taxes) ? self::$_default_taxes : EE_Registry::instance()->load_model('Price')->get_all(array(array('Price_Type.PBT_ID' => 4))); |
|
102 | 102 | return self::$_default_taxes; |
103 | 103 | } |
104 | 104 |
@@ -1,5 +1,5 @@ discard block |
||
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 |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | * @param array $props_n_values |
31 | 31 | * @return EE_Term_Relationship |
32 | 32 | */ |
33 | - public static function new_instance( $props_n_values = array() ) { |
|
34 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__ ); |
|
35 | - return $has_object ? $has_object : new self( $props_n_values ); |
|
33 | + public static function new_instance($props_n_values = array()) { |
|
34 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__); |
|
35 | + return $has_object ? $has_object : new self($props_n_values); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | * @param array $props_n_values |
42 | 42 | * @return EE_Term_Relationship |
43 | 43 | */ |
44 | - public static function new_instance_from_db( $props_n_values = array() ) { |
|
45 | - return new self( $props_n_values, TRUE ); |
|
44 | + public static function new_instance_from_db($props_n_values = array()) { |
|
45 | + return new self($props_n_values, TRUE); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 |
@@ -1,5 +1,5 @@ discard block |
||
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 |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | * @param string $timezone |
36 | 36 | * @return EE_Ticket_Template|mixed |
37 | 37 | */ |
38 | - public static function new_instance( $props_n_values = array(), $timezone = '' ) { |
|
39 | - $has_object = parent::_check_for_object( $props_n_values, __CLASS__, $timezone ); |
|
40 | - return $has_object ? $has_object : new self( $props_n_values, FALSE, $timezone ); |
|
38 | + public static function new_instance($props_n_values = array(), $timezone = '') { |
|
39 | + $has_object = parent::_check_for_object($props_n_values, __CLASS__, $timezone); |
|
40 | + return $has_object ? $has_object : new self($props_n_values, FALSE, $timezone); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | * @param string $timezone |
48 | 48 | * @return EE_Ticket_Template |
49 | 49 | */ |
50 | - public static function new_instance_from_db( $props_n_values = array(), $timezone = '' ) { |
|
51 | - return new self( $props_n_values, TRUE, $timezone ); |
|
50 | + public static function new_instance_from_db($props_n_values = array(), $timezone = '') { |
|
51 | + return new self($props_n_values, TRUE, $timezone); |
|
52 | 52 | } |
53 | 53 | |
54 | 54 |