Passed
Push — develop ( c92efd...038ff5 )
by Reüel
04:32
created
classes/Subscriptions/SubscriptionsDataStoreCPT.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 		$post_status = $this->get_post_status( $subscription->get_status(), null );
99 99
 
100 100
 		if ( null !== $post_status ) {
101
-			$data['post_status'] = $post_status;
101
+			$data[ 'post_status' ] = $post_status;
102 102
 		}
103 103
 
104 104
 		wp_update_post( $data );
@@ -292,8 +292,8 @@  discard block
 block discarded – undo
292 292
 
293 293
 			$can_redirect = false;
294 294
 
295
-			do_action( 'pronamic_subscription_status_update_' . $subscription->source . '_' . $old . '_to_' . $new, $subscription, $can_redirect, $previous_status, $subscription->status );
296
-			do_action( 'pronamic_subscription_status_update_' . $subscription->source, $subscription, $can_redirect, $previous_status, $subscription->status );
295
+			do_action( 'pronamic_subscription_status_update_'.$subscription->source.'_'.$old.'_to_'.$new, $subscription, $can_redirect, $previous_status, $subscription->status );
296
+			do_action( 'pronamic_subscription_status_update_'.$subscription->source, $subscription, $can_redirect, $previous_status, $subscription->status );
297 297
 			do_action( 'pronamic_subscription_status_update', $subscription, $can_redirect, $previous_status, $subscription->status );
298 298
 		}
299 299
 	}
Please login to merge, or discard this patch.
classes/Plugin.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 	 * Handle returns.
231 231
 	 */
232 232
 	public function handle_returns() {
233
-		if ( ! filter_has_var( INPUT_GET, 'payment' ) ) {
233
+		if ( !filter_has_var( INPUT_GET, 'payment' ) ) {
234 234
 			return;
235 235
 		}
236 236
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 			$valid_key = ( $key === $payment->key );
250 250
 		}
251 251
 
252
-		if ( ! $valid_key ) {
252
+		if ( !$valid_key ) {
253 253
 			wp_redirect( home_url() );
254 254
 
255 255
 			exit;
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 	 * Maybe redirect.
278 278
 	 */
279 279
 	public function maybe_redirect() {
280
-		if ( ! filter_has_var( INPUT_GET, 'payment_redirect' ) ) {
280
+		if ( !filter_has_var( INPUT_GET, 'payment_redirect' ) ) {
281 281
 			return;
282 282
 		}
283 283
 
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 		// HTML Answer.
289 289
 		$html_answer = $payment->get_meta( 'ogone_directlink_html_answer' );
290 290
 
291
-		if ( ! empty( $html_answer ) ) {
291
+		if ( !empty( $html_answer ) ) {
292 292
 			echo $html_answer; // WPCS: XSS ok.
293 293
 
294 294
 			exit;
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 
297 297
 		$redirect_message = $payment->get_meta( 'payment_redirect_message' );
298 298
 
299
-		if ( ! empty( $redirect_message ) ) {
299
+		if ( !empty( $redirect_message ) ) {
300 300
 			$key = filter_input( INPUT_GET, 'key', FILTER_SANITIZE_STRING );
301 301
 
302 302
 			if ( $key !== $payment->key ) {
@@ -307,29 +307,29 @@  discard block
 block discarded – undo
307 307
 
308 308
 			// @see https://github.com/woothemes/woocommerce/blob/2.3.11/includes/class-wc-cache-helper.php
309 309
 			// @see https://www.w3-edge.com/products/w3-total-cache/
310
-			if ( ! defined( 'DONOTCACHEPAGE' ) ) {
310
+			if ( !defined( 'DONOTCACHEPAGE' ) ) {
311 311
 				define( 'DONOTCACHEPAGE', true );
312 312
 			}
313 313
 
314
-			if ( ! defined( 'DONOTCACHEDB' ) ) {
314
+			if ( !defined( 'DONOTCACHEDB' ) ) {
315 315
 				define( 'DONOTCACHEDB', true );
316 316
 			}
317 317
 
318
-			if ( ! defined( 'DONOTMINIFY' ) ) {
318
+			if ( !defined( 'DONOTMINIFY' ) ) {
319 319
 				define( 'DONOTMINIFY', true );
320 320
 			}
321 321
 
322
-			if ( ! defined( 'DONOTCDN' ) ) {
322
+			if ( !defined( 'DONOTCDN' ) ) {
323 323
 				define( 'DONOTCDN', true );
324 324
 			}
325 325
 
326
-			if ( ! defined( 'DONOTCACHEOBJECT' ) ) {
326
+			if ( !defined( 'DONOTCACHEOBJECT' ) ) {
327 327
 				define( 'DONOTCACHEOBJECT', true );
328 328
 			}
329 329
 
330 330
 			nocache_headers();
331 331
 
332
-			include Plugin::$dirname . '/views/redirect-message.php';
332
+			include Plugin::$dirname.'/views/redirect-message.php';
333 333
 
334 334
 			exit;
335 335
 		}
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 			}
349 349
 		}
350 350
 
351
-		if ( ! empty( $payment->action_url ) ) {
351
+		if ( !empty( $payment->action_url ) ) {
352 352
 			wp_redirect( $payment->action_url );
353 353
 
354 354
 			exit;
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 	 */
378 378
 	public function plugins_loaded() {
379 379
 		// Load plugin text domain.
380
-		$rel_path = dirname( plugin_basename( self::$file ) ) . '/languages/';
380
+		$rel_path = dirname( plugin_basename( self::$file ) ).'/languages/';
381 381
 
382 382
 		load_plugin_textdomain( 'pronamic_ideal', false, $rel_path );
383 383
 
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
 		);
472 472
 
473 473
 		if ( $payment_method ) {
474
-			$args['post__in'] = PaymentMethods::get_config_ids( $payment_method );
474
+			$args[ 'post__in' ] = PaymentMethods::get_config_ids( $payment_method );
475 475
 		}
476 476
 
477 477
 		$query = new WP_Query( $args );
@@ -512,12 +512,12 @@  discard block
 block discarded – undo
512 512
 	 * @param array $errors An array with errors to render.
513 513
 	 */
514 514
 	public static function render_errors( $errors = array() ) {
515
-		if ( ! is_array( $errors ) ) {
515
+		if ( !is_array( $errors ) ) {
516 516
 			$errors = array( $errors );
517 517
 		}
518 518
 
519 519
 		foreach ( $errors as $error ) {
520
-			include Plugin::$dirname . '/views/error.php';
520
+			include Plugin::$dirname.'/views/error.php';
521 521
 		}
522 522
 	}
523 523
 
@@ -682,10 +682,10 @@  discard block
 block discarded – undo
682 682
 		$payment->set_credit_card( $data->get_credit_card() );
683 683
 
684 684
 		// User Agent (@see https://github.com/WordPress/WordPress/blob/4.9.4/wp-includes/comment.php#L1962-L1965).
685
-		$payment->user_agent = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : null;
685
+		$payment->user_agent = isset( $_SERVER[ 'HTTP_USER_AGENT' ] ) ? $_SERVER[ 'HTTP_USER_AGENT' ] : null;
686 686
 
687 687
 		// IP (@see https://github.com/WordPress/WordPress/blob/4.9.4/wp-includes/comment.php#L1957-L1960).
688
-		$payment->user_ip = isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : null;
688
+		$payment->user_ip = isset( $_SERVER[ 'REMOTE_ADDR' ] ) ? $_SERVER[ 'REMOTE_ADDR' ] : null;
689 689
 
690 690
 		return self::start_payment( $payment, $gateway );
691 691
 	}
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
 			$subscription = $payment->get_subscription();
716 716
 
717 717
 			if ( $subscription ) {
718
-				if ( ! $payment->get_recurring() ) {
718
+				if ( !$payment->get_recurring() ) {
719 719
 					// First payment.
720 720
 					// Cancel subscription to prevent unwanted recurring payments in the future,
721 721
 					// when a valid customer ID might be set for the user.
Please login to merge, or discard this patch.
classes/Payments/PaymentsModule.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -63,11 +63,11 @@  discard block
 block discarded – undo
63 63
 	 * @return array
64 64
 	 */
65 65
 	public function exclude_payment_comment_notes( $clauses, $query ) {
66
-		$type = $query->query_vars['type'];
66
+		$type = $query->query_vars[ 'type' ];
67 67
 
68 68
 		// Ignore payment notes comments if it's not specifically requested.
69 69
 		if ( 'payment_note' !== $type ) {
70
-			$clauses['where'] .= " AND comment_type != 'payment_note'";
70
+			$clauses[ 'where' ] .= " AND comment_type != 'payment_note'";
71 71
 		}
72 72
 
73 73
 		return $clauses;
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 				break;
112 112
 		}
113 113
 
114
-		if ( ! empty( $page_id ) ) {
114
+		if ( !empty( $page_id ) ) {
115 115
 			$page_url = get_permalink( $page_id );
116 116
 
117 117
 			if ( false !== $page_url ) {
Please login to merge, or discard this patch.