Passed
Push — develop ( ff75e1...e7463e )
by Remco
04:14
created
classes/Forms/FormProcessor.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,14 +132,14 @@
 block discarded – undo
132 132
 		$first_name = filter_input( INPUT_POST, 'pronamic_pay_first_name', FILTER_SANITIZE_STRING );
133 133
 
134 134
 		if ( empty( $first_name ) ) {
135
-			$pronamic_pay_errors['first_name'] = __( 'Please enter your first name', 'pronamic_ideal' );
135
+			$pronamic_pay_errors[ 'first_name' ] = __( 'Please enter your first name', 'pronamic_ideal' );
136 136
 		}
137 137
 
138 138
 		// E-mail.
139 139
 		$email = filter_input( INPUT_POST, 'pronamic_pay_email', FILTER_VALIDATE_EMAIL );
140 140
 
141 141
 		if ( empty( $email ) ) {
142
-			$pronamic_pay_errors['email'] = __( 'Please enter a valid email address', 'pronamic_ideal' );
142
+			$pronamic_pay_errors[ 'email' ] = __( 'Please enter a valid email address', 'pronamic_ideal' );
143 143
 		}
144 144
 
145 145
 		return empty( $pronamic_pay_errors );
Please login to merge, or discard this patch.
classes/Forms/FormPostType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -307,15 +307,15 @@
 block discarded – undo
307 307
 		$data = filter_input_array( INPUT_POST, $definition );
308 308
 
309 309
 		// Convert amount choices to cents.
310
-		if ( isset( $data['_pronamic_payment_form_amount_choices'] ) ) {
311
-			foreach ( $data['_pronamic_payment_form_amount_choices'] as $i => $amount ) {
310
+		if ( isset( $data[ '_pronamic_payment_form_amount_choices' ] ) ) {
311
+			foreach ( $data[ '_pronamic_payment_form_amount_choices' ] as $i => $amount ) {
312 312
 				$amount = \Pronamic\WordPress\Pay\Core\Util::string_to_amount( $amount );
313 313
 
314
-				$data['_pronamic_payment_form_amount_choices'][ $i ] = \Pronamic\WordPress\Pay\Core\Util::amount_to_cents( $amount );
314
+				$data[ '_pronamic_payment_form_amount_choices' ][ $i ] = \Pronamic\WordPress\Pay\Core\Util::amount_to_cents( $amount );
315 315
 			}
316 316
 
317 317
 			// Remove empty choices.
318
-			$data['_pronamic_payment_form_amount_choices'] = array_filter( $data['_pronamic_payment_form_amount_choices'] );
318
+			$data[ '_pronamic_payment_form_amount_choices' ] = array_filter( $data[ '_pronamic_payment_form_amount_choices' ] );
319 319
 		}
320 320
 
321 321
 		// Update post meta data.
Please login to merge, or discard this patch.
classes/Settings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 		register_setting(
120 120
 			'pronamic_pay', 'pronamic_pay_thousands_sep', array(
121 121
 				'type'              => 'string',
122
-				'default'           => $wp_locale->number_format['thousands_sep'],
122
+				'default'           => $wp_locale->number_format[ 'thousands_sep' ],
123 123
 				'sanitize_callback' => null,
124 124
 			)
125 125
 		);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 		register_setting(
133 133
 			'pronamic_pay', 'pronamic_pay_decimal_sep', array(
134 134
 				'type'              => 'string',
135
-				'default'           => $wp_locale->number_format['decimal_point'],
135
+				'default'           => $wp_locale->number_format[ 'decimal_point' ],
136 136
 				'sanitize_callback' => null,
137 137
 			)
138 138
 		);
Please login to merge, or discard this patch.
classes/Payments/Items.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
 	 * @param Item $item The item to add.
50 50
 	 */
51 51
 	public function addItem( Item $item ) {
52
-		$this->items[] = $item;
52
+		$this->items[ ] = $item;
53 53
 	}
54 54
 
55 55
 	/**
Please login to merge, or discard this patch.
classes/Payments/PaymentsDataStoreCPT.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
 		$post_status = $this->get_post_status( $payment, null );
104 104
 
105 105
 		if ( null !== $post_status ) {
106
-			$data['post_status'] = $post_status;
106
+			$data[ 'post_status' ] = $post_status;
107 107
 		}
108 108
 
109 109
 		wp_update_post( $data );
@@ -249,11 +249,11 @@  discard block
 block discarded – undo
249 249
 		);
250 250
 
251 251
 		if ( isset( $payment->start_date ) ) {
252
-			$data['start_date'] = $payment->start_date->format( 'Y-m-d H:i:s' );
252
+			$data[ 'start_date' ] = $payment->start_date->format( 'Y-m-d H:i:s' );
253 253
 		}
254 254
 
255 255
 		if ( isset( $payment->end_date ) ) {
256
-			$data['end_date'] = $payment->end_date->format( 'Y-m-d H:i:s' );
256
+			$data[ 'end_date' ] = $payment->end_date->format( 'Y-m-d H:i:s' );
257 257
 		}
258 258
 
259 259
 		$data = array_merge( $payment->meta, $data );
Please login to merge, or discard this patch.
classes/Plugin.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -195,11 +195,11 @@  discard block
 block discarded – undo
195 195
 	 * @return array
196 196
 	 */
197 197
 	public function exclude_comment_notes( $clauses, $query ) {
198
-		$type = $query->query_vars['type'];
198
+		$type = $query->query_vars[ 'type' ];
199 199
 
200 200
 		// Ignore payment notes comments if it's not specifically requested.
201 201
 		if ( 'payment_note' !== $type ) {
202
-			$clauses['where'] .= " AND comment_type != 'payment_note'";
202
+			$clauses[ 'where' ] .= " AND comment_type != 'payment_note'";
203 203
 		}
204 204
 
205 205
 		return $clauses;
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
 			'test' => 'https://abnamro-test.ideal-payment.de/',
514 514
 			'live' => 'https://abnamro.ideal-payment.de/',
515 515
 		);
516
-		$integration->provider      = 'abnamro';
516
+		$integration->provider = 'abnamro';
517 517
 
518 518
 		$integrations[ $integration->get_id() ] = $integration;
519 519
 
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
 			'test' => 'https://myideal.test.db.com/',
541 541
 			'live' => 'https://myideal.db.com/',
542 542
 		);
543
-		$integration->provider      = 'deutschebank';
543
+		$integration->provider = 'deutschebank';
544 544
 
545 545
 		$integrations[ $integration->get_id() ] = $integration;
546 546
 
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
 					break;
950 950
 			}
951 951
 
952
-			$args['meta_query'] = array(
952
+			$args[ 'meta_query' ] = array(
953 953
 				array(
954 954
 					'key'     => '_pronamic_gateway_id',
955 955
 					'value'   => $gateways,
Please login to merge, or discard this patch.
classes/Util.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -318,13 +318,13 @@
 block discarded – undo
318 318
 
319 319
 		if ( is_array( $groups ) ) {
320 320
 			foreach ( $groups as $group ) {
321
-				$optgroup = isset( $group['name'] ) && ! empty( $group['name'] );
321
+				$optgroup = isset( $group[ 'name' ] ) && ! empty( $group[ 'name' ] );
322 322
 
323 323
 				if ( $optgroup ) {
324
-					$html .= '<optgroup label="' . $group['name'] . '">';
324
+					$html .= '<optgroup label="' . $group[ 'name' ] . '">';
325 325
 				}
326 326
 
327
-				foreach ( $group['options'] as $value => $label ) {
327
+				foreach ( $group[ 'options' ] as $value => $label ) {
328 328
 					$html .= '<option value="' . $value . '" ' . selected( $selected_value, $value, false ) . '>' . $label . '</option>';
329 329
 				}
330 330
 
Please login to merge, or discard this patch.
classes/GoogleAnalyticsEcommerce.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -228,12 +228,12 @@
 block discarded – undo
228 228
 
229 229
 		$ga = explode( '.', $ga_cookie );
230 230
 
231
-		if ( isset( $ga[2] ) && GoogleAnalyticsEcommerce::is_uuid( $ga[2] ) ) {
231
+		if ( isset( $ga[ 2 ] ) && GoogleAnalyticsEcommerce::is_uuid( $ga[ 2 ] ) ) {
232 232
 			// Use UUID from cookie.
233
-			$client_id = $ga[2];
234
-		} elseif ( isset( $ga[2], $ga[3] ) ) {
233
+			$client_id = $ga[ 2 ];
234
+		} elseif ( isset( $ga[ 2 ], $ga[ 3 ] ) ) {
235 235
 			// Older Google Client ID.
236
-			$client_id = sprintf( '%s.%s', $ga[2], $ga[3] );
236
+			$client_id = sprintf( '%s.%s', $ga[ 2 ], $ga[ 3 ] );
237 237
 		}
238 238
 
239 239
 		return $client_id;
Please login to merge, or discard this patch.
classes/Subscriptions/SubscriptionsModule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -242,11 +242,11 @@
 block discarded – undo
242 242
 	 * @return array
243 243
 	 */
244 244
 	public function exclude_subscription_comment_notes( $clauses, $query ) {
245
-		$type = $query->query_vars['type'];
245
+		$type = $query->query_vars[ 'type' ];
246 246
 
247 247
 		// Ignore subscription notes comments if it's not specifically requested.
248 248
 		if ( 'subscription_note' !== $type ) {
249
-			$clauses['where'] .= " AND comment_type != 'subscription_note'";
249
+			$clauses[ 'where' ] .= " AND comment_type != 'subscription_note'";
250 250
 		}
251 251
 
252 252
 		return $clauses;
Please login to merge, or discard this patch.