@@ -152,9 +152,12 @@ |
||
152 | 152 | |
153 | 153 | <?php wp_reset_postdata(); ?> |
154 | 154 | |
155 | - <?php else : ?> |
|
155 | + <?php else { |
|
156 | + : ?> |
|
156 | 157 | |
157 | - <p><?php esc_html_e( 'No pending payments found.', 'pronamic_ideal' ); ?></p> |
|
158 | + <p><?php esc_html_e( 'No pending payments found.', 'pronamic_ideal' ); |
|
159 | +} |
|
160 | +?></p> |
|
158 | 161 | |
159 | 162 | <?php endif; ?> |
160 | 163 | </div> |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | ); |
477 | 477 | |
478 | 478 | if ( $payment_method ) { |
479 | - $args['post__in'] = PaymentMethods::get_config_ids( $payment_method ); |
|
479 | + $args[ 'post__in' ] = PaymentMethods::get_config_ids( $payment_method ); |
|
480 | 480 | } |
481 | 481 | |
482 | 482 | $query = new WP_Query( $args ); |
@@ -687,10 +687,10 @@ discard block |
||
687 | 687 | $payment->set_credit_card( $data->get_credit_card() ); |
688 | 688 | |
689 | 689 | // User Agent (@see https://github.com/WordPress/WordPress/blob/4.9.4/wp-includes/comment.php#L1962-L1965). |
690 | - $payment->user_agent = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : null; |
|
690 | + $payment->user_agent = isset( $_SERVER[ 'HTTP_USER_AGENT' ] ) ? $_SERVER[ 'HTTP_USER_AGENT' ] : null; |
|
691 | 691 | |
692 | 692 | // IP (@see https://github.com/WordPress/WordPress/blob/4.9.4/wp-includes/comment.php#L1957-L1960). |
693 | - $payment->user_ip = isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : null; |
|
693 | + $payment->user_ip = isset( $_SERVER[ 'REMOTE_ADDR' ] ) ? $_SERVER[ 'REMOTE_ADDR' ] : null; |
|
694 | 694 | |
695 | 695 | return self::start_payment( $payment, $gateway ); |
696 | 696 | } |
@@ -713,7 +713,7 @@ discard block |
||
713 | 713 | |
714 | 714 | if ( empty( $amount ) ) { |
715 | 715 | // Keep track of free payments to update during shutdown. |
716 | - pronamic_pay_plugin()->payments_module->free[] = $payment->get_id(); |
|
716 | + pronamic_pay_plugin()->payments_module->free[ ] = $payment->get_id(); |
|
717 | 717 | |
718 | 718 | return $payment; |
719 | 719 | } |
@@ -72,10 +72,10 @@ discard block |
||
72 | 72 | $screen = get_current_screen(); |
73 | 73 | |
74 | 74 | if ( self::POST_TYPE === $screen->post_type ) { |
75 | - if ( ! isset( $vars['post_status'] ) ) { |
|
76 | - $vars['post_status'] = array_keys( SubscriptionPostType::get_states() ); |
|
75 | + if ( ! isset( $vars[ 'post_status' ] ) ) { |
|
76 | + $vars[ 'post_status' ] = array_keys( SubscriptionPostType::get_states() ); |
|
77 | 77 | |
78 | - $vars['post_status'][] = 'publish'; |
|
78 | + $vars[ 'post_status' ][ ] = 'publish'; |
|
79 | 79 | } |
80 | 80 | } |
81 | 81 | |
@@ -113,8 +113,8 @@ discard block |
||
113 | 113 | * @return array |
114 | 114 | */ |
115 | 115 | public function sortable_columns( $sortable_columns ) { |
116 | - $sortable_columns['pronamic_subscription_title'] = 'ID'; |
|
117 | - $sortable_columns['pronamic_subscription_date'] = 'date'; |
|
116 | + $sortable_columns[ 'pronamic_subscription_title' ] = 'ID'; |
|
117 | + $sortable_columns[ 'pronamic_subscription_date' ] = 'date'; |
|
118 | 118 | |
119 | 119 | return $sortable_columns; |
120 | 120 | } |
@@ -93,10 +93,10 @@ discard block |
||
93 | 93 | $screen = get_current_screen(); |
94 | 94 | |
95 | 95 | if ( self::POST_TYPE === $screen->post_type ) { |
96 | - if ( ! isset( $vars['post_status'] ) ) { |
|
97 | - $vars['post_status'] = array_keys( PaymentPostType::get_payment_states() ); |
|
96 | + if ( ! isset( $vars[ 'post_status' ] ) ) { |
|
97 | + $vars[ 'post_status' ] = array_keys( PaymentPostType::get_payment_states() ); |
|
98 | 98 | |
99 | - $vars['post_status'][] = 'publish'; |
|
99 | + $vars[ 'post_status' ][ ] = 'publish'; |
|
100 | 100 | } |
101 | 101 | } |
102 | 102 | |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | |
127 | 127 | Plugin::update_payment( $payment, false ); |
128 | 128 | |
129 | - $this->admin_notices[] = array( |
|
129 | + $this->admin_notices[ ] = array( |
|
130 | 130 | 'type' => 'info', |
131 | 131 | 'message' => __( 'Payment status updated.', 'pronamic_ideal' ), |
132 | 132 | ); |
@@ -140,8 +140,8 @@ discard block |
||
140 | 140 | foreach ( $this->admin_notices as $notice ) { |
141 | 141 | printf( |
142 | 142 | '<div class="notice notice-%1$s"><p>%2$s</p></div>', |
143 | - esc_attr( $notice['type'] ), |
|
144 | - esc_html( $notice['message'] ) |
|
143 | + esc_attr( $notice[ 'type' ] ), |
|
144 | + esc_html( $notice[ 'message' ] ) |
|
145 | 145 | ); |
146 | 146 | } |
147 | 147 | } |
@@ -196,8 +196,8 @@ discard block |
||
196 | 196 | * @return array |
197 | 197 | */ |
198 | 198 | public function default_hidden_columns( $hidden ) { |
199 | - $hidden[] = 'pronamic_payment_gateway'; |
|
200 | - $hidden[] = 'pronamic_payment_description'; |
|
199 | + $hidden[ ] = 'pronamic_payment_gateway'; |
|
200 | + $hidden[ ] = 'pronamic_payment_description'; |
|
201 | 201 | |
202 | 202 | return $hidden; |
203 | 203 | } |
@@ -209,9 +209,9 @@ discard block |
||
209 | 209 | * @return array |
210 | 210 | */ |
211 | 211 | public function sortable_columns( $sortable_columns ) { |
212 | - $sortable_columns['pronamic_payment_title'] = 'ID'; |
|
213 | - $sortable_columns['pronamic_payment_amount'] = 'pronamic_payment_amount'; |
|
214 | - $sortable_columns['pronamic_payment_date'] = 'date'; |
|
212 | + $sortable_columns[ 'pronamic_payment_title' ] = 'ID'; |
|
213 | + $sortable_columns[ 'pronamic_payment_amount' ] = 'pronamic_payment_amount'; |
|
214 | + $sortable_columns[ 'pronamic_payment_date' ] = 'date'; |
|
215 | 215 | |
216 | 216 | return $sortable_columns; |
217 | 217 | } |
@@ -551,14 +551,14 @@ discard block |
||
551 | 551 | 0 => '', // Unused. Messages start at index 1. |
552 | 552 | 1 => __( 'Payment updated.', 'pronamic_ideal' ), |
553 | 553 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352799&filters[translation_id]=37947229. |
554 | - 2 => $messages['post'][2], |
|
554 | + 2 => $messages[ 'post' ][ 2 ], |
|
555 | 555 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352800&filters[translation_id]=37947870. |
556 | - 3 => $messages['post'][3], |
|
556 | + 3 => $messages[ 'post' ][ 3 ], |
|
557 | 557 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352798&filters[translation_id]=37947230. |
558 | 558 | 4 => __( 'Payment updated.', 'pronamic_ideal' ), |
559 | 559 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352801&filters[translation_id]=37947231. |
560 | 560 | // translators: %s: date and time of the revision |
561 | - 5 => isset( $_GET['revision'] ) ? sprintf( __( 'Payment restored to revision from %s.', 'pronamic_ideal' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, // WPCS: CSRF ok. |
|
561 | + 5 => isset( $_GET[ 'revision' ] ) ? sprintf( __( 'Payment restored to revision from %s.', 'pronamic_ideal' ), wp_post_revision_title( (int) $_GET[ 'revision' ], false ) ) : false, // WPCS: CSRF ok. |
|
562 | 562 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352802&filters[translation_id]=37949178. |
563 | 563 | 6 => __( 'Payment published.', 'pronamic_ideal' ), |
564 | 564 | // @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352803&filters[translation_id]=37947232. |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | // Handle renewals. |
262 | 262 | if ( is_array( $renewal ) ) { |
263 | 263 | $payment->recurring = false; |
264 | - $payment->issuer = $renewal['issuer']; |
|
264 | + $payment->issuer = $renewal[ 'issuer' ]; |
|
265 | 265 | } |
266 | 266 | |
267 | 267 | // Start payment. |
@@ -305,11 +305,11 @@ discard block |
||
305 | 305 | * @return array |
306 | 306 | */ |
307 | 307 | public function exclude_subscription_comment_notes( $clauses, $query ) { |
308 | - $type = $query->query_vars['type']; |
|
308 | + $type = $query->query_vars[ 'type' ]; |
|
309 | 309 | |
310 | 310 | // Ignore subscription notes comments if it's not specifically requested. |
311 | 311 | if ( 'subscription_note' !== $type ) { |
312 | - $clauses['where'] .= " AND comment_type != 'subscription_note'"; |
|
312 | + $clauses[ 'where' ] .= " AND comment_type != 'subscription_note'"; |
|
313 | 313 | } |
314 | 314 | |
315 | 315 | return $clauses; |
@@ -596,7 +596,7 @@ discard block |
||
596 | 596 | ); |
597 | 597 | |
598 | 598 | if ( ! $cli_test ) { |
599 | - $args['meta_query'][] = array( |
|
599 | + $args[ 'meta_query' ][ ] = array( |
|
600 | 600 | 'key' => '_pronamic_subscription_next_payment', |
601 | 601 | 'compare' => '<=', |
602 | 602 | 'value' => current_time( 'mysql', true ), |
@@ -75,11 +75,11 @@ discard block |
||
75 | 75 | // Git flow |
76 | 76 | chdir( $git_dir ); |
77 | 77 | |
78 | - if ( isset( $argv[1] ) && 'develop' === $argv[1] ) { |
|
78 | + if ( isset( $argv[ 1 ] ) && 'develop' === $argv[ 1 ] ) { |
|
79 | 79 | `git checkout develop`; |
80 | 80 | } |
81 | 81 | |
82 | - if ( isset( $argv[1] ) && 'pull' === $argv[1] ) { |
|
82 | + if ( isset( $argv[ 1 ] ) && 'pull' === $argv[ 1 ] ) { |
|
83 | 83 | $command = 'git pull'; |
84 | 84 | |
85 | 85 | echo $command, PHP_EOL; |
@@ -87,8 +87,8 @@ discard block |
||
87 | 87 | echo shell_exec( $command ), PHP_EOL; |
88 | 88 | } |
89 | 89 | |
90 | - if ( isset( $argv[1], $argv[2] ) && in_array( $argv[1], array( 'git', 'composer', 'yarn' ) ) ) { |
|
91 | - $command = sprintf( '%s %s', $argv[1], $argv[2] ); |
|
90 | + if ( isset( $argv[ 1 ], $argv[ 2 ] ) && in_array( $argv[ 1 ], array( 'git', 'composer', 'yarn' ) ) ) { |
|
91 | + $command = sprintf( '%s %s', $argv[ 1 ], $argv[ 2 ] ); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | if ( null !== $command ) { |