@@ -76,6 +76,6 @@ |
||
76 | 76 | ), admin_url( 'edit.php' ) |
77 | 77 | ); |
78 | 78 | |
79 | - include \Pronamic\WordPress\Pay\Plugin::$dirname . '/admin/widget-payments-status-list.php'; |
|
79 | + include \Pronamic\WordPress\Pay\Plugin::$dirname.'/admin/widget-payments-status-list.php'; |
|
80 | 80 | } |
81 | 81 | } |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | * @param array $args Arguments. |
168 | 168 | */ |
169 | 169 | public function settings_section( $args ) { |
170 | - switch ( $args['id'] ) { |
|
170 | + switch ( $args[ 'id' ] ) { |
|
171 | 171 | case 'pronamic_pay_pages': |
172 | 172 | echo '<p>'; |
173 | 173 | esc_html_e( 'The page an user will get redirected to after payment, based on the payment status.', 'pronamic_ideal' ); |
@@ -180,12 +180,12 @@ discard block |
||
180 | 180 | |
181 | 181 | $option = get_option( $option_name ); |
182 | 182 | |
183 | - if ( ! empty( $option ) ) { |
|
183 | + if ( !empty( $option ) ) { |
|
184 | 184 | $hide_button = true; |
185 | 185 | } |
186 | 186 | } |
187 | 187 | |
188 | - if ( ! isset( $hide_button ) ) { |
|
188 | + if ( !isset( $hide_button ) ) { |
|
189 | 189 | submit_button( |
190 | 190 | __( 'Set default pages', 'pronamic_ideal' ), |
191 | 191 | '', |
@@ -212,14 +212,14 @@ discard block |
||
212 | 212 | |
213 | 213 | $args = wp_parse_args( $args, $defaults ); |
214 | 214 | |
215 | - $name = $args['label_for']; |
|
215 | + $name = $args[ 'label_for' ]; |
|
216 | 216 | $value = get_option( $name ); |
217 | 217 | |
218 | 218 | $atts = array( |
219 | 219 | 'name' => $name, |
220 | 220 | 'id' => $name, |
221 | - 'type' => $args['type'], |
|
222 | - 'class' => $args['classes'], |
|
221 | + 'type' => $args[ 'type' ], |
|
222 | + 'class' => $args[ 'classes' ], |
|
223 | 223 | 'value' => $value, |
224 | 224 | ); |
225 | 225 | |
@@ -230,10 +230,10 @@ discard block |
||
230 | 230 | // @codingStandardsIgnoreEn |
231 | 231 | ); |
232 | 232 | |
233 | - if ( ! empty( $args['description'] ) ) { |
|
233 | + if ( !empty( $args[ 'description' ] ) ) { |
|
234 | 234 | printf( |
235 | 235 | '<p class="description">%s</p>', |
236 | - esc_html( $args['description'] ) |
|
236 | + esc_html( $args[ 'description' ] ) |
|
237 | 237 | ); |
238 | 238 | } |
239 | 239 | } |
@@ -246,10 +246,10 @@ discard block |
||
246 | 246 | * @param array $args Arguments. |
247 | 247 | */ |
248 | 248 | public function input_checkbox( $args ) { |
249 | - $id = $args['label_for']; |
|
250 | - $name = $args['label_for']; |
|
249 | + $id = $args[ 'label_for' ]; |
|
250 | + $name = $args[ 'label_for' ]; |
|
251 | 251 | $value = get_option( $name ); |
252 | - $legend = $args['legend']; |
|
252 | + $legend = $args[ 'legend' ]; |
|
253 | 253 | |
254 | 254 | echo '<fieldset>'; |
255 | 255 | |
@@ -270,7 +270,7 @@ discard block |
||
270 | 270 | checked( $value, 1, false ) |
271 | 271 | ); |
272 | 272 | |
273 | - echo esc_html( $args['description'] ); |
|
273 | + echo esc_html( $args[ 'description' ] ); |
|
274 | 274 | |
275 | 275 | echo '</label>'; |
276 | 276 | |
@@ -300,13 +300,13 @@ discard block |
||
300 | 300 | * @param array $args Arguments. |
301 | 301 | */ |
302 | 302 | public function input_page( $args ) { |
303 | - $name = $args['label_for']; |
|
303 | + $name = $args[ 'label_for' ]; |
|
304 | 304 | |
305 | 305 | wp_dropdown_pages( array( |
306 | 306 | 'name' => esc_attr( $name ), |
307 | - 'post_type' => esc_attr( isset( $args['post_type'] ) ? $args['post_type'] : 'page' ), |
|
307 | + 'post_type' => esc_attr( isset( $args[ 'post_type' ] ) ? $args[ 'post_type' ] : 'page' ), |
|
308 | 308 | 'selected' => esc_attr( get_option( $name, '' ) ), |
309 | - 'show_option_none' => esc_attr( isset( $args['show_option_none'] ) ? $args['show_option_none'] : __( '— Select a page —', 'pronamic_ideal' ) ), |
|
309 | + 'show_option_none' => esc_attr( isset( $args[ 'show_option_none' ] ) ? $args[ 'show_option_none' ] : __( '— Select a page —', 'pronamic_ideal' ) ), |
|
310 | 310 | 'class' => 'regular-text', |
311 | 311 | ) ); |
312 | 312 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | add_action( 'init', array( $this, 'register_gateway_post_type' ), 0 ); // Highest priority. |
41 | 41 | |
42 | - add_action( 'save_post_' . self::POST_TYPE, array( $this, 'maybe_set_default_gateway' ) ); |
|
42 | + add_action( 'save_post_'.self::POST_TYPE, array( $this, 'maybe_set_default_gateway' ) ); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | // Don't set the default gateway if there is already a published gateway set. |
103 | 103 | $config_id = get_option( 'pronamic_pay_config_id' ); |
104 | 104 | |
105 | - if ( ! empty( $config_id ) && 'publish' === get_post_status( $config_id ) ) { |
|
105 | + if ( !empty( $config_id ) && 'publish' === get_post_status( $config_id ) ) { |
|
106 | 106 | return; |
107 | 107 | } |
108 | 108 |
@@ -16,7 +16,7 @@ |
||
16 | 16 | |
17 | 17 | wp_register_style( |
18 | 18 | 'pronamic-pay-redirect', |
19 | - plugins_url( 'css/redirect' . $min . '.css', Plugin::$file ), |
|
19 | + plugins_url( 'css/redirect'.$min.'.css', Plugin::$file ), |
|
20 | 20 | array(), |
21 | 21 | $pronamic_ideal->get_version() |
22 | 22 | ); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$data = file_get_contents( __DIR__ . '/../providers.json' ); |
|
3 | +$data = file_get_contents( __DIR__.'/../providers.json' ); |
|
4 | 4 | $data = json_decode( $data ); |
5 | 5 | |
6 | 6 | $providers = array(); |
@@ -8,14 +8,14 @@ discard block |
||
8 | 8 | $providers[ $provider->slug ] = $provider; |
9 | 9 | } |
10 | 10 | |
11 | -$data = file_get_contents( __DIR__ . '/../gateways.json' ); |
|
11 | +$data = file_get_contents( __DIR__.'/../gateways.json' ); |
|
12 | 12 | $gateways = json_decode( $data ); |
13 | 13 | |
14 | 14 | foreach ( $gateways as $gateway ) { |
15 | 15 | if ( isset( $providers[ $gateway->provider ] ) ) { |
16 | 16 | $provider = $providers[ $gateway->provider ]; |
17 | 17 | |
18 | - if ( ! isset( $provider->gateways ) ) { |
|
18 | + if ( !isset( $provider->gateways ) ) { |
|
19 | 19 | $provider->gateways = array(); |
20 | 20 | } |
21 | 21 |
@@ -8,7 +8,7 @@ |
||
8 | 8 | * @package Pronamic\WordPress\Pay |
9 | 9 | */ |
10 | 10 | |
11 | -if ( ! defined( 'WPINC' ) ) { |
|
11 | +if ( !defined( 'WPINC' ) ) { |
|
12 | 12 | die; |
13 | 13 | } |
14 | 14 |
@@ -25,7 +25,7 @@ |
||
25 | 25 | public function test_construct() { |
26 | 26 | $credit_card = new CreditCard(); |
27 | 27 | |
28 | - $this->assertInstanceOf( __NAMESPACE__ . '\CreditCard', $credit_card ); |
|
28 | + $this->assertInstanceOf( __NAMESPACE__.'\CreditCard', $credit_card ); |
|
29 | 29 | } |
30 | 30 | |
31 | 31 | /** |
@@ -36,7 +36,7 @@ |
||
36 | 36 | * @return string |
37 | 37 | */ |
38 | 38 | private function get_meta_key( $key ) { |
39 | - return $this->meta_key_prefix . $key; |
|
39 | + return $this->meta_key_prefix.$key; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | * @throws \Exception Throws an Exception when the `interval_spec` cannot be parsed as an interval. |
381 | 381 | */ |
382 | 382 | public function get_date_interval() { |
383 | - $interval_spec = 'P' . $this->interval . $this->interval_period; |
|
383 | + $interval_spec = 'P'.$this->interval.$this->interval_period; |
|
384 | 384 | |
385 | 385 | $interval = new DateInterval( $interval_spec ); |
386 | 386 | |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | * @return string |
510 | 510 | */ |
511 | 511 | public function get_meta( $key ) { |
512 | - $key = '_pronamic_subscription_' . $key; |
|
512 | + $key = '_pronamic_subscription_'.$key; |
|
513 | 513 | |
514 | 514 | return get_post_meta( $this->id, $key, true ); |
515 | 515 | } |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | * @return boolean True on successful update, false on failure. |
524 | 524 | */ |
525 | 525 | public function set_meta( $key, $value = false ) { |
526 | - $key = '_pronamic_subscription_' . $key; |
|
526 | + $key = '_pronamic_subscription_'.$key; |
|
527 | 527 | |
528 | 528 | if ( $value instanceof DateTime ) { |
529 | 529 | $value = $value->format( 'Y-m-d H:i:s' ); |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | |
549 | 549 | if ( $payment ) { |
550 | 550 | $description = apply_filters( 'pronamic_payment_source_description', $description, $payment ); |
551 | - $description = apply_filters( 'pronamic_payment_source_description_' . $this->source, $description, $payment ); |
|
551 | + $description = apply_filters( 'pronamic_payment_source_description_'.$this->source, $description, $payment ); |
|
552 | 552 | } |
553 | 553 | |
554 | 554 | return $description; |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | |
567 | 567 | if ( $payment ) { |
568 | 568 | $url = apply_filters( 'pronamic_payment_source_url', $url, $payment ); |
569 | - $url = apply_filters( 'pronamic_payment_source_url_' . $this->source, $url, $payment ); |
|
569 | + $url = apply_filters( 'pronamic_payment_source_url_'.$this->source, $url, $payment ); |
|
570 | 570 | } |
571 | 571 | |
572 | 572 | return $url; |
@@ -641,7 +641,7 @@ discard block |
||
641 | 641 | $payments = $this->get_payments(); |
642 | 642 | |
643 | 643 | if ( count( $payments ) > 0 ) { |
644 | - return $payments[0]; |
|
644 | + return $payments[ 0 ]; |
|
645 | 645 | } |
646 | 646 | |
647 | 647 | return null; |
@@ -897,7 +897,7 @@ discard block |
||
897 | 897 | * @param array $meta The meta data to update. |
898 | 898 | */ |
899 | 899 | public function update_meta( $meta ) { |
900 | - if ( ! is_array( $meta ) || count( $meta ) === 0 ) { |
|
900 | + if ( !is_array( $meta ) || count( $meta ) === 0 ) { |
|
901 | 901 | return; |
902 | 902 | } |
903 | 903 |