@@ -30,7 +30,7 @@ |
||
30 | 30 | * @return string |
31 | 31 | */ |
32 | 32 | protected function get_icon() { |
33 | - return plugins_url( 'images/sepa-sofort/icon-24x24.png', Plugin::$file ); |
|
33 | + return plugins_url('images/sepa-sofort/icon-24x24.png', Plugin::$file); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -30,7 +30,7 @@ |
||
30 | 30 | * @return string |
31 | 31 | */ |
32 | 32 | protected function get_icon() { |
33 | - return plugins_url( 'images/paypal/icon-32x32.png', Plugin::$file ); |
|
33 | + return plugins_url('images/paypal/icon-32x32.png', Plugin::$file); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -30,7 +30,7 @@ |
||
30 | 30 | * @return string |
31 | 31 | */ |
32 | 32 | protected function get_icon() { |
33 | - return plugins_url( 'images/sepa-ideal/icon-24x24.png', Plugin::$file ); |
|
33 | + return plugins_url('images/sepa-ideal/icon-24x24.png', Plugin::$file); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -30,7 +30,7 @@ |
||
30 | 30 | * @return string |
31 | 31 | */ |
32 | 32 | protected function get_icon() { |
33 | - return plugins_url( 'images/sepa-bancontact/icon-24x24.png', Plugin::$file ); |
|
33 | + return plugins_url('images/sepa-bancontact/icon-24x24.png', Plugin::$file); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -30,7 +30,7 @@ |
||
30 | 30 | * @return string |
31 | 31 | */ |
32 | 32 | protected function get_icon() { |
33 | - return plugins_url( 'images/ideal/icon-32x32.png', Plugin::$file ); |
|
33 | + return plugins_url('images/ideal/icon-32x32.png', Plugin::$file); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -28,11 +28,11 @@ |
||
28 | 28 | * |
29 | 29 | * @return bool Returns true if the transaction has the specified status, false otherwise. |
30 | 30 | */ |
31 | - public static function transaction_has_status( MeprTransaction $transaction, $status ) { |
|
32 | - if ( is_array( $status ) ) { |
|
33 | - return in_array( $transaction->status, $status, true ); |
|
31 | + public static function transaction_has_status(MeprTransaction $transaction, $status) { |
|
32 | + if (is_array($status)) { |
|
33 | + return in_array($transaction->status, $status, true); |
|
34 | 34 | } |
35 | 35 | |
36 | - return ( $transaction->status === $status ); |
|
36 | + return ($transaction->status === $status); |
|
37 | 37 | } |
38 | 38 | } |
@@ -49,12 +49,12 @@ discard block |
||
49 | 49 | * @param MeprTransaction $txn MemberPress transaction object. |
50 | 50 | * @see https://github.com/wp-premium/memberpress-basic/blob/1.3.18/app/models/MeprTransaction.php |
51 | 51 | */ |
52 | - public function __construct( MeprTransaction $txn ) { |
|
52 | + public function __construct(MeprTransaction $txn) { |
|
53 | 53 | parent::__construct(); |
54 | 54 | |
55 | 55 | $this->txn = $txn; |
56 | 56 | $this->member = $this->txn->user(); |
57 | - $this->recurring = ( $txn->subscription() && $txn->subscription()->txn_count > 1 ); |
|
57 | + $this->recurring = ($txn->subscription() && $txn->subscription()->txn_count > 1); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -107,12 +107,12 @@ discard block |
||
107 | 107 | $items = new Items(); |
108 | 108 | |
109 | 109 | $item = new Item(); |
110 | - $item->setNumber( $this->get_order_id() ); |
|
111 | - $item->setDescription( $this->get_description() ); |
|
112 | - $item->setPrice( $this->txn->total ); |
|
113 | - $item->setQuantity( 1 ); |
|
110 | + $item->setNumber($this->get_order_id()); |
|
111 | + $item->setDescription($this->get_description()); |
|
112 | + $item->setPrice($this->txn->total); |
|
113 | + $item->setQuantity(1); |
|
114 | 114 | |
115 | - $items->addItem( $item ); |
|
115 | + $items->addItem($item); |
|
116 | 116 | |
117 | 117 | return $items; |
118 | 118 | } |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | * @return string |
138 | 138 | */ |
139 | 139 | public function get_email() { |
140 | - if ( $this->member instanceof MeprUser ) { |
|
140 | + if ($this->member instanceof MeprUser) { |
|
141 | 141 | return $this->member->user_email; |
142 | 142 | } |
143 | 143 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * @return string |
150 | 150 | */ |
151 | 151 | public function get_first_name() { |
152 | - if ( $this->member instanceof MeprUser ) { |
|
152 | + if ($this->member instanceof MeprUser) { |
|
153 | 153 | return $this->member->first_name; |
154 | 154 | } |
155 | 155 | } |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | * @return string |
162 | 162 | */ |
163 | 163 | public function get_last_name() { |
164 | - if ( $this->member instanceof MeprUser ) { |
|
164 | + if ($this->member instanceof MeprUser) { |
|
165 | 165 | return $this->member->last_name; |
166 | 166 | } |
167 | 167 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | * @return string |
174 | 174 | */ |
175 | 175 | public function get_customer_name() { |
176 | - if ( $this->member instanceof MeprUser ) { |
|
176 | + if ($this->member instanceof MeprUser) { |
|
177 | 177 | return $this->member->get_full_name(); |
178 | 178 | } |
179 | 179 | } |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | $mepr_options = MeprOptions::fetch(); |
216 | 216 | |
217 | 217 | // @see https://gitlab.com/pronamic/memberpress/blob/1.2.4/app/models/MeprOptions.php#L768-782 |
218 | - return $mepr_options->thankyou_page_url( 'trans_num=' . $this->txn->id ); |
|
218 | + return $mepr_options->thankyou_page_url('trans_num=' . $this->txn->id); |
|
219 | 219 | } |
220 | 220 | |
221 | 221 | /** |
@@ -255,36 +255,36 @@ discard block |
||
255 | 255 | public function get_subscription() { |
256 | 256 | $product = $this->txn->product(); |
257 | 257 | |
258 | - if ( $product->is_one_time_payment() ) { |
|
258 | + if ($product->is_one_time_payment()) { |
|
259 | 259 | return false; |
260 | 260 | } |
261 | 261 | |
262 | 262 | $mp_subscription = $this->txn->subscription(); |
263 | 263 | |
264 | - if ( ! $mp_subscription ) { |
|
264 | + if ( ! $mp_subscription) { |
|
265 | 265 | return false; |
266 | 266 | } |
267 | 267 | |
268 | 268 | $frequency = ''; |
269 | 269 | |
270 | - if ( $mp_subscription->limit_cycles ) { |
|
270 | + if ($mp_subscription->limit_cycles) { |
|
271 | 271 | $frequency = $mp_subscription->limit_cycles; |
272 | 272 | } |
273 | 273 | |
274 | 274 | $subscription = new Subscription(); |
275 | 275 | $subscription->frequency = $frequency; |
276 | 276 | $subscription->interval = $product->period; |
277 | - $subscription->interval_period = Core_Util::to_period( $product->period_type ); |
|
277 | + $subscription->interval_period = Core_Util::to_period($product->period_type); |
|
278 | 278 | $subscription->description = sprintf( |
279 | 279 | 'Order #%s - %s', |
280 | 280 | $this->get_source_id(), |
281 | 281 | $this->get_description() |
282 | 282 | ); |
283 | 283 | |
284 | - $subscription->set_amount( new Money( |
|
284 | + $subscription->set_amount(new Money( |
|
285 | 285 | $this->txn->total, |
286 | 286 | $this->get_currency_alphabetic_code() |
287 | - ) ); |
|
287 | + )); |
|
288 | 288 | |
289 | 289 | return $subscription; |
290 | 290 | } |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | public function get_subscription_source_id() { |
299 | 299 | $subscription = $this->get_subscription(); |
300 | 300 | |
301 | - if ( ! $subscription ) { |
|
301 | + if ( ! $subscription) { |
|
302 | 302 | return false; |
303 | 303 | } |
304 | 304 |
@@ -8,4 +8,4 @@ |
||
8 | 8 | * @package Pronamic\WordPress\Pay\Extensions\MemberPress |
9 | 9 | */ |
10 | 10 | |
11 | -class_alias( 'Pronamic\WordPress\Pay\Extensions\MemberPress\SofortGateway', 'MeprSofortGateway' ); |
|
11 | +class_alias('Pronamic\WordPress\Pay\Extensions\MemberPress\SofortGateway', 'MeprSofortGateway'); |
@@ -8,4 +8,4 @@ |
||
8 | 8 | * @package Pronamic\WordPress\Pay\Extensions\MemberPress |
9 | 9 | */ |
10 | 10 | |
11 | -class_alias( 'Pronamic\WordPress\Pay\Extensions\MemberPress\CreditCardGateway', 'MeprCreditCardGateway' ); |
|
11 | +class_alias('Pronamic\WordPress\Pay\Extensions\MemberPress\CreditCardGateway', 'MeprCreditCardGateway'); |