Passed
Push — develop ( 22778e...6d9cbe )
by Remco
05:17 queued 01:22
created
classes/Admin/GatewaySettings.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 		$classes = apply_filters( 'pronamic_pay_gateway_settings', array() );
40 40
 
41 41
 		foreach ( $classes as $class ) {
42
-			$this->settings[] = new $class();
42
+			$this->settings[ ] = new $class();
43 43
 		}
44 44
 	}
45 45
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 			$gateway_id = get_post_meta( $config_id, '_pronamic_gateway_id', true );
66 66
 
67 67
 			// Payment methods.
68
-			$sections['payment_methods'] = array(
68
+			$sections[ 'payment_methods' ] = array(
69 69
 				'title'       => __( 'Payment Methods', 'pronamic_ideal' ),
70 70
 				'methods'     => array(
71 71
 					$gateway_id,
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 		);
107 107
 
108 108
 		// Payment methods.
109
-		$fields[] = array(
109
+		$fields[ ] = array(
110 110
 			'section'  => 'payment_methods',
111 111
 			'type'     => 'html',
112 112
 			'callback' => array( $this, 'gateway_payment_methods' ),
@@ -149,6 +149,6 @@  discard block
 block discarded – undo
149 149
 
150 150
 		array_multisort( $sort, $sort_flags, $payment_methods );
151 151
 
152
-		require Plugin::$dirname . '/admin/meta-box-gateway-config-payment-methods.php';
152
+		require Plugin::$dirname.'/admin/meta-box-gateway-config-payment-methods.php';
153 153
 	}
154 154
 }
Please login to merge, or discard this patch.
classes/Admin/GatewayPostType.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -37,15 +37,15 @@  discard block
 block discarded – undo
37 37
 	public function __construct( AdminModule $admin ) {
38 38
 		$this->admin = $admin;
39 39
 
40
-		add_filter( 'manage_edit-' . self::POST_TYPE . '_columns', array( $this, 'edit_columns' ) );
40
+		add_filter( 'manage_edit-'.self::POST_TYPE.'_columns', array( $this, 'edit_columns' ) );
41 41
 
42
-		add_action( 'manage_' . self::POST_TYPE . '_posts_custom_column', array( $this, 'custom_columns' ), 10, 2 );
42
+		add_action( 'manage_'.self::POST_TYPE.'_posts_custom_column', array( $this, 'custom_columns' ), 10, 2 );
43 43
 
44 44
 		add_action( 'post_edit_form_tag', array( $this, 'post_edit_form_tag' ) );
45 45
 
46 46
 		add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
47 47
 
48
-		add_action( 'save_post_' . self::POST_TYPE, array( $this, 'save_post' ) );
48
+		add_action( 'save_post_'.self::POST_TYPE, array( $this, 'save_post' ) );
49 49
 
50 50
 		add_action( 'display_post_states', array( $this, 'display_post_states' ), 10, 2 );
51 51
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 							$name = __( 'Dashboard', 'pronamic_ideal' );
144 144
 						}
145 145
 
146
-						$content[] = sprintf(
146
+						$content[ ] = sprintf(
147 147
 							'<a href="%s" target="_blank">%s</a>',
148 148
 							esc_attr( $url ),
149 149
 							esc_html( ucfirst( $name ) )
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 		}
170 170
 
171 171
 		if ( intval( get_option( 'pronamic_pay_config_id' ) ) === $post->ID ) {
172
-			$post_states['pronamic_pay_config_default'] = __( 'Default', 'pronamic_ideal' );
172
+			$post_states[ 'pronamic_pay_config_default' ] = __( 'Default', 'pronamic_ideal' );
173 173
 		}
174 174
 
175 175
 		return $post_states;
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 	public function meta_box_config( $post ) {
231 231
 		wp_nonce_field( 'pronamic_pay_save_gateway', 'pronamic_pay_nonce' );
232 232
 
233
-		include Plugin::$dirname . '/admin/meta-box-gateway-config.php';
233
+		include Plugin::$dirname.'/admin/meta-box-gateway-config.php';
234 234
 	}
235 235
 
236 236
 	/**
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 	 * @param WP_Post $post The object for the current post/page.
240 240
 	 */
241 241
 	public function meta_box_test( $post ) {
242
-		include Plugin::$dirname . '/admin/meta-box-gateway-test.php';
242
+		include Plugin::$dirname.'/admin/meta-box-gateway-test.php';
243 243
 	}
244 244
 
245 245
 	/**
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 	 */
250 250
 	public function save_post( $post_id ) {
251 251
 		// Nonce.
252
-		if ( ! filter_has_var( INPUT_POST, 'pronamic_pay_nonce' ) ) {
252
+		if ( !filter_has_var( INPUT_POST, 'pronamic_pay_nonce' ) ) {
253 253
 			return $post_id;
254 254
 		}
255 255
 
@@ -269,9 +269,9 @@  discard block
 block discarded – undo
269 269
 		);
270 270
 
271 271
 		foreach ( $fields as $field ) {
272
-			if ( isset( $field['meta_key'], $field['filter'] ) ) {
273
-				$name   = $field['meta_key'];
274
-				$filter = $field['filter'];
272
+			if ( isset( $field[ 'meta_key' ], $field[ 'filter' ] ) ) {
273
+				$name   = $field[ 'meta_key' ];
274
+				$filter = $field[ 'filter' ];
275 275
 
276 276
 				$definition[ $name ] = $filter;
277 277
 			}
@@ -279,28 +279,28 @@  discard block
 block discarded – undo
279 279
 
280 280
 		$data = filter_input_array( INPUT_POST, $definition );
281 281
 
282
-		if ( ! empty( $data['_pronamic_gateway_id'] ) ) {
282
+		if ( !empty( $data[ '_pronamic_gateway_id' ] ) ) {
283 283
 			$integrations = $this->admin->plugin->gateway_integrations;
284 284
 
285
-			if ( isset( $integrations[ $data['_pronamic_gateway_id'] ] ) ) {
286
-				$integration = $integrations[ $data['_pronamic_gateway_id'] ];
285
+			if ( isset( $integrations[ $data[ '_pronamic_gateway_id' ] ] ) ) {
286
+				$integration = $integrations[ $data[ '_pronamic_gateway_id' ] ];
287 287
 			}
288 288
 
289 289
 			if ( $integration ) {
290 290
 				$settings = $integration->get_settings();
291 291
 
292 292
 				foreach ( $fields as $field ) {
293
-					if ( isset( $field['default'], $field['meta_key'], $data[ $field['meta_key'] ] ) ) {
293
+					if ( isset( $field[ 'default' ], $field[ 'meta_key' ], $data[ $field[ 'meta_key' ] ] ) ) {
294 294
 						// Remove default value if not applicable to the selected gateway.
295
-						if ( isset( $field['methods'] ) ) {
296
-							$clean_default = array_intersect( $settings, $field['methods'] );
295
+						if ( isset( $field[ 'methods' ] ) ) {
296
+							$clean_default = array_intersect( $settings, $field[ 'methods' ] );
297 297
 
298 298
 							if ( empty( $clean_default ) ) {
299
-								$meta_value = get_post_meta( $post_id, $field['meta_key'], true );
299
+								$meta_value = get_post_meta( $post_id, $field[ 'meta_key' ], true );
300 300
 
301 301
 								// Only remove value if not saved before.
302 302
 								if ( empty( $meta_value ) ) {
303
-									$data[ $field['meta_key'] ] = null;
303
+									$data[ $field[ 'meta_key' ] ] = null;
304 304
 
305 305
 									continue;
306 306
 								}
@@ -308,13 +308,13 @@  discard block
 block discarded – undo
308 308
 						}
309 309
 
310 310
 						// Set the default value if empty.
311
-						if ( empty( $data[ $field['meta_key'] ] ) ) {
312
-							$default = $field['default'];
311
+						if ( empty( $data[ $field[ 'meta_key' ] ] ) ) {
312
+							$default = $field[ 'default' ];
313 313
 
314
-							if ( is_array( $default ) && 2 === count( $default ) && Util::class_method_exists( $default[0], $default[1] ) ) {
315
-								$data[ $field['meta_key'] ] = call_user_func( $default, $field );
314
+							if ( is_array( $default ) && 2 === count( $default ) && Util::class_method_exists( $default[ 0 ], $default[ 1 ] ) ) {
315
+								$data[ $field[ 'meta_key' ] ] = call_user_func( $default, $field );
316 316
 							} else {
317
-								$data[ $field['meta_key'] ] = $default;
317
+								$data[ $field[ 'meta_key' ] ] = $default;
318 318
 							}
319 319
 						}
320 320
 					}
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 				// Filter data through gateway integration settings.
324 324
 				$settings_classes = $integration->get_settings_class();
325 325
 
326
-				if ( ! is_array( $settings_classes ) ) {
326
+				if ( !is_array( $settings_classes ) ) {
327 327
 					$settings_classes = array( $settings_classes );
328 328
 				}
329 329
 
@@ -339,8 +339,8 @@  discard block
 block discarded – undo
339 339
 		pronamic_pay_update_post_meta_data( $post_id, $data );
340 340
 
341 341
 		// Transient.
342
-		delete_transient( 'pronamic_pay_issuers_' . $post_id );
343
-		delete_transient( 'pronamic_gateway_payment_methods_' . $post_id );
342
+		delete_transient( 'pronamic_pay_issuers_'.$post_id );
343
+		delete_transient( 'pronamic_gateway_payment_methods_'.$post_id );
344 344
 
345 345
 		PaymentMethods::update_active_payment_methods();
346 346
 	}
@@ -364,14 +364,14 @@  discard block
 block discarded – undo
364 364
 			0  => '', // Unused. Messages start at index 1.
365 365
 			1  => __( 'Configuration updated.', 'pronamic_ideal' ),
366 366
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352799&filters[translation_id]=37947229
367
-			2  => $messages['post'][2],
367
+			2  => $messages[ 'post' ][ 2 ],
368 368
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352800&filters[translation_id]=37947870
369
-			3  => $messages['post'][3],
369
+			3  => $messages[ 'post' ][ 3 ],
370 370
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352798&filters[translation_id]=37947230
371 371
 			4  => __( 'Configuration updated.', 'pronamic_ideal' ),
372 372
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352801&filters[translation_id]=37947231
373 373
 			// translators: %s: date and time of the revision.
374
-			5  => isset( $_GET['revision'] ) ? sprintf( __( 'Configuration restored to revision from %s.', 'pronamic_ideal' ), wp_post_revision_title( (int) $_GET['revision'], false ) ) : false, // WPCS: CSRF ok.
374
+			5  => isset( $_GET[ 'revision' ] ) ? sprintf( __( 'Configuration restored to revision from %s.', 'pronamic_ideal' ), wp_post_revision_title( (int) $_GET[ 'revision' ], false ) ) : false, // WPCS: CSRF ok.
375 375
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352802&filters[translation_id]=37949178
376 376
 			6  => __( 'Configuration published.', 'pronamic_ideal' ),
377 377
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352803&filters[translation_id]=37947232
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352804&filters[translation_id]=37949303
380 380
 			8  => __( 'Configuration submitted.', 'pronamic_ideal' ),
381 381
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352805&filters[translation_id]=37949302
382
-			9  => sprintf( __( 'Configuration scheduled for: %s.', 'pronamic_ideal' ), '<strong>' . $scheduled_date . '</strong>' ),
382
+			9  => sprintf( __( 'Configuration scheduled for: %s.', 'pronamic_ideal' ), '<strong>'.$scheduled_date.'</strong>' ),
383 383
 			// @https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352806&filters[translation_id]=37949301
384 384
 			10 => __( 'Configuration draft updated.', 'pronamic_ideal' ),
385 385
 		);
Please login to merge, or discard this patch.
admin/meta-box-gateway-config-payment-methods.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@
 block discarded – undo
19 19
 	foreach ( $payment_methods as $payment_method => $details ) {
20 20
 		$class = $payment_method;
21 21
 
22
-		if ( $details['available'] ) {
22
+		if ( $details[ 'available' ] ) {
23 23
 			$class .= ' available';
24 24
 		}
25 25
 
26 26
 		printf(
27 27
 			'<li class="%1$s"><span class="pronamic-pay-icon pronamic-pay-icon-completed"></span> %2$s</li>',
28 28
 			esc_attr( $class ),
29
-			esc_html( $details['name'] )
29
+			esc_html( $details[ 'name' ] )
30 30
 		);
31 31
 	}
32 32
 
Please login to merge, or discard this patch.
classes/Admin/SubscriptionPostType.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -31,10 +31,10 @@  discard block
 block discarded – undo
31 31
 	public function __construct() {
32 32
 		add_filter( 'request', array( $this, 'request' ) );
33 33
 
34
-		add_filter( 'manage_edit-' . self::POST_TYPE . '_columns', array( $this, 'columns' ) );
35
-		add_filter( 'manage_edit-' . self::POST_TYPE . '_sortable_columns', array( $this, 'sortable_columns' ) );
34
+		add_filter( 'manage_edit-'.self::POST_TYPE.'_columns', array( $this, 'columns' ) );
35
+		add_filter( 'manage_edit-'.self::POST_TYPE.'_sortable_columns', array( $this, 'sortable_columns' ) );
36 36
 
37
-		add_action( 'manage_' . self::POST_TYPE . '_posts_custom_column', array( $this, 'custom_columns' ), 10, 2 );
37
+		add_action( 'manage_'.self::POST_TYPE.'_posts_custom_column', array( $this, 'custom_columns' ), 10, 2 );
38 38
 
39 39
 		add_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );
40 40
 
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
 		$screen = get_current_screen();
57 57
 
58 58
 		if ( self::POST_TYPE === $screen->post_type ) {
59
-			if ( ! isset( $vars['post_status'] ) ) {
60
-				$vars['post_status'] = array_keys( \Pronamic\WordPress\Pay\Plugin::get_subscription_states() );
59
+			if ( !isset( $vars[ 'post_status' ] ) ) {
60
+				$vars[ 'post_status' ] = array_keys( \Pronamic\WordPress\Pay\Plugin::get_subscription_states() );
61 61
 
62
-				$vars['post_status'][] = 'publish';
62
+				$vars[ 'post_status' ][ ] = 'publish';
63 63
 			}
64 64
 		}
65 65
 
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
 	 * @return array
98 98
 	 */
99 99
 	public function sortable_columns( $sortable_columns ) {
100
-		$sortable_columns['pronamic_subscription_title'] = 'ID';
101
-		$sortable_columns['pronamic_subscription_date']  = 'date';
100
+		$sortable_columns[ 'pronamic_subscription_title' ] = 'ID';
101
+		$sortable_columns[ 'pronamic_subscription_date' ]  = 'date';
102 102
 
103 103
 		return $sortable_columns;
104 104
 	}
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 				$source_id          = $subscription->get_source_id();
142 142
 				$source_description = $subscription->get_source_description();
143 143
 
144
-				$source_id_text = '#' . $source_id;
144
+				$source_id_text = '#'.$source_id;
145 145
 
146 146
 				$source_link = $subscription->get_source_link();
147 147
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 					$config_id = get_post_meta( $payment->get_id(), '_pronamic_payment_config_id', true );
182 182
 				}
183 183
 
184
-				if ( isset( $config_id ) && ! empty( $config_id ) ) {
184
+				if ( isset( $config_id ) && !empty( $config_id ) ) {
185 185
 					echo get_the_title( $config_id );
186 186
 				} else {
187 187
 					echo '—';
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
 	 * @param WP_Post $post The object for the current post/page.
306 306
 	 */
307 307
 	public function meta_box_info( $post ) {
308
-		include \Pronamic\WordPress\Pay\Plugin::$dirname . '/admin/meta-box-subscription-info.php';
308
+		include \Pronamic\WordPress\Pay\Plugin::$dirname.'/admin/meta-box-subscription-info.php';
309 309
 	}
310 310
 
311 311
 	/**
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 			)
322 322
 		);
323 323
 
324
-		include \Pronamic\WordPress\Pay\Plugin::$dirname . '/admin/meta-box-notes.php';
324
+		include \Pronamic\WordPress\Pay\Plugin::$dirname.'/admin/meta-box-notes.php';
325 325
 	}
326 326
 
327 327
 	/**
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 	 * @param WP_Post $post The object for the current post/page.
331 331
 	 */
332 332
 	public function meta_box_payments( $post ) {
333
-		include \Pronamic\WordPress\Pay\Plugin::$dirname . '/admin/meta-box-subscription-payments.php';
333
+		include \Pronamic\WordPress\Pay\Plugin::$dirname.'/admin/meta-box-subscription-payments.php';
334 334
 	}
335 335
 
336 336
 	/**
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 	public function meta_box_update( $post ) {
342 342
 		wp_nonce_field( 'pronamic_subscription_update', 'pronamic_subscription_update_nonce' );
343 343
 
344
-		include \Pronamic\WordPress\Pay\Plugin::$dirname . '/admin/meta-box-subscription-update.php';
344
+		include \Pronamic\WordPress\Pay\Plugin::$dirname.'/admin/meta-box-subscription-update.php';
345 345
 	}
346 346
 
347 347
 	/**
@@ -390,11 +390,11 @@  discard block
 block discarded – undo
390 390
 	 * @param \WP_Post $post       WordPress post.
391 391
 	 */
392 392
 	public function transition_post_status( $new_status, $old_status, $post ) {
393
-		if ( ! filter_has_var( INPUT_POST, 'pronamic_subscription_update_nonce' ) ) {
393
+		if ( !filter_has_var( INPUT_POST, 'pronamic_subscription_update_nonce' ) ) {
394 394
 			return;
395 395
 		}
396 396
 
397
-		if ( ! check_admin_referer( 'pronamic_subscription_update', 'pronamic_subscription_update_nonce' ) ) {
397
+		if ( !check_admin_referer( 'pronamic_subscription_update', 'pronamic_subscription_update_nonce' ) ) {
398 398
 			return;
399 399
 		}
400 400
 
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
@@ -82,15 +82,15 @@  discard block
 block discarded – undo
82 82
 	 * email notifications so users can cancel or renew their subscription.
83 83
 	 */
84 84
 	public function handle_subscription() {
85
-		if ( ! filter_has_var( INPUT_GET, 'subscription' ) ) {
85
+		if ( !filter_has_var( INPUT_GET, 'subscription' ) ) {
86 86
 			return;
87 87
 		}
88 88
 
89
-		if ( ! filter_has_var( INPUT_GET, 'action' ) ) {
89
+		if ( !filter_has_var( INPUT_GET, 'action' ) ) {
90 90
 			return;
91 91
 		}
92 92
 
93
-		if ( ! filter_has_var( INPUT_GET, 'key' ) ) {
93
+		if ( !filter_has_var( INPUT_GET, 'key' ) ) {
94 94
 			return;
95 95
 		}
96 96
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 		$key = filter_input( INPUT_GET, 'key', FILTER_SANITIZE_STRING );
103 103
 
104 104
 		// Check if subscription is valid.
105
-		if ( ! $subscription ) {
105
+		if ( !$subscription ) {
106 106
 			return;
107 107
 		}
108 108
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 				if ( Statuses::SUCCESS !== $subscription->get_status() ) {
132 132
 					$payment = $this->start_recurring( $subscription, $gateway, true );
133 133
 
134
-					if ( ! $gateway->has_error() ) {
134
+					if ( !$gateway->has_error() ) {
135 135
 						// Redirect.
136 136
 						$gateway->redirect( $payment );
137 137
 					}
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 		$payment->start_date       = $start_date;
201 201
 		$payment->end_date         = $end_date;
202 202
 		$payment->recurring_type   = 'recurring';
203
-		$payment->recurring        = ! $renewal;
203
+		$payment->recurring        = !$renewal;
204 204
 
205 205
 		// Start payment.
206 206
 		$payment = Plugin::start_payment( $payment, $gateway );
@@ -243,11 +243,11 @@  discard block
 block discarded – undo
243 243
 	 * @return array
244 244
 	 */
245 245
 	public function exclude_subscription_comment_notes( $clauses, $query ) {
246
-		$type = $query->query_vars['type'];
246
+		$type = $query->query_vars[ 'type' ];
247 247
 
248 248
 		// Ignore subscription notes comments if it's not specifically requested.
249 249
 		if ( 'subscription_note' !== $type ) {
250
-			$clauses['where'] .= " AND comment_type != 'subscription_note'";
250
+			$clauses[ 'where' ] .= " AND comment_type != 'subscription_note'";
251 251
 		}
252 252
 
253 253
 		return $clauses;
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 		// Check if there is already subscription attached to the payment.
274 274
 		$subscription_id = $payment->get_subscription_id();
275 275
 
276
-		if ( ! empty( $subscription_id ) ) {
276
+		if ( !empty( $subscription_id ) ) {
277 277
 			// Subscription already created.
278 278
 			return;
279 279
 		}
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
 				delete_post_meta( $post->ID, '_pronamic_subscription_renewal_sent_1week' );
478 478
 			}
479 479
 
480
-			do_action( 'pronamic_subscription_renewal_notice_' . $subscription->get_source(), $subscription );
480
+			do_action( 'pronamic_subscription_renewal_notice_'.$subscription->get_source(), $subscription );
481 481
 
482 482
 			update_post_meta( $post->ID, '_pronamic_subscription_renewal_sent_1week', $start_date->format( DateTime::MYSQL ) );
483 483
 		}
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
 		}
523 523
 
524 524
 		// The status of canceled or completed subscriptions will not be changed automatically.
525
-		if ( ! in_array( $status_before, array( Statuses::CANCELLED, Statuses::COMPLETED ), true ) ) {
525
+		if ( !in_array( $status_before, array( Statuses::CANCELLED, Statuses::COMPLETED ), true ) ) {
526 526
 			$subscription->set_status( $status_update );
527 527
 		}
528 528
 
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.
src/readme-md/README.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 [![Code Intelligence Status](https://scrutinizer-ci.com/g/pronamic/wp-pronamic-ideal/badges/code-intelligence.svg?b=develop)](https://scrutinizer-ci.com/code-intelligence)
21 21
 [![codecov](https://codecov.io/gh/pronamic/wp-pronamic-ideal/branch/develop/graph/badge.svg)](https://codecov.io/gh/pronamic/wp-pronamic-ideal)
22 22
 
23
-<?php include __DIR__ . '/../general/description-short.php'; ?>
23
+<?php include __DIR__.'/../general/description-short.php'; ?>
24 24
 
25 25
 
26 26
 ## Gateways
@@ -43,4 +43,4 @@  discard block
 block discarded – undo
43 43
 
44 44
 ## Links
45 45
 
46
-<?php include __DIR__ . '/../general/links.php'; ?>
46
+<?php include __DIR__.'/../general/links.php'; ?>
Please login to merge, or discard this patch.
admin/tab-system_status.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 				$timestamp = wp_next_scheduled( 'pronamic_pay_license_check' );
59 59
 
60 60
 				if ( false !== $timestamp ) {
61
-					$date = new \Pronamic\WordPress\Pay\DateTime( '@' . $timestamp, new DateTimeZone( 'UTC' ) );
61
+					$date = new \Pronamic\WordPress\Pay\DateTime( '@'.$timestamp, new DateTimeZone( 'UTC' ) );
62 62
 
63 63
 					echo esc_html( $date->format_i18n() );
64 64
 				} else {
@@ -245,8 +245,8 @@  discard block
 block discarded – undo
245 245
 					$version = curl_version();
246 246
 					// @codingStandardsIgnoreEnd
247 247
 
248
-					if ( isset( $version['version'] ) ) {
249
-						echo esc_html( $version['version'] );
248
+					if ( isset( $version[ 'version' ] ) ) {
249
+						echo esc_html( $version[ 'version' ] );
250 250
 					}
251 251
 				}
252 252
 
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 
337 337
 $data = get_transient( 'pronamic_pay_ideal_issuers_status' );
338 338
 
339
-if ( ! $data ) {
339
+if ( !$data ) {
340 340
 
341 341
 	$url = 'http://www.ideal-status.nl/static/issuers_current.json';
342 342
 
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 
345 345
 	$status_data = null;
346 346
 
347
-	if ( ! is_wp_error( $response ) ) {
347
+	if ( !is_wp_error( $response ) ) {
348 348
 		if ( 200 === wp_remote_retrieve_response_code( $response ) ) {
349 349
 			$body = wp_remote_retrieve_body( $response );
350 350
 
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
 
410 410
 			<?php foreach ( $data as $status ) : ?>
411 411
 
412
-				<?php $alternate = ! $alternate; ?>
412
+				<?php $alternate = !$alternate; ?>
413 413
 
414 414
 				<tr<?php if ( $alternate ) : ?> class="alternate"<?php endif; ?>>
415 415
 					<td>
Please login to merge, or discard this patch.