@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | public function get_and_set_provider() { |
| 48 | 48 | return array( |
| 49 | - array( 'set_amount', 'get_amount', new Money( 89.95, 'EUR' ) ), |
|
| 50 | - array( 'set_id', 'get_id', uniqid() ), |
|
| 51 | - array( 'set_transaction_id', 'get_transaction_id', uniqid() ), |
|
| 52 | - array( 'set_status', 'get_status', 'completed' ), |
|
| 49 | + array( 'set_amount', 'get_amount', new Money( 89.95, 'EUR' ) ), |
|
| 50 | + array( 'set_id', 'get_id', uniqid() ), |
|
| 51 | + array( 'set_transaction_id', 'get_transaction_id', uniqid() ), |
|
| 52 | + array( 'set_status', 'get_status', 'completed' ), |
|
| 53 | 53 | ); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -68,11 +68,11 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | public function set_provider() { |
| 70 | 70 | return array( |
| 71 | - array( 'set_consumer_name', 'consumer_name', 'John Doe' ), |
|
| 71 | + array( 'set_consumer_name', 'consumer_name', 'John Doe' ), |
|
| 72 | 72 | array( 'set_consumer_account_number', 'consumer_account_number', '1086.34.779' ), |
| 73 | - array( 'set_consumer_iban', 'consumer_iban', 'NL56 RABO 0108 6347 79' ), |
|
| 74 | - array( 'set_consumer_bic', 'consumer_bic', 'RABONL2U' ), |
|
| 75 | - array( 'set_consumer_city', 'consumer_city', 'Drachten' ), |
|
| 73 | + array( 'set_consumer_iban', 'consumer_iban', 'NL56 RABO 0108 6347 79' ), |
|
| 74 | + array( 'set_consumer_bic', 'consumer_bic', 'RABONL2U' ), |
|
| 75 | + array( 'set_consumer_city', 'consumer_city', 'Drachten' ), |
|
| 76 | 76 | ); |
| 77 | 77 | } |
| 78 | 78 | |
@@ -91,23 +91,23 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | public function get_provider() { |
| 93 | 93 | return array( |
| 94 | - array( 'order_id', 'get_order_id', 1234 ), |
|
| 95 | - array( 'method', 'get_method', 'ideal' ), |
|
| 96 | - array( 'issuer', 'get_issuer', 'ideal_KNABNL2H' ), |
|
| 97 | - array( 'language', 'get_language', 'nl' ), |
|
| 98 | - array( 'locale', 'get_locale', 'nl_NL' ), |
|
| 99 | - array( 'description', 'get_description', 'Lorem ipsum dolor sit amet, consectetur.' ), |
|
| 100 | - array( 'email', 'get_email', '[email protected]' ), |
|
| 101 | - array( 'first_name', 'get_first_name', 'John' ), |
|
| 102 | - array( 'last_name', 'get_last_name', 'Doe' ), |
|
| 103 | - array( 'customer_name', 'get_customer_name', 'John Doe' ), |
|
| 104 | - array( 'address', 'get_address', 'Burgemeester Wuiteweg 39b' ), |
|
| 105 | - array( 'city', 'get_city', 'Drachten' ), |
|
| 106 | - array( 'zip', 'get_zip', '9203 KA' ), |
|
| 107 | - array( 'country', 'get_country', 'NL' ), |
|
| 108 | - array( 'telephone_number', 'get_telephone_number', '1234567890' ), |
|
| 94 | + array( 'order_id', 'get_order_id', 1234 ), |
|
| 95 | + array( 'method', 'get_method', 'ideal' ), |
|
| 96 | + array( 'issuer', 'get_issuer', 'ideal_KNABNL2H' ), |
|
| 97 | + array( 'language', 'get_language', 'nl' ), |
|
| 98 | + array( 'locale', 'get_locale', 'nl_NL' ), |
|
| 99 | + array( 'description', 'get_description', 'Lorem ipsum dolor sit amet, consectetur.' ), |
|
| 100 | + array( 'email', 'get_email', '[email protected]' ), |
|
| 101 | + array( 'first_name', 'get_first_name', 'John' ), |
|
| 102 | + array( 'last_name', 'get_last_name', 'Doe' ), |
|
| 103 | + array( 'customer_name', 'get_customer_name', 'John Doe' ), |
|
| 104 | + array( 'address', 'get_address', 'Burgemeester Wuiteweg 39b' ), |
|
| 105 | + array( 'city', 'get_city', 'Drachten' ), |
|
| 106 | + array( 'zip', 'get_zip', '9203 KA' ), |
|
| 107 | + array( 'country', 'get_country', 'NL' ), |
|
| 108 | + array( 'telephone_number', 'get_telephone_number', '1234567890' ), |
|
| 109 | 109 | array( 'analytics_client_id', 'get_analytics_client_id', 'GA1.2.1234567890.1234567890' ), |
| 110 | - array( 'entrance_code', 'get_entrance_code', uniqid() ), |
|
| 110 | + array( 'entrance_code', 'get_entrance_code', uniqid() ), |
|
| 111 | 111 | ); |
| 112 | 112 | } |
| 113 | 113 | |
@@ -44,10 +44,10 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | public function get_and_set_provider() { |
| 46 | 46 | return array( |
| 47 | - array( 'set_amount', 'get_amount', new Money( 89.95, 'EUR' ) ), |
|
| 48 | - array( 'set_id', 'get_id', uniqid() ), |
|
| 49 | - array( 'set_status', 'get_status', 'completed' ), |
|
| 50 | - array( 'set_transaction_id', 'get_transaction_id', uniqid() ), |
|
| 47 | + array( 'set_amount', 'get_amount', new Money( 89.95, 'EUR' ) ), |
|
| 48 | + array( 'set_id', 'get_id', uniqid() ), |
|
| 49 | + array( 'set_status', 'get_status', 'completed' ), |
|
| 50 | + array( 'set_transaction_id', 'get_transaction_id', uniqid() ), |
|
| 51 | 51 | ); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | return array( |
| 74 | 74 | array( 'set_consumer_name', 'consumer_name', 'John Doe' ), |
| 75 | 75 | array( 'set_consumer_iban', 'consumer_iban', 'NL56 RABO 0108 6347 79' ), |
| 76 | - array( 'set_consumer_bic', 'consumer_bic', 'RABONL2U' ), |
|
| 76 | + array( 'set_consumer_bic', 'consumer_bic', 'RABONL2U' ), |
|
| 77 | 77 | ); |
| 78 | 78 | } |
| 79 | 79 | |
@@ -97,13 +97,13 @@ discard block |
||
| 97 | 97 | */ |
| 98 | 98 | public function get_provider() { |
| 99 | 99 | return array( |
| 100 | - array( 'key', 'get_key', uniqid() ), |
|
| 101 | - array( 'source', 'get_source', 'woocommerce' ), |
|
| 102 | - array( 'source_id', 'get_source_id', '1234' ), |
|
| 103 | - array( 'frequency', 'get_frequency', 'daily' ), |
|
| 104 | - array( 'interval', 'get_interval', '1' ), |
|
| 105 | - array( 'interval_period', 'get_interval_period', 'Y' ), |
|
| 106 | - array( 'description', 'get_description', 'Lorem ipsum dolor sit amet, consectetur.' ), |
|
| 100 | + array( 'key', 'get_key', uniqid() ), |
|
| 101 | + array( 'source', 'get_source', 'woocommerce' ), |
|
| 102 | + array( 'source_id', 'get_source_id', '1234' ), |
|
| 103 | + array( 'frequency', 'get_frequency', 'daily' ), |
|
| 104 | + array( 'interval', 'get_interval', '1' ), |
|
| 105 | + array( 'interval_period', 'get_interval_period', 'Y' ), |
|
| 106 | + array( 'description', 'get_description', 'Lorem ipsum dolor sit amet, consectetur.' ), |
|
| 107 | 107 | ); |
| 108 | 108 | } |
| 109 | 109 | |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $results = $wpdb->get_results( $db_query ); // WPCS: unprepared SQL ok. |
| 86 | 86 | |
| 87 | 87 | foreach ( $results as $result ) { |
| 88 | - $payments[] = new Payment( $result->post_id ); |
|
| 88 | + $payments[ ] = new Payment( $result->post_id ); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | return $payments; |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | $results = $wpdb->get_results( $db_query ); // WPCS: unprepared SQL ok. |
| 195 | 195 | |
| 196 | 196 | foreach ( $results as $result ) { |
| 197 | - $subscriptions[] = new Subscription( $result->post_id ); |
|
| 197 | + $subscriptions[ ] = new Subscription( $result->post_id ); |
|
| 198 | 198 | } |
| 199 | 199 | |
| 200 | 200 | return $subscriptions; |
@@ -210,13 +210,13 @@ discard block |
||
| 210 | 210 | |
| 211 | 211 | foreach ( $pronamic_ideal->gateway_integrations as $integration ) { |
| 212 | 212 | if ( isset( $pronamic_pay_providers[ $integration->provider ] ) ) { |
| 213 | - $provider =& $pronamic_pay_providers[ $integration->provider ]; |
|
| 213 | + $provider = & $pronamic_pay_providers[ $integration->provider ]; |
|
| 214 | 214 | |
| 215 | - if ( ! isset( $provider['integrations'] ) ) { |
|
| 216 | - $provider['integrations'] = array(); |
|
| 215 | + if ( ! isset( $provider[ 'integrations' ] ) ) { |
|
| 216 | + $provider[ 'integrations' ] = array(); |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | - $provider['integrations'][] = $integration; |
|
| 219 | + $provider[ 'integrations' ][ ] = $integration; |
|
| 220 | 220 | } |
| 221 | 221 | } |
| 222 | 222 | } |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | if ( false === $separator ) { |
| 272 | 272 | // WordPress locale number format was introduced in WordPress version 2.3. |
| 273 | 273 | // @see https://github.com/WordPress/WordPress/blob/2.3/wp-includes/locale.php#L90-L100. |
| 274 | - $separator = $wp_locale->number_format['thousands_sep']; |
|
| 274 | + $separator = $wp_locale->number_format[ 'thousands_sep' ]; |
|
| 275 | 275 | } |
| 276 | 276 | |
| 277 | 277 | return $separator; |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | if ( false === $separator ) { |
| 293 | 293 | // WordPress locale number format was introduced in WordPress version 2.3. |
| 294 | 294 | // @see https://github.com/WordPress/WordPress/blob/2.3/wp-includes/locale.php#L90-L100. |
| 295 | - $separator = $wp_locale->number_format['decimal_point']; |
|
| 295 | + $separator = $wp_locale->number_format[ 'decimal_point' ]; |
|
| 296 | 296 | } |
| 297 | 297 | |
| 298 | 298 | return $separator ? $separator : '.'; |
@@ -79,11 +79,11 @@ discard block |
||
| 79 | 79 | * @return array |
| 80 | 80 | */ |
| 81 | 81 | public function exclude_payment_comment_notes( $clauses, $query ) { |
| 82 | - $type = $query->query_vars['type']; |
|
| 82 | + $type = $query->query_vars[ 'type' ]; |
|
| 83 | 83 | |
| 84 | 84 | // Ignore payment notes comments if it's not specifically requested. |
| 85 | 85 | if ( 'payment_note' !== $type ) { |
| 86 | - $clauses['where'] .= " AND comment_type != 'payment_note'"; |
|
| 86 | + $clauses[ 'where' ] .= " AND comment_type != 'payment_note'"; |
|
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | return $clauses; |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | * @return array |
| 187 | 187 | */ |
| 188 | 188 | public function register_privacy_exporter( $exporters ) { |
| 189 | - $exporters['pronamic-pay-payments'] = array( |
|
| 189 | + $exporters[ 'pronamic-pay-payments' ] = array( |
|
| 190 | 190 | 'exporter_friendly_name' => __( 'Pronamic Pay Payments', 'pronamic_ideal' ), |
| 191 | 191 | 'callback' => array( $this, 'privacy_export' ), |
| 192 | 192 | ); |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | } |
| 230 | 230 | |
| 231 | 231 | // Add meta to export data. |
| 232 | - $data[] = array( |
|
| 232 | + $data[ ] = array( |
|
| 233 | 233 | 'name' => $meta_key, |
| 234 | 234 | 'value' => $meta_value, |
| 235 | 235 | ); |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | |
| 238 | 238 | // Add item to export data. |
| 239 | 239 | if ( ! empty( $data ) ) { |
| 240 | - $items[] = array( |
|
| 240 | + $items[ ] = array( |
|
| 241 | 241 | 'group_id' => 'pronamic-payments', |
| 242 | 242 | 'group_label' => __( 'Payments', 'pronamic_ideal' ), |
| 243 | 243 | 'item_id' => 'pronamic-payment-' . $payment->get_id(), |
@@ -366,11 +366,11 @@ discard block |
||
| 366 | 366 | * @return array |
| 367 | 367 | */ |
| 368 | 368 | public function exclude_subscription_comment_notes( $clauses, $query ) { |
| 369 | - $type = $query->query_vars['type']; |
|
| 369 | + $type = $query->query_vars[ 'type' ]; |
|
| 370 | 370 | |
| 371 | 371 | // Ignore subscription notes comments if it's not specifically requested. |
| 372 | 372 | if ( 'subscription_note' !== $type ) { |
| 373 | - $clauses['where'] .= " AND comment_type != 'subscription_note'"; |
|
| 373 | + $clauses[ 'where' ] .= " AND comment_type != 'subscription_note'"; |
|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | return $clauses; |
@@ -591,7 +591,7 @@ discard block |
||
| 591 | 591 | * @return array |
| 592 | 592 | */ |
| 593 | 593 | public function register_privacy_exporter( $exporters ) { |
| 594 | - $exporters['pronamic-pay-subscriptions'] = array( |
|
| 594 | + $exporters[ 'pronamic-pay-subscriptions' ] = array( |
|
| 595 | 595 | 'exporter_friendly_name' => __( 'Pronamic Pay Subscriptions', 'pronamic_ideal' ), |
| 596 | 596 | 'callback' => array( $this, 'privacy_export' ), |
| 597 | 597 | ); |
@@ -634,7 +634,7 @@ discard block |
||
| 634 | 634 | } |
| 635 | 635 | |
| 636 | 636 | // Add meta to export data. |
| 637 | - $data[] = array( |
|
| 637 | + $data[ ] = array( |
|
| 638 | 638 | 'name' => $meta_key, |
| 639 | 639 | 'value' => $meta_value, |
| 640 | 640 | ); |
@@ -642,7 +642,7 @@ discard block |
||
| 642 | 642 | |
| 643 | 643 | // Add item to export data. |
| 644 | 644 | if ( ! empty( $data ) ) { |
| 645 | - $items[] = array( |
|
| 645 | + $items[ ] = array( |
|
| 646 | 646 | 'group_id' => 'pronamic-subscriptions', |
| 647 | 647 | 'group_label' => __( 'Subscriptions', 'pronamic_ideal' ), |
| 648 | 648 | 'item_id' => 'pronamic-subscription-' . $subscription->get_id(), |
@@ -750,7 +750,7 @@ discard block |
||
| 750 | 750 | ); |
| 751 | 751 | |
| 752 | 752 | if ( ! $cli_test ) { |
| 753 | - $args['meta_query'][] = array( |
|
| 753 | + $args[ 'meta_query' ][ ] = array( |
|
| 754 | 754 | 'key' => '_pronamic_subscription_next_payment', |
| 755 | 755 | 'compare' => '<=', |
| 756 | 756 | 'value' => current_time( 'mysql', true ), |