Passed
Push — develop ( 246341...deb241 )
by Remco
04:52
created
classes/Payments/PaymentData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@
 block discarded – undo
223 223
 	 * @return string
224 224
 	 */
225 225
 	public function get_subscription_id() {
226
-		if ( ! $this->get_subscription() ) {
226
+		if ( !$this->get_subscription() ) {
227 227
 			return;
228 228
 		}
229 229
 
Please login to merge, or discard this patch.
classes/Subscriptions/SubscriptionsDataStoreCPT.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 
100 100
 		$post_status = $this->get_post_status( $subscription->get_status() );
101 101
 
102
-		if ( ! empty( $post_status ) ) {
103
-			$data['post_status'] = $post_status;
102
+		if ( !empty( $post_status ) ) {
103
+			$data[ 'post_status' ] = $post_status;
104 104
 		}
105 105
 
106 106
 		wp_update_post( $data );
@@ -294,8 +294,8 @@  discard block
 block discarded – undo
294 294
 
295 295
 			$can_redirect = false;
296 296
 
297
-			do_action( 'pronamic_subscription_status_update_' . $subscription->source . '_' . $old . '_to_' . $new, $subscription, $can_redirect, $previous_status, $subscription->status );
298
-			do_action( 'pronamic_subscription_status_update_' . $subscription->source, $subscription, $can_redirect, $previous_status, $subscription->status );
297
+			do_action( 'pronamic_subscription_status_update_'.$subscription->source.'_'.$old.'_to_'.$new, $subscription, $can_redirect, $previous_status, $subscription->status );
298
+			do_action( 'pronamic_subscription_status_update_'.$subscription->source, $subscription, $can_redirect, $previous_status, $subscription->status );
299 299
 			do_action( 'pronamic_subscription_status_update', $subscription, $can_redirect, $previous_status, $subscription->status );
300 300
 		}
301 301
 	}
Please login to merge, or discard this patch.
admin/meta-box-gateway-test.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	// Payment method input HTML.
44 44
 	$html = $gateway->get_input_html();
45 45
 
46
-	if ( ! empty( $html ) ) {
46
+	if ( !empty( $html ) ) {
47 47
 		$inputs[ $payment_method ] = array(
48 48
 			'label' => $method_name,
49 49
 			'html'  => $html,
@@ -52,10 +52,10 @@  discard block
 block discarded – undo
52 52
 }
53 53
 
54 54
 if ( $gateway->has_error() ) {
55
-	$pronamic_ideal_errors[] = $gateway->get_error();
55
+	$pronamic_ideal_errors[ ] = $gateway->get_error();
56 56
 }
57 57
 
58
-require Plugin::$dirname . '/views/errors.php';
58
+require Plugin::$dirname.'/views/errors.php';
59 59
 
60 60
 ?>
61 61
 <table class="form-table">
@@ -87,12 +87,12 @@  discard block
 block discarded – undo
87 87
 
88 88
 		<tr class="pronamic-pay-cloack pronamic-pay-test-payment-method <?php echo esc_attr( $method ); ?>">
89 89
 			<th scope="row">
90
-				<?php echo esc_html( $input['label'] ); ?>
90
+				<?php echo esc_html( $input[ 'label' ] ); ?>
91 91
 			</th>
92 92
 			<td>
93 93
 				<?php
94 94
 
95
-				echo $input['html']; // WPCS: XSS ok.
95
+				echo $input[ 'html' ]; // WPCS: XSS ok.
96 96
 
97 97
 				?>
98 98
 			</td>
@@ -304,5 +304,5 @@  discard block
 block discarded – undo
304 304
 <?php
305 305
 
306 306
 if ( $is_ideal || $gateway instanceof \Pronamic\WordPress\Pay\Gateways\OmniKassa2\Gateway ) {
307
-	include Plugin::$dirname . '/views/ideal-test-cases.php';
307
+	include Plugin::$dirname.'/views/ideal-test-cases.php';
308 308
 }
Please login to merge, or discard this patch.
pronamic-ideal.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,14 +60,14 @@  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
-if ( ! defined( 'PRONAMIC_PAY_DEBUG' ) ) {
65
+if ( !defined( 'PRONAMIC_PAY_DEBUG' ) ) {
66 66
 	define( 'PRONAMIC_PAY_DEBUG', false );
67 67
 }
68 68
 
69 69
 if ( PRONAMIC_PAY_DEBUG ) {
70
-	foreach ( glob( __DIR__ . '/repositories/*/*/composer.json' ) as $file ) {
70
+	foreach ( glob( __DIR__.'/repositories/*/*/composer.json' ) as $file ) {
71 71
 		$content = file_get_contents( $file );
72 72
 
73 73
 		$object = json_decode( $content );
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 			foreach ( $object->autoload as $type => $map ) {
77 77
 				if ( 'psr-4' === $type ) {
78 78
 					foreach ( $map as $prefix => $path ) {
79
-						$loader->addPsr4( $prefix, dirname( $file ) . '/' . $path, true );
79
+						$loader->addPsr4( $prefix, dirname( $file ).'/'.$path, true );
80 80
 					}
81 81
 				}
82 82
 			}
Please login to merge, or discard this patch.
src/check-versions.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -5,23 +5,23 @@  discard block
 block discarded – undo
5 5
 /**
6 6
  * Autoload.
7 7
  */
8
-$loader = require_once $root_dir . '/vendor/autoload.php';
8
+$loader = require_once $root_dir.'/vendor/autoload.php';
9 9
 
10 10
 /**
11 11
  * Package.
12 12
  */
13
-$data = file_get_contents( $root_dir . '/package.json' );
13
+$data = file_get_contents( $root_dir.'/package.json' );
14 14
 $pkg  = json_decode( $data );
15 15
 
16 16
 // Check readme.txt
17 17
 // @see https://github.com/WordPress/WordPress/blob/4.9/wp-includes/functions.php#L4810-L4868
18 18
 $filename = 'readme.txt';
19 19
 
20
-$readme_txt_lines = file( $root_dir . '/' . $filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES );
20
+$readme_txt_lines = file( $root_dir.'/'.$filename, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES );
21 21
 
22 22
 $search_string = sprintf( 'Stable tag: %s', $pkg->version );
23 23
 
24
-if ( ! in_array( $search_string, $readme_txt_lines, true ) ) {
24
+if ( !in_array( $search_string, $readme_txt_lines, true ) ) {
25 25
 	printf( '❌  ' );
26 26
 	printf( 'Could not find "%s" in file "%s".', $search_string, $filename );
27 27
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 // @see https://github.com/WordPress/WordPress/blob/4.9/wp-includes/functions.php#L4810-L4868
39 39
 $filename = 'pronamic-ideal.php';
40 40
 
41
-$plugin_file = file_get_contents( $root_dir . '/' . $filename );
41
+$plugin_file = file_get_contents( $root_dir.'/'.$filename );
42 42
 
43 43
 $file_header = '';
44 44
 
@@ -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;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
 $search_string = sprintf( 'Version: %s', $pkg->version );
68 68
 
69
-if ( ! in_array( $search_string, $file_header_lines, true ) ) {
69
+if ( !in_array( $search_string, $file_header_lines, true ) ) {
70 70
 	printf( '❌  ' );
71 71
 	printf( 'Could not find "%s" in file "%s".', $search_string, $filename );
72 72
 
@@ -83,21 +83,21 @@  discard block
 block discarded – undo
83 83
 
84 84
 $default_properties = $plugin_class_reflection->getDefaultProperties();
85 85
 
86
-if ( ! array_key_exists( 'version', $default_properties ) ) {
86
+if ( !array_key_exists( 'version', $default_properties ) ) {
87 87
 	printf( '❌  ' );
88 88
 	printf( 'Could not find "version" property in class "%s".', $plugin_class_reflection->getName() );
89 89
 
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.
classes/Forms/FormsModule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 	 * @return string
70 70
 	 */
71 71
 	public function get_form_output( $id ) {
72
-		$file = plugin_dir_path( $this->plugin->get_file() ) . 'templates/form.php';
72
+		$file = plugin_dir_path( $this->plugin->get_file() ).'templates/form.php';
73 73
 
74 74
 		ob_start();
75 75
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 	 * @return string
89 89
 	 */
90 90
 	public function source_text( $text, Payment $payment ) {
91
-		$text = __( 'Payment Form', 'pronamic_ideal' ) . '<br />';
91
+		$text = __( 'Payment Form', 'pronamic_ideal' ).'<br />';
92 92
 
93 93
 		$text .= sprintf(
94 94
 			'<a href="%s">%s</a>',
Please login to merge, or discard this patch.
classes/Admin/AdminTour.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 			update_user_meta( get_current_user_id(), 'pronamic_pay_ignore_tour', $ignore );
47 47
 		}
48 48
 
49
-		if ( ! get_user_meta( get_current_user_id(), 'pronamic_pay_ignore_tour', true ) ) {
49
+		if ( !get_user_meta( get_current_user_id(), 'pronamic_pay_ignore_tour', true ) ) {
50 50
 			add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );
51 51
 		}
52 52
 	}
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		// Pointers.
61 61
 		wp_register_style(
62 62
 			'proanmic-pay-admin-tour',
63
-			plugins_url( 'css/admin-tour' . $min . '.css', $this->plugin->get_file() ),
63
+			plugins_url( 'css/admin-tour'.$min.'.css', $this->plugin->get_file() ),
64 64
 			array(
65 65
 				'wp-pointer',
66 66
 			),
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
 		wp_register_script(
71 71
 			'proanmic-pay-admin-tour',
72
-			plugins_url( 'js/admin-tour' . $min . '.js', $this->plugin->get_file() ),
72
+			plugins_url( 'js/admin-tour'.$min.'.js', $this->plugin->get_file() ),
73 73
 			array(
74 74
 				'jquery',
75 75
 				'wp-pointer',
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 	private function get_content( $file ) {
101 101
 		$content = '';
102 102
 
103
-		$path = plugin_dir_path( $this->plugin->get_file() ) . 'admin/' . $file . '.php';
103
+		$path = plugin_dir_path( $this->plugin->get_file() ).'admin/'.$file.'.php';
104 104
 
105 105
 		if ( is_readable( $path ) ) {
106 106
 			ob_start();
Please login to merge, or discard this patch.
classes/Admin/AdminNotices.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 		$screen = get_current_screen();
44 44
 
45 45
 		// Show notices only to options managers (administrators).
46
-		if ( ! current_user_can( 'manage_options' ) ) {
46
+		if ( !current_user_can( 'manage_options' ) ) {
47 47
 			return;
48 48
 		}
49 49
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 		$notices = get_option( 'pronamic_pay_admin_notices', array() );
85 85
 
86 86
 		foreach ( $notices as $name ) {
87
-			$file = plugin_dir_path( $this->plugin->get_file() ) . 'admin/notice-' . $name . '.php';
87
+			$file = plugin_dir_path( $this->plugin->get_file() ).'admin/notice-'.$name.'.php';
88 88
 
89 89
 			if ( is_readable( $file ) ) {
90 90
 				include $file;
Please login to merge, or discard this patch.
classes/Admin/AdminReports.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 		);
63 63
 
64 64
 		// @see https://github.com/WordPress/WordPress/blob/4.2.4/wp-admin/admin-header.php#L82-L87.
65
-		add_action( 'admin_print_styles-' . $hook_suffix, array( $this, 'admin_css' ) );
65
+		add_action( 'admin_print_styles-'.$hook_suffix, array( $this, 'admin_css' ) );
66 66
 	}
67 67
 
68 68
 	/**
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
 		wp_register_script(
85 85
 			'flot',
86
-			plugins_url( 'assets/flot/jquery.flot' . $min . '.js', $this->plugin->get_file() ),
86
+			plugins_url( 'assets/flot/jquery.flot'.$min.'.js', $this->plugin->get_file() ),
87 87
 			array( 'jquery' ),
88 88
 			$flot_version,
89 89
 			true
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
 		wp_register_script(
93 93
 			'flot-time',
94
-			plugins_url( 'assets/flot/jquery.flot.time' . $min . '.js', $this->plugin->get_file() ),
94
+			plugins_url( 'assets/flot/jquery.flot.time'.$min.'.js', $this->plugin->get_file() ),
95 95
 			array( 'flot' ),
96 96
 			$flot_version,
97 97
 			true
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
 		wp_register_script(
101 101
 			'flot-resize',
102
-			plugins_url( 'assets/flot/jquery.flot.resize' . $min . '.js', $this->plugin->get_file() ),
102
+			plugins_url( 'assets/flot/jquery.flot.resize'.$min.'.js', $this->plugin->get_file() ),
103 103
 			array( 'flot' ),
104 104
 			$flot_version,
105 105
 			true
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 		// Accounting.js - http://openexchangerates.github.io/accounting.js.
109 109
 		wp_register_script(
110 110
 			'accounting',
111
-			plugins_url( 'assets/accounting/accounting' . $min . '.js', $this->plugin->get_file() ),
111
+			plugins_url( 'assets/accounting/accounting'.$min.'.js', $this->plugin->get_file() ),
112 112
 			array( 'jquery' ),
113 113
 			'0.4.1',
114 114
 			true
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 		// Reports.
118 118
 		wp_register_script(
119 119
 			'proanmic-pay-admin-reports',
120
-			plugins_url( 'js/admin-reports' . $min . '.js', $this->plugin->get_file() ),
120
+			plugins_url( 'js/admin-reports'.$min.'.js', $this->plugin->get_file() ),
121 121
 			array(
122 122
 				'jquery',
123 123
 				'flot',
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 				$value = (float) $data[ $key ]->value;
348 348
 			}
349 349
 
350
-			$report[] = array(
350
+			$report[ ] = array(
351 351
 				// Flot requires milliseconds so multiply with 1000.
352 352
 				$date->getTimestamp() * 1000,
353 353
 				$value,
Please login to merge, or discard this patch.