Passed
Branch develop (73db2f)
by Remco
05:17
created
tests/bootstrap.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 $_tests_dir = getenv( 'WP_TESTS_DIR' );
4
-if ( ! $_tests_dir ) {
4
+if ( !$_tests_dir ) {
5 5
 	$_tests_dir = '/tmp/wordpress-tests-lib';
6 6
 }
7 7
 
8
-require_once $_tests_dir . '/includes/functions.php';
8
+require_once $_tests_dir.'/includes/functions.php';
9 9
 
10 10
 function _manually_load_plugin() {
11
-	require dirname( __FILE__ ) . '/../pronamic-ideal.php';
11
+	require dirname( __FILE__ ).'/../pronamic-ideal.php';
12 12
 }
13 13
 
14 14
 tests_add_filter( 'muplugins_loaded', '_manually_load_plugin' );
15 15
 
16
-require $_tests_dir . '/includes/bootstrap.php';
16
+require $_tests_dir.'/includes/bootstrap.php';
Please login to merge, or discard this patch.
pronamic-ideal.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
 /**
61 61
  * Autoload.
62 62
  */
63
-$loader = require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php';
63
+$loader = require_once plugin_dir_path( __FILE__ ).'vendor/autoload.php';
64 64
 
65 65
 if ( defined( 'PRONAMIC_PAY_DEBUG' ) && PRONAMIC_PAY_DEBUG ) {
66
-	foreach ( glob( __DIR__ . '/repositories/*/*/composer.json' ) as $file ) {
66
+	foreach ( glob( __DIR__.'/repositories/*/*/composer.json' ) as $file ) {
67 67
 		$content = file_get_contents( $file );
68 68
 
69 69
 		$object = json_decode( $content );
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 			foreach ( $object->autoload as $type => $map ) {
73 73
 				if ( 'psr-4' === $type ) {
74 74
 					foreach ( $map as $prefix => $path ) {
75
-						$loader->addPsr4( $prefix, dirname( $file ) . '/' . $path, true );
75
+						$loader->addPsr4( $prefix, dirname( $file ).'/'.$path, true );
76 76
 					}
77 77
 				}
78 78
 			}
Please login to merge, or discard this patch.
views/redirect-message.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
 wp_register_style(
18 18
 	'pronamic-pay-redirect',
19
-	plugins_url( 'css/redirect' . $min . '.css', Plugin::$file ),
19
+	plugins_url( 'css/redirect'.$min.'.css', Plugin::$file ),
20 20
 	array(),
21 21
 	$pronamic_ideal->get_version()
22 22
 );
Please login to merge, or discard this patch.
views/redirect-via-html.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 
17 17
 wp_register_style(
18 18
 	'pronamic-pay-redirect',
19
-	plugins_url( 'css/redirect' . $min . '.css', Plugin::$file ),
19
+	plugins_url( 'css/redirect'.$min.'.css', Plugin::$file ),
20 20
 	array(),
21 21
 	$pronamic_ideal->get_version()
22 22
 );
Please login to merge, or discard this patch.
classes/Currency.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 	public static function transform_code_to_number( $code ) {
29 29
 		$currencies = array();
30 30
 
31
-		$file = dirname( Plugin::$file ) . '/other/dl_iso_table_a1.xml';
31
+		$file = dirname( Plugin::$file ).'/other/dl_iso_table_a1.xml';
32 32
 
33 33
 		$xml = simplexml_load_file( $file );
34 34
 
Please login to merge, or discard this patch.
classes/CreditCard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
 	 * @return DateTime
122 122
 	 */
123 123
 	public function get_expiration_date() {
124
-		return new DateTime( '@' . gmmktime( 0, 0, 0, $this->expiration_month, 1, $this->expiration_year ) );
124
+		return new DateTime( '@'.gmmktime( 0, 0, 0, $this->expiration_month, 1, $this->expiration_year ) );
125 125
 	}
126 126
 
127 127
 	/**
Please login to merge, or discard this patch.
classes/Settings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 		);
53 53
 
54 54
 		foreach ( $no_trim_options as $option ) {
55
-			add_filter( 'sanitize_option_' . $option, array( $this, 'sanitize_option_dont_trim_posted_value' ), 10, 2 );
55
+			add_filter( 'sanitize_option_'.$option, array( $this, 'sanitize_option_dont_trim_posted_value' ), 10, 2 );
56 56
 		}
57 57
 	}
58 58
 
@@ -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/Subscriptions/SubscriptionsModule.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -79,15 +79,15 @@  discard block
 block discarded – undo
79 79
 	 * email notifications so users can cancel or renew their subscription.
80 80
 	 */
81 81
 	public function handle_subscription() {
82
-		if ( ! filter_has_var( INPUT_GET, 'subscription' ) ) {
82
+		if ( !filter_has_var( INPUT_GET, 'subscription' ) ) {
83 83
 			return;
84 84
 		}
85 85
 
86
-		if ( ! filter_has_var( INPUT_GET, 'action' ) ) {
86
+		if ( !filter_has_var( INPUT_GET, 'action' ) ) {
87 87
 			return;
88 88
 		}
89 89
 
90
-		if ( ! filter_has_var( INPUT_GET, 'key' ) ) {
90
+		if ( !filter_has_var( INPUT_GET, 'key' ) ) {
91 91
 			return;
92 92
 		}
93 93
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 		$key = filter_input( INPUT_GET, 'key', FILTER_SANITIZE_STRING );
100 100
 
101 101
 		// Check if subscription is valid.
102
-		if ( ! $subscription ) {
102
+		if ( !$subscription ) {
103 103
 			return;
104 104
 		}
105 105
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 				if ( Statuses::SUCCESS !== $subscription->get_status() ) {
129 129
 					$payment = $this->start_recurring( $subscription, $gateway, true );
130 130
 
131
-					if ( ! $gateway->has_error() ) {
131
+					if ( !$gateway->has_error() ) {
132 132
 						// Redirect.
133 133
 						$gateway->redirect( $payment );
134 134
 					}
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 			return;
158 158
 		}
159 159
 
160
-		if ( ! empty( $subscription->final_payment ) && $subscription->final_payment <= $subscription->next_payment ) {
160
+		if ( !empty( $subscription->final_payment ) && $subscription->final_payment <= $subscription->next_payment ) {
161 161
 			$subscription->next_payment = null;
162 162
 			$subscription->status       = Statuses::COMPLETED;
163 163
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 		$payment->start_date       = $start_date;
200 200
 		$payment->end_date         = $end_date;
201 201
 		$payment->recurring_type   = 'recurring';
202
-		$payment->recurring        = ! $renewal;
202
+		$payment->recurring        = !$renewal;
203 203
 
204 204
 		// Start payment.
205 205
 		$payment = Plugin::start_payment( $payment, $gateway );
@@ -242,11 +242,11 @@  discard block
 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;
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
 		// Check if there is already subscription attached to the payment.
273 273
 		$subscription_id = $payment->get_subscription_id();
274 274
 
275
-		if ( ! empty( $subscription_id ) ) {
275
+		if ( !empty( $subscription_id ) ) {
276 276
 			// Subscription already created.
277 277
 			return;
278 278
 		}
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 		foreach ( $query->posts as $post ) {
434 434
 			$subscription = new Subscription( $post->ID );
435 435
 
436
-			do_action( 'pronamic_subscription_renewal_notice_' . $subscription->get_source(), $subscription );
436
+			do_action( 'pronamic_subscription_renewal_notice_'.$subscription->get_source(), $subscription );
437 437
 
438 438
 			// Set next renewal date meta.
439 439
 			$next_renewal = $subscription->get_next_payment_date( 1 );
Please login to merge, or discard this patch.
classes/Subscriptions/Subscription.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
 	 * @throws \Exception    Throws an Exception when the `interval_spec` cannot be parsed as an interval.
381 381
 	 */
382 382
 	public function get_date_interval() {
383
-		$interval_spec = 'P' . $this->interval . $this->interval_period;
383
+		$interval_spec = 'P'.$this->interval.$this->interval_period;
384 384
 
385 385
 		$interval = new DateInterval( $interval_spec );
386 386
 
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 	 * @return string
510 510
 	 */
511 511
 	public function get_meta( $key ) {
512
-		$key = '_pronamic_subscription_' . $key;
512
+		$key = '_pronamic_subscription_'.$key;
513 513
 
514 514
 		return get_post_meta( $this->id, $key, true );
515 515
 	}
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
 	 * @return boolean        True on successful update, false on failure.
524 524
 	 */
525 525
 	public function set_meta( $key, $value = false ) {
526
-		$key = '_pronamic_subscription_' . $key;
526
+		$key = '_pronamic_subscription_'.$key;
527 527
 
528 528
 		if ( $value instanceof DateTime ) {
529 529
 			$value = $value->format( 'Y-m-d H:i:s' );
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 
549 549
 		if ( $payment ) {
550 550
 			$description = apply_filters( 'pronamic_payment_source_description', $description, $payment );
551
-			$description = apply_filters( 'pronamic_payment_source_description_' . $this->source, $description, $payment );
551
+			$description = apply_filters( 'pronamic_payment_source_description_'.$this->source, $description, $payment );
552 552
 		}
553 553
 
554 554
 		return $description;
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
 
567 567
 		if ( $payment ) {
568 568
 			$url = apply_filters( 'pronamic_payment_source_url', $url, $payment );
569
-			$url = apply_filters( 'pronamic_payment_source_url_' . $this->source, $url, $payment );
569
+			$url = apply_filters( 'pronamic_payment_source_url_'.$this->source, $url, $payment );
570 570
 		}
571 571
 
572 572
 		return $url;
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
 		$payments = $this->get_payments();
642 642
 
643 643
 		if ( count( $payments ) > 0 ) {
644
-			return $payments[0];
644
+			return $payments[ 0 ];
645 645
 		}
646 646
 
647 647
 		return null;
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
 				if ( Statuses::OPEN !== $meta_status ) {
912 912
 					$this->refresh_next_payment_date();
913 913
 
914
-					if ( ! $note ) {
914
+					if ( !$note ) {
915 915
 						$this->add_note( __( "Subscription status changed to 'Open'", 'pronamic_ideal' ) );
916 916
 					}
917 917
 				}
@@ -923,14 +923,14 @@  discard block
 block discarded – undo
923 923
 				if ( Statuses::SUCCESS !== $meta_status ) {
924 924
 					$this->refresh_next_payment_date();
925 925
 
926
-					if ( ! $note ) {
926
+					if ( !$note ) {
927 927
 						$this->add_note( __( "Subscription status changed to 'Active'", 'pronamic_ideal' ) );
928 928
 					}
929 929
 				}
930 930
 
931 931
 				break;
932 932
 			case Statuses::FAILURE:
933
-				if ( ! $note ) {
933
+				if ( !$note ) {
934 934
 					$this->add_note( __( "Subscription status changed to 'Failed'", 'pronamic_ideal' ) );
935 935
 				}
936 936
 
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
 			case Statuses::CANCELLED:
939 939
 				$this->set_next_payment_date( false );
940 940
 
941
-				if ( ! $note ) {
941
+				if ( !$note ) {
942 942
 					$this->add_note( __( "Subscription status changed to 'Cancelled'", 'pronamic_ideal' ) );
943 943
 				}
944 944
 
@@ -947,7 +947,7 @@  discard block
 block discarded – undo
947 947
 				$this->set_next_payment_date( false );
948 948
 				$this->set_start_date( false );
949 949
 
950
-				if ( ! $note ) {
950
+				if ( !$note ) {
951 951
 					$this->add_note( __( "Subscription status changed to 'Completed'", 'pronamic_ideal' ) );
952 952
 				}
953 953
 
@@ -968,7 +968,7 @@  discard block
 block discarded – undo
968 968
 	 * @param array $meta The meta data to update.
969 969
 	 */
970 970
 	public function update_meta( $meta ) {
971
-		if ( ! is_array( $meta ) || count( $meta ) === 0 ) {
971
+		if ( !is_array( $meta ) || count( $meta ) === 0 ) {
972 972
 			return;
973 973
 		}
974 974
 
Please login to merge, or discard this patch.