Completed
Push — develop ( 834657...aee17a )
by
unknown
06:47 queued 01:42
created
classes/Admin/AdminPaymentPostType.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
 		$screen = get_current_screen();
77 77
 
78 78
 		if ( self::POST_TYPE === $screen->post_type ) {
79
-			if ( ! isset( $vars['post_status'] ) ) {
80
-				$vars['post_status'] = array_keys( \Pronamic\WordPress\Pay\Plugin::get_payment_states() );
79
+			if ( ! isset( $vars[ 'post_status' ] ) ) {
80
+				$vars[ 'post_status' ] = array_keys( \Pronamic\WordPress\Pay\Plugin::get_payment_states() );
81 81
 
82
-				$vars['post_status'][] = 'publish';
82
+				$vars[ 'post_status' ][ ] = 'publish';
83 83
 			}
84 84
 		}
85 85
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
 			\Pronamic\WordPress\Pay\Plugin::update_payment( $payment, false );
111 111
 
112
-			$this->admin_notices[] = array(
112
+			$this->admin_notices[ ] = array(
113 113
 				'type'    => 'info',
114 114
 				'message' => __( 'Payment status updated.', 'pronamic_ideal' ),
115 115
 			);
@@ -123,8 +123,8 @@  discard block
 block discarded – undo
123 123
 		foreach ( $this->admin_notices as $notice ) {
124 124
 			printf(
125 125
 				'<div class="notice notice-%1$s"><p>%2$s</p></div>',
126
-				esc_attr( $notice['type'] ),
127
-				esc_html( $notice['message'] )
126
+				esc_attr( $notice[ 'type' ] ),
127
+				esc_html( $notice[ 'message' ] )
128 128
 			);
129 129
 		}
130 130
 	}
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
 	 * @return array
180 180
 	 */
181 181
 	public function default_hidden_columns( $hidden ) {
182
-		$hidden[] = 'pronamic_payment_gateway';
183
-		$hidden[] = 'pronamic_payment_description';
182
+		$hidden[ ] = 'pronamic_payment_gateway';
183
+		$hidden[ ] = 'pronamic_payment_description';
184 184
 
185 185
 		return $hidden;
186 186
 	}
@@ -192,9 +192,9 @@  discard block
 block discarded – undo
192 192
 	 * @return array
193 193
 	 */
194 194
 	public function sortable_columns( $sortable_columns ) {
195
-		$sortable_columns['pronamic_payment_title']  = 'ID';
196
-		$sortable_columns['pronamic_payment_amount'] = 'pronamic_payment_amount';
197
-		$sortable_columns['pronamic_payment_date']   = 'date';
195
+		$sortable_columns[ 'pronamic_payment_title' ]  = 'ID';
196
+		$sortable_columns[ 'pronamic_payment_amount' ] = 'pronamic_payment_amount';
197
+		$sortable_columns[ 'pronamic_payment_date' ]   = 'date';
198 198
 
199 199
 		return $sortable_columns;
200 200
 	}
@@ -532,14 +532,14 @@  discard block
 block discarded – undo
532 532
 			0  => '', // Unused. Messages start at index 1.
533 533
 			1  => __( 'Payment updated.', 'pronamic_ideal' ),
534 534
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352799&filters[translation_id]=37947229.
535
-			2  => $messages['post'][2],
535
+			2  => $messages[ 'post' ][ 2 ],
536 536
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352800&filters[translation_id]=37947870.
537
-			3  => $messages['post'][3],
537
+			3  => $messages[ 'post' ][ 3 ],
538 538
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352798&filters[translation_id]=37947230.
539 539
 			4  => __( 'Payment updated.', 'pronamic_ideal' ),
540 540
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352801&filters[translation_id]=37947231.
541 541
 			// translators: %s: date and time of the revision
542
-			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.
542
+			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.
543 543
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352802&filters[translation_id]=37949178.
544 544
 			6  => __( 'Payment published.', 'pronamic_ideal' ),
545 545
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352803&filters[translation_id]=37947232.
Please login to merge, or discard this patch.
classes/Admin/AdminPaymentBulkActions.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	public function bulk_actions( $bulk_actions ) {
63 63
 		// Don't allow edit in bulk.
64
-		unset( $bulk_actions['edit'] );
64
+		unset( $bulk_actions[ 'edit' ] );
65 65
 
66 66
 		// Bulk check payment status.
67
-		$bulk_actions['pronamic_payment_check_status'] = __( 'Check Payment Status', 'pronamic_ideal' );
67
+		$bulk_actions[ 'pronamic_payment_check_status' ] = __( 'Check Payment Status', 'pronamic_ideal' );
68 68
 
69 69
 		return $bulk_actions;
70 70
 	}
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 				$gateways[ $config_id ] = \Pronamic\WordPress\Pay\Plugin::get_gateway( $config_id );
107 107
 
108 108
 				if ( $gateways[ $config_id ] && ! $gateways[ $config_id ]->supports( 'payment_status_request' ) ) {
109
-					$unsupported_gateways[] = $config_id;
109
+					$unsupported_gateways[ ] = $config_id;
110 110
 				}
111 111
 			}
112 112
 
Please login to merge, or discard this patch.
classes/Plugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
classes/Subscriptions/SubscriptionsDataStoreCPT.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
 		$post_status = $this->get_post_status( $subscription->get_status() );
101 101
 
102 102
 		if ( ! empty( $post_status ) ) {
103
-			$data['post_status'] = $post_status;
103
+			$data[ 'post_status' ] = $post_status;
104 104
 		}
105 105
 
106 106
 		wp_update_post( $data );
Please login to merge, or discard this patch.
src/check-versions.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@  discard block
 block discarded – undo
46 46
 
47 47
 foreach ( $tokens as $token ) {
48 48
 	if ( is_array( $token ) ) {
49
-		$type  = $token[0];
50
-		$value = $token[1];
51
-		$line  = $token[2];
49
+		$type  = $token[ 0 ];
50
+		$value = $token[ 1 ];
51
+		$line  = $token[ 2 ];
52 52
 
53 53
 		if ( in_array( $type, array( T_COMMENT, T_DOC_COMMENT ), true ) && false !== strpos( $value, 'Plugin Name' ) ) {
54 54
 			$file_header = $value;
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
 	exit( 1 );
91 91
 }
92 92
 
93
-if ( $default_properties['version'] !== $pkg->version ) {
93
+if ( $default_properties[ 'version' ] !== $pkg->version ) {
94 94
 	printf( '❌  ' );
95
-	printf( 'The "version" property value "%s" in class "%s" does not match.', $default_properties['version'], $plugin_class_reflection->getName() );
95
+	printf( 'The "version" property value "%s" in class "%s" does not match.', $default_properties[ 'version' ], $plugin_class_reflection->getName() );
96 96
 
97 97
 	exit( 1 );
98 98
 }
99 99
 
100 100
 printf( '✅  ' );
101
-printf( 'The "version" property value "%s" in class "%s" matches.', $default_properties['version'], $plugin_class_reflection->getName() );
101
+printf( 'The "version" property value "%s" in class "%s" matches.', $default_properties[ 'version' ], $plugin_class_reflection->getName() );
102 102
 
103 103
 echo PHP_EOL;
Please login to merge, or discard this patch.
admin/page-dashboard.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -152,9 +152,12 @@
 block discarded – undo
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>
Please login to merge, or discard this patch.