Passed
Push — develop ( 22778e...6d9cbe )
by Remco
05:17 queued 01:22
created
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( Plugin::$file ) . 'templates/form.php';
72
+		$file = plugin_dir_path( Plugin::$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/Forms/FormProcessor.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -39,20 +39,20 @@  discard block
 block discarded – undo
39 39
 		$pronamic_pay_errors = array();
40 40
 
41 41
 		// Nonce.
42
-		if ( ! filter_has_var( INPUT_POST, 'pronamic_pay_nonce' ) ) {
42
+		if ( !filter_has_var( INPUT_POST, 'pronamic_pay_nonce' ) ) {
43 43
 			return;
44 44
 		}
45 45
 
46 46
 		$nonce = filter_input( INPUT_POST, 'pronamic_pay_nonce', FILTER_SANITIZE_STRING );
47 47
 
48
-		if ( ! wp_verify_nonce( $nonce, 'pronamic_pay' ) ) {
48
+		if ( !wp_verify_nonce( $nonce, 'pronamic_pay' ) ) {
49 49
 			return;
50 50
 		}
51 51
 
52 52
 		// Validate.
53 53
 		$valid = $this->validate();
54 54
 
55
-		if ( ! $valid ) {
55
+		if ( !$valid ) {
56 56
 			return;
57 57
 		}
58 58
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 
64 64
 		$gateway = \Pronamic\WordPress\Pay\Plugin::get_gateway( $config_id );
65 65
 
66
-		if ( ! $gateway ) {
66
+		if ( !$gateway ) {
67 67
 			return;
68 68
 		}
69 69
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
 		$user = get_user_by( 'email', $email );
90 90
 
91
-		if ( ! $user ) {
91
+		if ( !$user ) {
92 92
 			// Make a random string for password.
93 93
 			$password = wp_generate_password( 10 );
94 94
 
@@ -132,14 +132,14 @@  discard block
 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/FormScripts.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 
39 39
 		wp_register_style(
40 40
 			'pronamic-pay-forms',
41
-			plugins_url( 'css/forms' . $min . '.css', \Pronamic\WordPress\Pay\Plugin::$file ),
41
+			plugins_url( 'css/forms'.$min.'.css', \Pronamic\WordPress\Pay\Plugin::$file ),
42 42
 			array(),
43 43
 			$this->plugin->get_version()
44 44
 		);
Please login to merge, or discard this patch.
classes/Forms/PaymentFormData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
 		$first_name = filter_input( INPUT_POST, 'pronamic_pay_first_name', FILTER_SANITIZE_STRING );
132 132
 		$last_name  = filter_input( INPUT_POST, 'pronamic_pay_last_name', FILTER_SANITIZE_STRING );
133 133
 
134
-		return $first_name . ' ' . $last_name;
134
+		return $first_name.' '.$last_name;
135 135
 	}
136 136
 
137 137
 	/**
Please login to merge, or discard this patch.
classes/Admin/Install.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -154,8 +154,8 @@  discard block
 block discarded – undo
154 154
 		// Payments.
155 155
 		$payment_capabilities = PaymentPostType::get_capabilities();
156 156
 
157
-		unset( $payment_capabilities['publish_posts'] );
158
-		unset( $payment_capabilities['create_posts'] );
157
+		unset( $payment_capabilities[ 'publish_posts' ] );
158
+		unset( $payment_capabilities[ 'create_posts' ] );
159 159
 
160 160
 		foreach ( $payment_capabilities as $capability ) {
161 161
 			$roles->add_cap( 'administrator', $capability );
@@ -179,11 +179,11 @@  discard block
 block discarded – undo
179 179
 
180 180
 		if ( $current_db_version ) {
181 181
 			foreach ( $this->db_updates as $version ) {
182
-				if ( ! version_compare( $current_db_version, $version, '<' ) ) {
182
+				if ( !version_compare( $current_db_version, $version, '<' ) ) {
183 183
 					continue;
184 184
 				}
185 185
 
186
-				$file = plugin_dir_path( Plugin::$file ) . 'includes/updates/update-' . $version . '.php';
186
+				$file = plugin_dir_path( Plugin::$file ).'includes/updates/update-'.$version.'.php';
187 187
 
188 188
 				if ( is_readable( $file ) ) {
189 189
 					include $file;
Please login to merge, or discard this patch.
classes/Admin/PaymentBulkActions.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 */
32 32
 	public function load() {
33 33
 		// Current user.
34
-		if ( ! current_user_can( 'edit_payments' ) ) {
34
+		if ( !current_user_can( 'edit_payments' ) ) {
35 35
 			return;
36 36
 		}
37 37
 
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
 		}
44 44
 
45 45
 		// Bulk actions.
46
-		add_filter( 'bulk_actions-' . $screen->id, array( $this, 'bulk_actions' ) );
46
+		add_filter( 'bulk_actions-'.$screen->id, array( $this, 'bulk_actions' ) );
47 47
 
48
-		add_filter( 'handle_bulk_actions-' . $screen->id, array( $this, 'handle_bulk_action' ), 10, 3 );
48
+		add_filter( 'handle_bulk_actions-'.$screen->id, array( $this, 'handle_bulk_action' ), 10, 3 );
49 49
 
50 50
 		// Admin notices.
51 51
 		add_action( 'admin_notices', array( $this, 'admin_notices' ) );
@@ -61,10 +61,10 @@  discard block
 block discarded – undo
61 61
 	 */
62 62
 	public function bulk_actions( $bulk_actions ) {
63 63
 		// Don't allow edit in bulk.
64
-		unset( $bulk_actions['edit'] );
64
+		unset( $bulk_actions[ 'edit' ] );
65 65
 
66 66
 		// Bulk check payment status.
67
-		$bulk_actions['pronamic_payment_check_status'] = __( 'Check Payment Status', 'pronamic_ideal' );
67
+		$bulk_actions[ 'pronamic_payment_check_status' ] = __( 'Check Payment Status', 'pronamic_ideal' );
68 68
 
69 69
 		return $bulk_actions;
70 70
 	}
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
 			// Make sure gateway supports `payment_status_request` feature.
103 103
 			$config_id = $payment->config_id;
104 104
 
105
-			if ( ! isset( $gateways[ $config_id ] ) ) {
105
+			if ( !isset( $gateways[ $config_id ] ) ) {
106 106
 				$gateways[ $config_id ] = \Pronamic\WordPress\Pay\Plugin::get_gateway( $config_id );
107 107
 
108
-				if ( $gateways[ $config_id ] && ! $gateways[ $config_id ]->supports( 'payment_status_request' ) ) {
109
-					$unsupported_gateways[] = $config_id;
108
+				if ( $gateways[ $config_id ] && !$gateways[ $config_id ]->supports( 'payment_status_request' ) ) {
109
+					$unsupported_gateways[ ] = $config_id;
110 110
 				}
111 111
 			}
112 112
 
Please login to merge, or discard this patch.
classes/Admin/AdminAboutPage.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 				array( $this, 'page_about' )
69 69
 			);
70 70
 
71
-			add_action( 'admin_print_styles-' . $hook_suffix, array( $this, 'admin_css' ) );
71
+			add_action( 'admin_print_styles-'.$hook_suffix, array( $this, 'admin_css' ) );
72 72
 		}
73 73
 	}
74 74
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
 		wp_enqueue_style(
89 89
 			'proanmic-pay-admin-about',
90
-			plugins_url( 'css/admin-about' . $min . '.css', Plugin::$file ),
90
+			plugins_url( 'css/admin-about'.$min.'.css', Plugin::$file ),
91 91
 			array(),
92 92
 			$this->plugin->get_version()
93 93
 		);
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( \Pronamic\WordPress\Pay\Plugin::$file ) . 'admin/notice-' . $name . '.php';
87
+			$file = plugin_dir_path( \Pronamic\WordPress\Pay\Plugin::$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/AdminDashboard.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,6 +76,6 @@
 block discarded – undo
76 76
 			), admin_url( 'edit.php' )
77 77
 		);
78 78
 
79
-		include \Pronamic\WordPress\Pay\Plugin::$dirname . '/admin/widget-payments-status-list.php';
79
+		include \Pronamic\WordPress\Pay\Plugin::$dirname.'/admin/widget-payments-status-list.php';
80 80
 	}
81 81
 }
Please login to merge, or discard this patch.