Completed
Branch master (b58101)
by Reüel
04:31
created
Category
src/OrderStandard/Gateway.php 1 patch
Spacing   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -39,29 +39,29 @@  discard block
 block discarded – undo
39 39
 	 *
40 40
 	 * @param Config $config
41 41
 	 */
42
-	public function __construct( Config $config ) {
43
-		parent::__construct( $config );
42
+	public function __construct(Config $config) {
43
+		parent::__construct($config);
44 44
 
45 45
 		$this->supports = array(
46 46
 			'payment_status_request',
47 47
 		);
48 48
 
49
-		$this->set_method( Gateway::METHOD_HTML_FORM );
50
-		$this->set_has_feedback( true );
51
-		$this->set_amount_minimum( 0.01 );
52
-		$this->set_slug( self::SLUG );
49
+		$this->set_method(Gateway::METHOD_HTML_FORM);
50
+		$this->set_has_feedback(true);
51
+		$this->set_amount_minimum(0.01);
52
+		$this->set_slug(self::SLUG);
53 53
 
54
-		$this->client = new Client( $this->config->psp_id );
54
+		$this->client = new Client($this->config->psp_id);
55 55
 
56
-		$this->client->set_payment_server_url( $config->get_form_action_url() );
57
-		$this->client->set_direct_query_url( $config->get_direct_query_url() );
58
-		$this->client->set_pass_phrase_in( $config->sha_in_pass_phrase );
59
-		$this->client->set_pass_phrase_out( $config->sha_out_pass_phrase );
60
-		$this->client->set_user_id( $config->user_id );
61
-		$this->client->set_password( $config->password );
56
+		$this->client->set_payment_server_url($config->get_form_action_url());
57
+		$this->client->set_direct_query_url($config->get_direct_query_url());
58
+		$this->client->set_pass_phrase_in($config->sha_in_pass_phrase);
59
+		$this->client->set_pass_phrase_out($config->sha_out_pass_phrase);
60
+		$this->client->set_user_id($config->user_id);
61
+		$this->client->set_password($config->password);
62 62
 
63
-		if ( ! empty( $config->hash_algorithm ) ) {
64
-			$this->client->set_hash_algorithm( $config->hash_algorithm );
63
+		if ( ! empty($config->hash_algorithm)) {
64
+			$this->client->set_hash_algorithm($config->hash_algorithm);
65 65
 		}
66 66
 	}
67 67
 
@@ -83,44 +83,44 @@  discard block
 block discarded – undo
83 83
 	 *
84 84
 	 * @see Pronamic_WP_Pay_Gateway::start()
85 85
 	 */
86
-	public function start( Payment $payment ) {
87
-		$payment->set_action_url( $this->client->get_payment_server_url() );
86
+	public function start(Payment $payment) {
87
+		$payment->set_action_url($this->client->get_payment_server_url());
88 88
 
89 89
 		$ogone_data = $this->client->get_data();
90 90
 
91 91
 		// General
92
-		$ogone_data_general = new DataGeneralHelper( $ogone_data );
92
+		$ogone_data_general = new DataGeneralHelper($ogone_data);
93 93
 
94 94
 		$ogone_data_general
95
-			->set_order_id( $payment->format_string( $this->config->order_id ) )
96
-			->set_order_description( $payment->get_description() )
97
-			->set_param_plus( 'payment_id=' . $payment->get_id() )
98
-			->set_currency( $payment->get_currency() )
99
-			->set_amount( $payment->get_amount()->get_amount() )
100
-			->set_language( $payment->get_locale() );
95
+			->set_order_id($payment->format_string($this->config->order_id))
96
+			->set_order_description($payment->get_description())
97
+			->set_param_plus('payment_id=' . $payment->get_id())
98
+			->set_currency($payment->get_currency())
99
+			->set_amount($payment->get_amount()->get_amount())
100
+			->set_language($payment->get_locale());
101 101
 
102 102
 		// Customer
103
-		$ogone_data_customer = new DataCustomerHelper( $ogone_data );
103
+		$ogone_data_customer = new DataCustomerHelper($ogone_data);
104 104
 
105 105
 		$ogone_data_customer
106
-			->set_name( $payment->get_customer_name() )
107
-			->set_email( $payment->get_email() )
108
-			->set_address( $payment->get_address() )
109
-			->set_zip( $payment->get_zip() )
110
-			->set_town( $payment->get_city() )
111
-			->set_country( $payment->get_country() )
112
-			->set_telephone_number( $payment->get_telephone_number() );
106
+			->set_name($payment->get_customer_name())
107
+			->set_email($payment->get_email())
108
+			->set_address($payment->get_address())
109
+			->set_zip($payment->get_zip())
110
+			->set_town($payment->get_city())
111
+			->set_country($payment->get_country())
112
+			->set_telephone_number($payment->get_telephone_number());
113 113
 
114 114
 		// Payment method
115 115
 		// @see https://github.com/wp-pay-gateways/ogone/wiki/Brands
116
-		switch ( $payment->get_method() ) {
116
+		switch ($payment->get_method()) {
117 117
 			case Core_PaymentMethods::CREDIT_CARD :
118 118
 				/*
119 119
 				 * Set credit card payment method.
120 120
 				 * @since 1.2.3
121 121
 				 */
122 122
 				$ogone_data_general
123
-					->set_payment_method( PaymentMethods::CREDIT_CARD );
123
+					->set_payment_method(PaymentMethods::CREDIT_CARD);
124 124
 
125 125
 				break;
126 126
 			case Core_PaymentMethods::IDEAL :
@@ -129,41 +129,41 @@  discard block
 block discarded – undo
129 129
 				 * @since 1.2.3
130 130
 				 */
131 131
 				$ogone_data_general
132
-					->set_brand( Brands::IDEAL )
133
-					->set_payment_method( PaymentMethods::IDEAL );
132
+					->set_brand(Brands::IDEAL)
133
+					->set_payment_method(PaymentMethods::IDEAL);
134 134
 
135 135
 				break;
136 136
 			case Core_PaymentMethods::BANCONTACT :
137 137
 			case Core_PaymentMethods::MISTER_CASH :
138 138
 				$ogone_data_general
139
-					->set_brand( Brands::BCMC )
140
-					->set_payment_method( PaymentMethods::CREDIT_CARD );
139
+					->set_brand(Brands::BCMC)
140
+					->set_payment_method(PaymentMethods::CREDIT_CARD);
141 141
 
142 142
 				break;
143 143
 		}
144 144
 
145 145
 		// Parameter Variable
146
-		$param_var = Util::get_param_var( $this->config->param_var );
146
+		$param_var = Util::get_param_var($this->config->param_var);
147 147
 
148
-		if ( ! empty( $param_var ) ) {
149
-			$ogone_data->set_field( 'PARAMVAR', $param_var );
148
+		if ( ! empty($param_var)) {
149
+			$ogone_data->set_field('PARAMVAR', $param_var);
150 150
 		}
151 151
 
152 152
 		// Template Page
153 153
 		$template_page = $this->config->param_var;
154 154
 
155
-		if ( ! empty( $template_page ) ) {
156
-			$ogone_data->set_field( 'TP', $template_page );
155
+		if ( ! empty($template_page)) {
156
+			$ogone_data->set_field('TP', $template_page);
157 157
 		}
158 158
 
159 159
 		// URL's
160
-		$ogone_url_helper = new DataUrlHelper( $ogone_data );
160
+		$ogone_url_helper = new DataUrlHelper($ogone_data);
161 161
 
162 162
 		$ogone_url_helper
163
-			->set_accept_url( add_query_arg( 'status', 'accept', $payment->get_return_url() ) )
164
-			->set_cancel_url( add_query_arg( 'status', 'cancel', $payment->get_return_url() ) )
165
-			->set_decline_url( add_query_arg( 'status', 'decline', $payment->get_return_url() ) )
166
-			->set_exception_url( add_query_arg( 'status', 'exception', $payment->get_return_url() ) );
163
+			->set_accept_url(add_query_arg('status', 'accept', $payment->get_return_url()))
164
+			->set_cancel_url(add_query_arg('status', 'cancel', $payment->get_return_url()))
165
+			->set_decline_url(add_query_arg('status', 'decline', $payment->get_return_url()))
166
+			->set_exception_url(add_query_arg('status', 'exception', $payment->get_return_url()));
167 167
 	}
168 168
 
169 169
 	/**
@@ -181,27 +181,27 @@  discard block
 block discarded – undo
181 181
 	 *
182 182
 	 * @param Payment $payment
183 183
 	 */
184
-	public function update_status( Payment $payment ) {
184
+	public function update_status(Payment $payment) {
185 185
 		$data = Security::get_request_data();
186 186
 
187
-		$data = $this->client->verify_request( $data );
187
+		$data = $this->client->verify_request($data);
188 188
 
189
-		if ( false !== $data ) {
190
-			$status = Statuses::transform( $data[ Parameters::STATUS ] );
189
+		if (false !== $data) {
190
+			$status = Statuses::transform($data[Parameters::STATUS]);
191 191
 
192
-			$payment->set_status( $status );
192
+			$payment->set_status($status);
193 193
 
194
-			$this->update_status_payment_note( $payment, $data );
194
+			$this->update_status_payment_note($payment, $data);
195 195
 
196 196
 			return;
197 197
 		}
198 198
 
199
-		$order_id = $payment->format_string( $this->config->order_id );
199
+		$order_id = $payment->format_string($this->config->order_id);
200 200
 
201
-		$status = $this->client->get_order_status( $order_id );
201
+		$status = $this->client->get_order_status($order_id);
202 202
 
203
-		if ( null !== $status ) {
204
-			$payment->set_status( $status );
203
+		if (null !== $status) {
204
+			$payment->set_status($status);
205 205
 		}
206 206
 	}
207 207
 
@@ -211,43 +211,43 @@  discard block
 block discarded – undo
211 211
 	 * @param Payment $payment
212 212
 	 * @param array $data
213 213
 	 */
214
-	private function update_status_payment_note( Payment $payment, $data ) {
214
+	private function update_status_payment_note(Payment $payment, $data) {
215 215
 		$labels = array(
216
-			'STATUS'     => __( 'Status', 'pronamic_ideal' ),
217
-			'ORDERID'    => __( 'Order ID', 'pronamic_ideal' ),
218
-			'CURRENCY'   => __( 'Currency', 'pronamic_ideal' ),
219
-			'AMOUNT'     => __( 'Amount', 'pronamic_ideal' ),
220
-			'PM'         => __( 'Payment Method', 'pronamic_ideal' ),
221
-			'ACCEPTANCE' => __( 'Acceptance', 'pronamic_ideal' ),
222
-			'STATUS'     => __( 'Status', 'pronamic_ideal' ),
223
-			'CARDNO'     => __( 'Card Number', 'pronamic_ideal' ),
224
-			'ED'         => __( 'End Date', 'pronamic_ideal' ),
225
-			'CN'         => __( 'Customer Name', 'pronamic_ideal' ),
226
-			'TRXDATE'    => __( 'Transaction Date', 'pronamic_ideal' ),
227
-			'PAYID'      => __( 'Pay ID', 'pronamic_ideal' ),
228
-			'NCERROR'    => __( 'NC Error', 'pronamic_ideal' ),
229
-			'BRAND'      => __( 'Brand', 'pronamic_ideal' ),
230
-			'IP'         => __( 'IP', 'pronamic_ideal' ),
231
-			'SHASIGN'    => __( 'SHA Signature', 'pronamic_ideal' ),
216
+			'STATUS'     => __('Status', 'pronamic_ideal'),
217
+			'ORDERID'    => __('Order ID', 'pronamic_ideal'),
218
+			'CURRENCY'   => __('Currency', 'pronamic_ideal'),
219
+			'AMOUNT'     => __('Amount', 'pronamic_ideal'),
220
+			'PM'         => __('Payment Method', 'pronamic_ideal'),
221
+			'ACCEPTANCE' => __('Acceptance', 'pronamic_ideal'),
222
+			'STATUS'     => __('Status', 'pronamic_ideal'),
223
+			'CARDNO'     => __('Card Number', 'pronamic_ideal'),
224
+			'ED'         => __('End Date', 'pronamic_ideal'),
225
+			'CN'         => __('Customer Name', 'pronamic_ideal'),
226
+			'TRXDATE'    => __('Transaction Date', 'pronamic_ideal'),
227
+			'PAYID'      => __('Pay ID', 'pronamic_ideal'),
228
+			'NCERROR'    => __('NC Error', 'pronamic_ideal'),
229
+			'BRAND'      => __('Brand', 'pronamic_ideal'),
230
+			'IP'         => __('IP', 'pronamic_ideal'),
231
+			'SHASIGN'    => __('SHA Signature', 'pronamic_ideal'),
232 232
 		);
233 233
 
234 234
 		$note = '';
235 235
 
236 236
 		$note .= '<p>';
237
-		$note .= __( 'Ogone transaction data in response message:', 'pronamic_ideal' );
237
+		$note .= __('Ogone transaction data in response message:', 'pronamic_ideal');
238 238
 		$note .= '</p>';
239 239
 
240 240
 		$note .= '<dl>';
241 241
 
242
-		foreach ( $labels as $key => $label ) {
243
-			if ( isset( $data[ $key ] ) && '' !== $data[ $key ] ) {
244
-				$note .= sprintf( '<dt>%s</dt>', esc_html( $label ) );
245
-				$note .= sprintf( '<dd>%s</dd>', esc_html( $data[ $key ] ) );
242
+		foreach ($labels as $key => $label) {
243
+			if (isset($data[$key]) && '' !== $data[$key]) {
244
+				$note .= sprintf('<dt>%s</dt>', esc_html($label));
245
+				$note .= sprintf('<dd>%s</dd>', esc_html($data[$key]));
246 246
 			}
247 247
 		}
248 248
 
249 249
 		$note .= '</dl>';
250 250
 
251
-		$payment->add_note( $note );
251
+		$payment->add_note($note);
252 252
 	}
253 253
 }
Please login to merge, or discard this patch.
src/OrderStandard/TestConfig.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@
 block discarded – undo
20 20
 	 * @return string
21 21
 	 */
22 22
 	protected function get_default_form_action_url() {
23
-		$is_utf8 = strcasecmp( get_bloginfo( 'charset' ), 'UTF-8' ) === 0;
23
+		$is_utf8 = strcasecmp(get_bloginfo('charset'), 'UTF-8') === 0;
24 24
 
25
-		if ( $is_utf8 ) {
25
+		if ($is_utf8) {
26 26
 			return 'https://secure.ogone.com/ncol/test/orderstandard_utf8.asp';
27 27
 		}
28 28
 
Please login to merge, or discard this patch.
src/OrderStandard/ConfigFactory.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -17,34 +17,34 @@
 block discarded – undo
17 17
 class ConfigFactory extends GatewayConfigFactory {
18 18
 	private $config_class;
19 19
 
20
-	public function __construct( $config_class = null, $config_test_class = null ) {
21
-		$this->config_class      = is_null( $config_class ) ? __NAMESPACE__ . '\Config' : $config_class;
22
-		$this->config_test_class = is_null( $config_test_class ) ? __NAMESPACE__ . '\TestConfig' : $config_test_class;
20
+	public function __construct($config_class = null, $config_test_class = null) {
21
+		$this->config_class      = is_null($config_class) ? __NAMESPACE__ . '\Config' : $config_class;
22
+		$this->config_test_class = is_null($config_test_class) ? __NAMESPACE__ . '\TestConfig' : $config_test_class;
23 23
 	}
24 24
 
25
-	public function get_config( $post_id ) {
26
-		$mode = get_post_meta( $post_id, '_pronamic_gateway_mode', true );
25
+	public function get_config($post_id) {
26
+		$mode = get_post_meta($post_id, '_pronamic_gateway_mode', true);
27 27
 
28
-		$config_class = ( 'test' === $mode ) ? $this->config_test_class : $this->config_class;
28
+		$config_class = ('test' === $mode) ? $this->config_test_class : $this->config_class;
29 29
 
30 30
 		$config = new $config_class();
31 31
 
32
-		$form_action_url = get_post_meta( $post_id, '_pronamic_gateway_ogone_form_action_url', true );
32
+		$form_action_url = get_post_meta($post_id, '_pronamic_gateway_ogone_form_action_url', true);
33 33
 
34
-		if ( '' !== $form_action_url ) {
35
-			$config->set_form_action_url( $form_action_url );
34
+		if ('' !== $form_action_url) {
35
+			$config->set_form_action_url($form_action_url);
36 36
 		}
37 37
 
38 38
 		$config->mode                = $mode;
39
-		$config->psp_id              = get_post_meta( $post_id, '_pronamic_gateway_ogone_psp_id', true );
40
-		$config->hash_algorithm      = get_post_meta( $post_id, '_pronamic_gateway_ogone_hash_algorithm', true );
41
-		$config->sha_in_pass_phrase  = get_post_meta( $post_id, '_pronamic_gateway_ogone_sha_in_pass_phrase', true );
42
-		$config->sha_out_pass_phrase = get_post_meta( $post_id, '_pronamic_gateway_ogone_sha_out_pass_phrase', true );
43
-		$config->user_id             = get_post_meta( $post_id, '_pronamic_gateway_ogone_user_id', true );
44
-		$config->password            = get_post_meta( $post_id, '_pronamic_gateway_ogone_password', true );
45
-		$config->order_id            = get_post_meta( $post_id, '_pronamic_gateway_ogone_order_id', true );
46
-		$config->param_var           = get_post_meta( $post_id, '_pronamic_gateway_ogone_param_var', true );
47
-		$config->template_page       = get_post_meta( $post_id, '_pronamic_gateway_ogone_template_page', true );
39
+		$config->psp_id              = get_post_meta($post_id, '_pronamic_gateway_ogone_psp_id', true);
40
+		$config->hash_algorithm      = get_post_meta($post_id, '_pronamic_gateway_ogone_hash_algorithm', true);
41
+		$config->sha_in_pass_phrase  = get_post_meta($post_id, '_pronamic_gateway_ogone_sha_in_pass_phrase', true);
42
+		$config->sha_out_pass_phrase = get_post_meta($post_id, '_pronamic_gateway_ogone_sha_out_pass_phrase', true);
43
+		$config->user_id             = get_post_meta($post_id, '_pronamic_gateway_ogone_user_id', true);
44
+		$config->password            = get_post_meta($post_id, '_pronamic_gateway_ogone_password', true);
45
+		$config->order_id            = get_post_meta($post_id, '_pronamic_gateway_ogone_order_id', true);
46
+		$config->param_var           = get_post_meta($post_id, '_pronamic_gateway_ogone_param_var', true);
47
+		$config->template_page       = get_post_meta($post_id, '_pronamic_gateway_ogone_template_page', true);
48 48
 
49 49
 		return $config;
50 50
 	}
Please login to merge, or discard this patch.
src/DataCreditCardHelper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
 	 *
23 23
 	 * @return DataCreditCardHelper
24 24
 	 */
25
-	public function set_number( $number ) {
26
-		return $this->set_field( 'CARDNO', $number );
25
+	public function set_number($number) {
26
+		return $this->set_field('CARDNO', $number);
27 27
 	}
28 28
 
29 29
 	/**
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 	 *
34 34
 	 * @return DataCreditCardHelper
35 35
 	 */
36
-	public function set_expiration_date( DateTime $date ) {
37
-		return $this->set_field( 'ED', $date->format( Ingenico::EXPIRATION_DATE_FORMAT ) );
36
+	public function set_expiration_date(DateTime $date) {
37
+		return $this->set_field('ED', $date->format(Ingenico::EXPIRATION_DATE_FORMAT));
38 38
 	}
39 39
 
40 40
 	/**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 *
45 45
 	 * @return DataCreditCardHelper
46 46
 	 */
47
-	public function set_security_code( $security_code ) {
48
-		return $this->set_field( 'CVC', $security_code );
47
+	public function set_security_code($security_code) {
48
+		return $this->set_field('CVC', $security_code);
49 49
 	}
50 50
 }
Please login to merge, or discard this patch.
src/DataCustomerHelper.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 	 *
27 27
 	 * @return DataGeneralHelper
28 28
 	 */
29
-	public function set_name( $name ) {
30
-		return $this->set_field( 'CN', $name );
29
+	public function set_name($name) {
30
+		return $this->set_field('CN', $name);
31 31
 	}
32 32
 
33 33
 	/**
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 	 *
38 38
 	 * @return DataGeneralHelper
39 39
 	 */
40
-	public function set_email( $email ) {
41
-		return $this->set_field( 'EMAIL', $email );
40
+	public function set_email($email) {
41
+		return $this->set_field('EMAIL', $email);
42 42
 	}
43 43
 
44 44
 	/**
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
 	 *
49 49
 	 * @return DataGeneralHelper
50 50
 	 */
51
-	public function set_address( $address ) {
52
-		return $this->set_field( 'OWNERADDRESS', $address );
51
+	public function set_address($address) {
52
+		return $this->set_field('OWNERADDRESS', $address);
53 53
 	}
54 54
 
55 55
 	/**
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
 	 *
60 60
 	 * @return DataGeneralHelper
61 61
 	 */
62
-	public function set_zip( $zip ) {
63
-		return $this->set_field( 'OWNERZIP', $zip );
62
+	public function set_zip($zip) {
63
+		return $this->set_field('OWNERZIP', $zip);
64 64
 	}
65 65
 
66 66
 	/**
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
 	 *
71 71
 	 * @return DataGeneralHelper
72 72
 	 */
73
-	public function set_town( $town ) {
74
-		return $this->set_field( 'OWNERTOWN', $town );
73
+	public function set_town($town) {
74
+		return $this->set_field('OWNERTOWN', $town);
75 75
 	}
76 76
 
77 77
 	/**
@@ -81,8 +81,8 @@  discard block
 block discarded – undo
81 81
 	 *
82 82
 	 * @return DataGeneralHelper
83 83
 	 */
84
-	public function set_country( $country ) {
85
-		return $this->set_field( 'OWNERCTY', $country );
84
+	public function set_country($country) {
85
+		return $this->set_field('OWNERCTY', $country);
86 86
 	}
87 87
 
88 88
 	/**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 	 *
93 93
 	 * @return DataGeneralHelper
94 94
 	 */
95
-	public function set_telephone_number( $number ) {
96
-		return $this->set_field( 'OWNERTELNO', $number );
95
+	public function set_telephone_number($number) {
96
+		return $this->set_field('OWNERTELNO', $number);
97 97
 	}
98 98
 }
Please login to merge, or discard this patch.
src/SecureDataHelper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	/**
26 26
 	 * Constructs and initialize a Ogone data default helper class
27 27
 	 */
28
-	public function __construct( Data $data ) {
28
+	public function __construct(Data $data) {
29 29
 		$this->data = $data;
30 30
 	}
31 31
 
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 	 *
37 37
 	 * @return DataHelper
38 38
 	 */
39
-	public function set_3d_secure_flag( $flag ) {
40
-		$this->data->set_field( 'FLAG3D', $flag ? 'Y' : 'N' );
39
+	public function set_3d_secure_flag($flag) {
40
+		$this->data->set_field('FLAG3D', $flag ? 'Y' : 'N');
41 41
 
42 42
 		return $this;
43 43
 	}
@@ -49,8 +49,8 @@  discard block
 block discarded – undo
49 49
 	 *
50 50
 	 * @return DataHelper
51 51
 	 */
52
-	public function set_http_accept( $http_accept ) {
53
-		$this->data->set_field( 'HTTP_ACCEPT', $http_accept );
52
+	public function set_http_accept($http_accept) {
53
+		$this->data->set_field('HTTP_ACCEPT', $http_accept);
54 54
 
55 55
 		return $this;
56 56
 	}
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 	 *
63 63
 	 * @return DataHelper
64 64
 	 */
65
-	public function set_http_user_agent( $user_agent ) {
66
-		$this->data->set_field( 'HTTP_USER_AGENT', $user_agent );
65
+	public function set_http_user_agent($user_agent) {
66
+		$this->data->set_field('HTTP_USER_AGENT', $user_agent);
67 67
 
68 68
 		return $this;
69 69
 	}
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
 	 *
76 76
 	 * @return DataHelper
77 77
 	 */
78
-	public function set_window( $window ) {
79
-		$this->data->set_field( 'WIN3DS', $window );
78
+	public function set_window($window) {
79
+		$this->data->set_field('WIN3DS', $window);
80 80
 
81 81
 		return $this;
82 82
 	}
Please login to merge, or discard this patch.
src/XML/OrderResponseParser.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -25,26 +25,26 @@
 block discarded – undo
25 25
 	 *
26 26
 	 * @return null|OrderResponse
27 27
 	 */
28
-	public static function parse( SimpleXMLElement $xml, $order_response = null ) {
29
-		if ( ! $order_response instanceof OrderResponse ) {
28
+	public static function parse(SimpleXMLElement $xml, $order_response = null) {
29
+		if ( ! $order_response instanceof OrderResponse) {
30 30
 			$order_response = new OrderResponse();
31 31
 		}
32 32
 
33
-		$order_response->order_id      = Security::filter( $xml['orderID'] );
34
-		$order_response->pay_id        = Security::filter( $xml['PAYID'] );
35
-		$order_response->nc_status     = Security::filter( $xml[ Parameters::NC_STATUS ] );
36
-		$order_response->nc_error      = Security::filter( $xml[ Parameters::NC_ERROR ] );
37
-		$order_response->nc_error_plus = Security::filter( $xml[ Parameters::NC_ERROR_PLUS ] );
38
-		$order_response->acceptance    = Security::filter( $xml['ACCEPTANCE'] );
39
-		$order_response->status        = Security::filter( $xml[ Parameters::STATUS ] );
40
-		$order_response->eci           = Security::filter( $xml['ECI'] );
41
-		$order_response->amount        = Security::filter( $xml[ Parameters::AMOUNT ] );
42
-		$order_response->currency      = Security::filter( $xml[ Parameters::CURRENCY ] );
43
-		$order_response->pm            = Security::filter( $xml['PM'] );
44
-		$order_response->brand         = Security::filter( $xml['BRAND'] );
33
+		$order_response->order_id      = Security::filter($xml['orderID']);
34
+		$order_response->pay_id        = Security::filter($xml['PAYID']);
35
+		$order_response->nc_status     = Security::filter($xml[Parameters::NC_STATUS]);
36
+		$order_response->nc_error      = Security::filter($xml[Parameters::NC_ERROR]);
37
+		$order_response->nc_error_plus = Security::filter($xml[Parameters::NC_ERROR_PLUS]);
38
+		$order_response->acceptance    = Security::filter($xml['ACCEPTANCE']);
39
+		$order_response->status        = Security::filter($xml[Parameters::STATUS]);
40
+		$order_response->eci           = Security::filter($xml['ECI']);
41
+		$order_response->amount        = Security::filter($xml[Parameters::AMOUNT]);
42
+		$order_response->currency      = Security::filter($xml[Parameters::CURRENCY]);
43
+		$order_response->pm            = Security::filter($xml['PM']);
44
+		$order_response->brand         = Security::filter($xml['BRAND']);
45 45
 
46
-		if ( $xml->HTML_ANSWER ) {
47
-			$order_response->html_answer = base64_decode( Security::filter( $xml->HTML_ANSWER ) );
46
+		if ($xml->HTML_ANSWER) {
47
+			$order_response->html_answer = base64_decode(Security::filter($xml->HTML_ANSWER));
48 48
 		}
49 49
 
50 50
 		return $order_response;
Please login to merge, or discard this patch.
src/Util.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 	 *
19 19
 	 * @param string $param_var
20 20
 	 */
21
-	public static function get_param_var( $param_var ) {
21
+	public static function get_param_var($param_var) {
22 22
 		// Find and replace
23 23
 		// @see https://github.com/woothemes/woocommerce/blob/v2.0.19/classes/emails/class-wc-email-new-order.php
24 24
 		$find    = array();
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 		$replace[] = home_url();
32 32
 
33 33
 		// Parameter Variable
34
-		$param_var = str_replace( $find, $replace, $param_var );
34
+		$param_var = str_replace($find, $replace, $param_var);
35 35
 
36 36
 		return $param_var;
37 37
 	}
Please login to merge, or discard this patch.