@@ -51,7 +51,7 @@ |
||
51 | 51 | 'pronamic_pay_check_status' => true, |
52 | 52 | ), admin_url( 'post.php' ) |
53 | 53 | ), |
54 | - 'pronamic_payment_check_status_' . $post->ID |
|
54 | + 'pronamic_payment_check_status_'.$post->ID |
|
55 | 55 | ); |
56 | 56 | |
57 | 57 | printf( |
@@ -63,7 +63,7 @@ |
||
63 | 63 | <?php esc_html_e( 'Transaction ID', 'pronamic_ideal' ); ?> |
64 | 64 | </th> |
65 | 65 | <td> |
66 | - <?php do_action( 'manage_' . $post_type . '_posts_custom_column', 'pronamic_payment_transaction', $post_id ); ?> |
|
66 | + <?php do_action( 'manage_'.$post_type.'_posts_custom_column', 'pronamic_payment_transaction', $post_id ); ?> |
|
67 | 67 | </td> |
68 | 68 | </tr> |
69 | 69 | <tr> |
@@ -9,7 +9,7 @@ |
||
9 | 9 | */ |
10 | 10 | |
11 | 11 | // If this file is called directly, abort. |
12 | -if ( ! defined( 'WPINC' ) ) { |
|
12 | +if ( !defined( 'WPINC' ) ) { |
|
13 | 13 | die; |
14 | 14 | } |
15 | 15 |
@@ -89,10 +89,10 @@ |
||
89 | 89 | } |
90 | 90 | |
91 | 91 | // Add empty input field. |
92 | - $choices[] = ''; |
|
92 | + $choices[ ] = ''; |
|
93 | 93 | |
94 | 94 | foreach ( $choices as $i => $amount ) { |
95 | - if ( ! empty( $amount ) ) { |
|
95 | + if ( !empty( $amount ) ) { |
|
96 | 96 | $decimals = ( $amount % 100 > 0 ? 2 : 0 ); |
97 | 97 | |
98 | 98 | $amount = number_format( ( $amount / 100 ), $decimals, pronamic_pay_get_decimal_separator(), pronamic_pay_get_thousands_separator() ); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | $classes = array( 'nav-tab' ); |
31 | 31 | |
32 | 32 | if ( $current_tab === $tab ) { |
33 | - $classes[] = 'nav-tab-active'; |
|
33 | + $classes[ ] = 'nav-tab-active'; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | $url = add_query_arg( |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | <?php |
57 | 57 | |
58 | - $file = plugin_dir_path( Plugin::$file ) . 'admin/tab-' . $current_tab . '.php'; |
|
58 | + $file = plugin_dir_path( Plugin::$file ).'admin/tab-'.$current_tab.'.php'; |
|
59 | 59 | |
60 | 60 | if ( is_readable( $file ) ) { |
61 | 61 | include $file; |
@@ -28,13 +28,13 @@ discard block |
||
28 | 28 | |
29 | 29 | $inputs = array(); |
30 | 30 | |
31 | - foreach ( $payment_methods['choices'][0]['options'] as $payment_method => $method_name ) { |
|
31 | + foreach ( $payment_methods[ 'choices' ][ 0 ][ 'options' ] as $payment_method => $method_name ) { |
|
32 | 32 | $gateway->set_payment_method( $payment_method ); |
33 | 33 | |
34 | 34 | // Payment method input HTML. |
35 | 35 | $html = $gateway->get_input_html(); |
36 | 36 | |
37 | - if ( ! empty( $html ) ) { |
|
37 | + if ( !empty( $html ) ) { |
|
38 | 38 | $inputs[ $payment_method ] = array( |
39 | 39 | 'label' => $method_name, |
40 | 40 | 'html' => $html, |
@@ -43,10 +43,10 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | if ( $gateway->has_error() ) { |
46 | - $pronamic_ideal_errors[] = $gateway->get_error(); |
|
46 | + $pronamic_ideal_errors[ ] = $gateway->get_error(); |
|
47 | 47 | } |
48 | 48 | |
49 | - include Plugin::$dirname . '/views/errors.php'; |
|
49 | + include Plugin::$dirname.'/views/errors.php'; |
|
50 | 50 | |
51 | 51 | ?> |
52 | 52 | <table class="form-table"> |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | <select id="pronamic-pay-test-payment-methods" name="pronamic_pay_test_payment_method"> |
61 | 61 | <?php |
62 | 62 | |
63 | - foreach ( $payment_methods['choices'][0]['options'] as $payment_method => $method_name ) { |
|
63 | + foreach ( $payment_methods[ 'choices' ][ 0 ][ 'options' ] as $payment_method => $method_name ) { |
|
64 | 64 | printf( |
65 | 65 | '<option value="%s">%s</option>', |
66 | 66 | esc_attr( $payment_method ), |
@@ -77,12 +77,12 @@ discard block |
||
77 | 77 | |
78 | 78 | <tr class="pronamic-pay-cloack pronamic-pay-test-payment-method <?php echo esc_attr( $method ); ?>"> |
79 | 79 | <th scope="row"> |
80 | - <?php echo esc_html( $input['label'] ); ?> |
|
80 | + <?php echo esc_html( $input[ 'label' ] ); ?> |
|
81 | 81 | </th> |
82 | 82 | <td> |
83 | 83 | <?php |
84 | 84 | |
85 | - echo $input['html']; // WPCS: XSS ok. |
|
85 | + echo $input[ 'html' ]; // WPCS: XSS ok. |
|
86 | 86 | |
87 | 87 | ?> |
88 | 88 | </td> |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | <?php |
282 | 282 | |
283 | 283 | if ( $is_ideal || $gateway instanceof \Pronamic\WordPress\Pay\Gateways\OmniKassa2\Gateway ) { |
284 | - include Plugin::$dirname . '/views/ideal-test-cases.php'; |
|
284 | + include Plugin::$dirname.'/views/ideal-test-cases.php'; |
|
285 | 285 | } |
286 | 286 | } else { |
287 | 287 | printf( |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | |
13 | 13 | <?php |
14 | 14 | |
15 | -$data = file_get_contents( __DIR__ . '/../other/extensions.json' ); |
|
15 | +$data = file_get_contents( __DIR__.'/../other/extensions.json' ); |
|
16 | 16 | $extensions = json_decode( $data ); |
17 | 17 | |
18 | 18 | ?> |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | |
46 | 46 | ?> |
47 | 47 | |
48 | - <?php $alternate = ! $alternate; ?> |
|
48 | + <?php $alternate = !$alternate; ?> |
|
49 | 49 | |
50 | 50 | <tr<?php if ( $alternate ) : ?> class="alternate"<?php endif; ?>> |
51 | 51 | <td> |
@@ -8,7 +8,7 @@ |
||
8 | 8 | * @package Pronamic\WordPress\Pay |
9 | 9 | */ |
10 | 10 | |
11 | -if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) { |
|
11 | +if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) { |
|
12 | 12 | exit; |
13 | 13 | } |
14 | 14 |
@@ -1,16 +1,16 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | $_tests_dir = getenv( 'WP_TESTS_DIR' ); |
4 | -if ( ! $_tests_dir ) { |
|
4 | +if ( !$_tests_dir ) { |
|
5 | 5 | $_tests_dir = '/tmp/wordpress-tests-lib'; |
6 | 6 | } |
7 | 7 | |
8 | -require_once $_tests_dir . '/includes/functions.php'; |
|
8 | +require_once $_tests_dir.'/includes/functions.php'; |
|
9 | 9 | |
10 | 10 | function _manually_load_plugin() { |
11 | - require dirname( __FILE__ ) . '/../pronamic-ideal.php'; |
|
11 | + require dirname( __FILE__ ).'/../pronamic-ideal.php'; |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' ); |
15 | 15 | |
16 | -require $_tests_dir . '/includes/bootstrap.php'; |
|
16 | +require $_tests_dir.'/includes/bootstrap.php'; |