Passed
Push — master ( ab0cd9...9a3b26 )
by Reüel
04:57
created
src/Integration.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,17 +20,17 @@
 block discarded – undo
20 20
 		$this->name          = 'Rabobank - OmniKassa';
21 21
 		$this->product_url   = 'https://www.rabobank.nl/bedrijven/betalen/geld-ontvangen/rabo-omnikassa/';
22 22
 		$this->dashboard_url = array(
23
-			__( 'admin', 'pronamic_ideal' )    => 'https://dashboard.omnikassa.rabobank.nl/',
24
-			__( 'download', 'pronamic_ideal' ) => 'https://download.omnikassa.rabobank.nl/',
23
+			__('admin', 'pronamic_ideal')    => 'https://dashboard.omnikassa.rabobank.nl/',
24
+			__('download', 'pronamic_ideal') => 'https://download.omnikassa.rabobank.nl/',
25 25
 		);
26 26
 		$this->provider      = 'rabobank';
27 27
 		$this->deprecated    = true;
28 28
 
29 29
 		// Actions
30
-		$function = array( __NAMESPACE__ . '\Listener', 'listen' );
30
+		$function = array(__NAMESPACE__ . '\Listener', 'listen');
31 31
 
32
-		if ( ! has_action( 'wp_loaded', $function ) ) {
33
-			add_action( 'wp_loaded', $function );
32
+		if ( ! has_action('wp_loaded', $function)) {
33
+			add_action('wp_loaded', $function);
34 34
 		}
35 35
 	}
36 36
 
Please login to merge, or discard this patch.
src/Client.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
 		);
58 58
 	}
59 59
 
60
-	public static function is_supported_language( $language ) {
60
+	public static function is_supported_language($language) {
61 61
 		$languages = self::get_supported_language_codes();
62 62
 
63
-		return in_array( $language, $languages, true );
63
+		return in_array($language, $languages, true);
64 64
 	}
65 65
 
66 66
 	/**
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	public function __construct() {
193 193
 		$this->payment_mean_brand_list = array();
194 194
 
195
-		$this->set_interface_version( self::INTERFACE_VERSION_HP_1_0 );
195
+		$this->set_interface_version(self::INTERFACE_VERSION_HP_1_0);
196 196
 	}
197 197
 
198 198
 	/**
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 	 *
210 210
 	 * @param string $url an URL
211 211
 	 */
212
-	public function set_action_url( $url ) {
212
+	public function set_action_url($url) {
213 213
 		$this->action_url = $url;
214 214
 	}
215 215
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	 *
228 228
 	 * @param string $interface_version
229 229
 	 */
230
-	public function set_interface_version( $interface_version ) {
230
+	public function set_interface_version($interface_version) {
231 231
 		$this->interface_version = $interface_version;
232 232
 	}
233 233
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
 	 *
246 246
 	 * @param string $currency_numeric_code
247 247
 	 */
248
-	public function set_currency_numeric_code( $currency_numeric_code ) {
248
+	public function set_currency_numeric_code($currency_numeric_code) {
249 249
 		$this->currency_numeric_code = $currency_numeric_code;
250 250
 	}
251 251
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 	 *
264 264
 	 * @param string $merchant_id
265 265
 	 */
266
-	public function set_merchant_id( $merchant_id ) {
266
+	public function set_merchant_id($merchant_id) {
267 267
 		$this->merchant_id = $merchant_id;
268 268
 	}
269 269
 
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 	 *
284 284
 	 * @param string $normal_return_url
285 285
 	 */
286
-	public function set_normal_return_url( $normal_return_url ) {
286
+	public function set_normal_return_url($normal_return_url) {
287 287
 		$this->normal_return_url = $normal_return_url;
288 288
 	}
289 289
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 	 *
302 302
 	 * @param float $amount
303 303
 	 */
304
-	public function set_amount( $amount ) {
304
+	public function set_amount($amount) {
305 305
 		$this->amount = $amount;
306 306
 	}
307 307
 
@@ -320,8 +320,8 @@  discard block
 block discarded – undo
320 320
 	 *
321 321
 	 * @param string $transaction_reference
322 322
 	 */
323
-	public function set_transaction_reference( $transaction_reference ) {
324
-		$this->transaction_reference = DataHelper::filter_an( $transaction_reference, 35 );
323
+	public function set_transaction_reference($transaction_reference) {
324
+		$this->transaction_reference = DataHelper::filter_an($transaction_reference, 35);
325 325
 	}
326 326
 
327 327
 	/**
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 	 *
339 339
 	 * @param string $key_version
340 340
 	 */
341
-	public function set_key_version( $key_version ) {
341
+	public function set_key_version($key_version) {
342 342
 		$this->key_version = $key_version;
343 343
 	}
344 344
 
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 	 *
359 359
 	 * @param string $automatic_response_url
360 360
 	 */
361
-	public function set_automatic_response_url( $automatic_response_url ) {
361
+	public function set_automatic_response_url($automatic_response_url) {
362 362
 		$this->automatic_response_url = $automatic_response_url;
363 363
 	}
364 364
 
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 	 *
377 377
 	 * @param string $customer_language
378 378
 	 */
379
-	public function set_customer_language( $customer_language ) {
379
+	public function set_customer_language($customer_language) {
380 380
 		$this->customer_language = $customer_language;
381 381
 	}
382 382
 
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 	 *
386 386
 	 * @param string $payment_mean_brand
387 387
 	 */
388
-	public function add_payment_mean_brand( $payment_mean_brand ) {
388
+	public function add_payment_mean_brand($payment_mean_brand) {
389 389
 		$this->payment_mean_brand_list[] = $payment_mean_brand;
390 390
 	}
391 391
 
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
 	 * @return string ANS128 listString comma separated list
396 396
 	 */
397 397
 	public function get_payment_mean_brand_list() {
398
-		return apply_filters( 'pronamic_pay_omnikassa_payment_mean_brand_list', implode( ', ', $this->payment_mean_brand_list ) );
398
+		return apply_filters('pronamic_pay_omnikassa_payment_mean_brand_list', implode(', ', $this->payment_mean_brand_list));
399 399
 	}
400 400
 
401 401
 	/**
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 	 *
413 413
 	 * @param string $order_id
414 414
 	 */
415
-	public function set_order_id( $order_id ) {
415
+	public function set_order_id($order_id) {
416 416
 		$this->order_id = $order_id;
417 417
 	}
418 418
 
@@ -433,8 +433,8 @@  discard block
 block discarded – undo
433 433
 	public function get_formatted_expiration_date() {
434 434
 		$result = null;
435 435
 
436
-		if ( null !== $this->expiration_date ) {
437
-			$result = $this->expiration_date->format( DATE_ISO8601 );
436
+		if (null !== $this->expiration_date) {
437
+			$result = $this->expiration_date->format(DATE_ISO8601);
438 438
 		}
439 439
 
440 440
 		return $result;
@@ -445,19 +445,19 @@  discard block
 block discarded – undo
445 445
 	 *
446 446
 	 * @param DateTime $date
447 447
 	 */
448
-	public function set_expiration_date( DateTime $date = null ) {
448
+	public function set_expiration_date(DateTime $date = null) {
449 449
 		$this->expiration_date = $date;
450 450
 	}
451 451
 
452 452
 	public function get_data_array() {
453 453
 		// Payment Request - required fields
454 454
 		$required_fields = array(
455
-			'amount'               => strval( $this->get_amount() ),
456
-			'currencyCode'         => strval( $this->get_currency_numeric_code() ),
455
+			'amount'               => strval($this->get_amount()),
456
+			'currencyCode'         => strval($this->get_currency_numeric_code()),
457 457
 			'merchantId'           => $this->get_merchant_id(),
458 458
 			'normalReturnUrl'      => $this->get_normal_return_url(),
459 459
 			'transactionReference' => $this->get_transaction_reference(),
460
-			'keyVersion'           => strval( $this->get_key_version() ),
460
+			'keyVersion'           => strval($this->get_key_version()),
461 461
 		);
462 462
 
463 463
 		// Payment request - optional fields
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 		);
471 471
 
472 472
 		// @link http://briancray.com/2009/04/25/remove-null-values-php-arrays/
473
-		$optional_fields = array_filter( $optional_fields );
473
+		$optional_fields = array_filter($optional_fields);
474 474
 
475 475
 		// Data
476 476
 		$data = $required_fields + $optional_fields;
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 	public function get_data() {
487 487
 		$data = $this->get_data_array();
488 488
 
489
-		return self::create_piped_string( $data );
489
+		return self::create_piped_string($data);
490 490
 	}
491 491
 
492 492
 	/**
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 	 *
504 504
 	 * @return string
505 505
 	 */
506
-	public function set_secret_key( $secret_key ) {
506
+	public function set_secret_key($secret_key) {
507 507
 		$this->secret_key = $secret_key;
508 508
 	}
509 509
 
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
 		$data       = $this->get_data();
517 517
 		$secret_key = $this->get_secret_key();
518 518
 
519
-		return self::compute_seal( $data, $secret_key );
519
+		return self::compute_seal($data, $secret_key);
520 520
 	}
521 521
 
522 522
 	/**
@@ -527,11 +527,11 @@  discard block
 block discarded – undo
527 527
 	 *
528 528
 	 * @return string seal
529 529
 	 */
530
-	public static function compute_seal( $data, $secret_key ) {
530
+	public static function compute_seal($data, $secret_key) {
531 531
 		$value = $data . $secret_key;
532
-		$value = utf8_encode( $value );
532
+		$value = utf8_encode($value);
533 533
 
534
-		return hash( self::HASH_ALGORITHM_SHA256, $value );
534
+		return hash(self::HASH_ALGORITHM_SHA256, $value);
535 535
 	}
536 536
 
537 537
 	/**
@@ -555,9 +555,9 @@  discard block
 block discarded – undo
555 555
 	 *
556 556
 	 * @return string
557 557
 	 */
558
-	public static function create_piped_string( array $data ) {
558
+	public static function create_piped_string(array $data) {
559 559
 		// @link http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/functions.php#L1385
560
-		return _http_build_query( $data, null, '|', '', false );
560
+		return _http_build_query($data, null, '|', '', false);
561 561
 	}
562 562
 
563 563
 	/**
@@ -567,14 +567,14 @@  discard block
 block discarded – undo
567 567
 	 *
568 568
 	 * @return array
569 569
 	 */
570
-	public static function parse_piped_string( $string ) {
570
+	public static function parse_piped_string($string) {
571 571
 		$data = array();
572 572
 
573
-		$pairs = explode( '|', $string );
574
-		foreach ( $pairs as $pair ) {
575
-			list( $key, $value ) = explode( '=', $pair );
573
+		$pairs = explode('|', $string);
574
+		foreach ($pairs as $pair) {
575
+			list($key, $value) = explode('=', $pair);
576 576
 
577
-			$data[ $key ] = $value;
577
+			$data[$key] = $value;
578 578
 		}
579 579
 
580 580
 		return $data;
Please login to merge, or discard this patch.
src/Gateway.php 1 patch
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -29,24 +29,24 @@  discard block
 block discarded – undo
29 29
 	 *
30 30
 	 * @param Config $config Config.
31 31
 	 */
32
-	public function __construct( Config $config ) {
33
-		parent::__construct( $config );
32
+	public function __construct(Config $config) {
33
+		parent::__construct($config);
34 34
 
35
-		$this->set_method( self::METHOD_HTML_FORM );
35
+		$this->set_method(self::METHOD_HTML_FORM);
36 36
 
37 37
 		// Client.
38 38
 		$this->client = new Client();
39 39
 
40 40
 		$action_url = Client::ACTION_URL_PRUDCTION;
41 41
 
42
-		if ( self::MODE_TEST === $config->mode ) {
42
+		if (self::MODE_TEST === $config->mode) {
43 43
 			$action_url = Client::ACTION_URL_TEST;
44 44
 		}
45 45
 
46
-		$this->client->set_action_url( $action_url );
47
-		$this->client->set_merchant_id( $config->merchant_id );
48
-		$this->client->set_key_version( $config->key_version );
49
-		$this->client->set_secret_key( $config->secret_key );
46
+		$this->client->set_action_url($action_url);
47
+		$this->client->set_merchant_id($config->merchant_id);
48
+		$this->client->set_key_version($config->key_version);
49
+		$this->client->set_secret_key($config->secret_key);
50 50
 	}
51 51
 
52 52
 	/**
@@ -70,33 +70,33 @@  discard block
 block discarded – undo
70 70
 	 *
71 71
 	 * @param Payment $payment Payment.
72 72
 	 */
73
-	public function start( Payment $payment ) {
74
-		$transaction_reference = $payment->get_meta( 'omnikassa_transaction_reference' );
73
+	public function start(Payment $payment) {
74
+		$transaction_reference = $payment->get_meta('omnikassa_transaction_reference');
75 75
 
76
-		if ( empty( $transaction_reference ) ) {
77
-			$transaction_reference = md5( uniqid( '', true ) );
76
+		if (empty($transaction_reference)) {
77
+			$transaction_reference = md5(uniqid('', true));
78 78
 
79
-			$payment->set_meta( 'omnikassa_transaction_reference', $transaction_reference );
79
+			$payment->set_meta('omnikassa_transaction_reference', $transaction_reference);
80 80
 		}
81 81
 
82
-		$payment->set_transaction_id( $transaction_reference );
83
-		$payment->set_action_url( $this->client->get_action_url() );
82
+		$payment->set_transaction_id($transaction_reference);
83
+		$payment->set_action_url($this->client->get_action_url());
84 84
 
85 85
 		$language = null;
86 86
 
87
-		if ( null !== $payment->get_customer() ) {
87
+		if (null !== $payment->get_customer()) {
88 88
 			$language = $payment->get_customer()->get_language();
89 89
 		}
90 90
 
91
-		$this->client->set_customer_language( LocaleHelper::transform( $language ) );
92
-		$this->client->set_currency_numeric_code( $payment->get_total_amount()->get_currency()->get_numeric_code() );
93
-		$this->client->set_order_id( $payment->format_string( $this->config->order_id ) );
94
-		$this->client->set_normal_return_url( home_url( '/' ) );
95
-		$this->client->set_automatic_response_url( home_url( '/' ) );
96
-		$this->client->set_amount( $payment->get_total_amount()->get_cents() );
97
-		$this->client->set_transaction_reference( $transaction_reference );
91
+		$this->client->set_customer_language(LocaleHelper::transform($language));
92
+		$this->client->set_currency_numeric_code($payment->get_total_amount()->get_currency()->get_numeric_code());
93
+		$this->client->set_order_id($payment->format_string($this->config->order_id));
94
+		$this->client->set_normal_return_url(home_url('/'));
95
+		$this->client->set_automatic_response_url(home_url('/'));
96
+		$this->client->set_amount($payment->get_total_amount()->get_cents());
97
+		$this->client->set_transaction_reference($transaction_reference);
98 98
 
99
-		switch ( $payment->get_method() ) {
99
+		switch ($payment->get_method()) {
100 100
 			/*
101 101
 			 * If this field is not supplied in the payment request, then
102 102
 			 * by default the customer will be redirected to the Rabo
@@ -128,38 +128,38 @@  discard block
 block discarded – undo
128 128
 			 */
129 129
 			case PaymentMethods::BANCONTACT:
130 130
 			case PaymentMethods::MISTER_CASH:
131
-				$this->client->add_payment_mean_brand( Methods::BCMC );
131
+				$this->client->add_payment_mean_brand(Methods::BCMC);
132 132
 
133 133
 				break;
134 134
 			case PaymentMethods::CREDIT_CARD:
135
-				$this->client->add_payment_mean_brand( Methods::MAESTRO );
136
-				$this->client->add_payment_mean_brand( Methods::MASTERCARD );
137
-				$this->client->add_payment_mean_brand( Methods::VISA );
138
-				$this->client->add_payment_mean_brand( Methods::VPAY );
135
+				$this->client->add_payment_mean_brand(Methods::MAESTRO);
136
+				$this->client->add_payment_mean_brand(Methods::MASTERCARD);
137
+				$this->client->add_payment_mean_brand(Methods::VISA);
138
+				$this->client->add_payment_mean_brand(Methods::VPAY);
139 139
 
140 140
 				break;
141 141
 			case PaymentMethods::DIRECT_DEBIT:
142
-				$this->client->add_payment_mean_brand( Methods::INCASSO );
142
+				$this->client->add_payment_mean_brand(Methods::INCASSO);
143 143
 
144 144
 				break;
145 145
 			case PaymentMethods::MAESTRO:
146
-				$this->client->add_payment_mean_brand( Methods::MAESTRO );
146
+				$this->client->add_payment_mean_brand(Methods::MAESTRO);
147 147
 
148 148
 				break;
149 149
 			case PaymentMethods::IDEAL:
150
-				$this->client->add_payment_mean_brand( Methods::IDEAL );
150
+				$this->client->add_payment_mean_brand(Methods::IDEAL);
151 151
 
152 152
 				break;
153 153
 			default:
154
-				$this->client->add_payment_mean_brand( Methods::IDEAL );
155
-				$this->client->add_payment_mean_brand( Methods::VISA );
156
-				$this->client->add_payment_mean_brand( Methods::MASTERCARD );
157
-				$this->client->add_payment_mean_brand( Methods::MAESTRO );
158
-				$this->client->add_payment_mean_brand( Methods::VPAY );
159
-				$this->client->add_payment_mean_brand( Methods::BCMC );
160
-				$this->client->add_payment_mean_brand( Methods::INCASSO );
161
-				$this->client->add_payment_mean_brand( Methods::ACCEPTGIRO );
162
-				$this->client->add_payment_mean_brand( Methods::REMBOURS );
154
+				$this->client->add_payment_mean_brand(Methods::IDEAL);
155
+				$this->client->add_payment_mean_brand(Methods::VISA);
156
+				$this->client->add_payment_mean_brand(Methods::MASTERCARD);
157
+				$this->client->add_payment_mean_brand(Methods::MAESTRO);
158
+				$this->client->add_payment_mean_brand(Methods::VPAY);
159
+				$this->client->add_payment_mean_brand(Methods::BCMC);
160
+				$this->client->add_payment_mean_brand(Methods::INCASSO);
161
+				$this->client->add_payment_mean_brand(Methods::ACCEPTGIRO);
162
+				$this->client->add_payment_mean_brand(Methods::REMBOURS);
163 163
 
164 164
 				break;
165 165
 		}
@@ -180,57 +180,57 @@  discard block
 block discarded – undo
180 180
 	 *
181 181
 	 * @param Payment $payment Payment.
182 182
 	 */
183
-	public function update_status( Payment $payment ) {
184
-		$input_data = filter_input( INPUT_POST, 'Data' );
185
-		$input_seal = filter_input( INPUT_POST, 'Seal', FILTER_SANITIZE_STRING );
183
+	public function update_status(Payment $payment) {
184
+		$input_data = filter_input(INPUT_POST, 'Data');
185
+		$input_seal = filter_input(INPUT_POST, 'Seal', FILTER_SANITIZE_STRING);
186 186
 
187
-		$data = Client::parse_piped_string( $input_data );
187
+		$data = Client::parse_piped_string($input_data);
188 188
 
189
-		$seal = Client::compute_seal( $input_data, $this->config->secret_key );
189
+		$seal = Client::compute_seal($input_data, $this->config->secret_key);
190 190
 
191 191
 		// Check if the posted seal is equal to our seal.
192
-		if ( 0 === strcasecmp( $input_seal, $seal ) ) {
192
+		if (0 === strcasecmp($input_seal, $seal)) {
193 193
 			$response_code = $data['responseCode'];
194 194
 
195
-			$status = ResponseCodes::transform( $response_code );
195
+			$status = ResponseCodes::transform($response_code);
196 196
 
197 197
 			// Set the status of the payment.
198
-			$payment->set_status( $status );
198
+			$payment->set_status($status);
199 199
 
200 200
 			$labels = array(
201
-				'amount'               => __( 'Amount', 'pronamic_ideal' ),
202
-				'captureDay'           => _x( 'Capture Day', 'creditcard', 'pronamic_ideal' ),
203
-				'captureMode'          => _x( 'Capture Mode', 'creditcard', 'pronamic_ideal' ),
204
-				'currencyCode'         => __( 'Currency Code', 'pronamic_ideal' ),
205
-				'merchantId'           => __( 'Merchant ID', 'pronamic_ideal' ),
206
-				'orderId'              => __( 'Order ID', 'pronamic_ideal' ),
207
-				'transactionDateTime'  => __( 'Transaction Date Time', 'pronamic_ideal' ),
208
-				'transactionReference' => __( 'Transaction Reference', 'pronamic_ideal' ),
209
-				'keyVersion'           => __( 'Key Version', 'pronamic_ideal' ),
210
-				'authorisationId'      => __( 'Authorisation ID', 'pronamic_ideal' ),
211
-				'paymentMeanBrand'     => __( 'Payment Mean Brand', 'pronamic_ideal' ),
212
-				'paymentMeanType'      => __( 'Payment Mean Type', 'pronamic_ideal' ),
213
-				'responseCode'         => __( 'Response Code', 'pronamic_ideal' ),
201
+				'amount'               => __('Amount', 'pronamic_ideal'),
202
+				'captureDay'           => _x('Capture Day', 'creditcard', 'pronamic_ideal'),
203
+				'captureMode'          => _x('Capture Mode', 'creditcard', 'pronamic_ideal'),
204
+				'currencyCode'         => __('Currency Code', 'pronamic_ideal'),
205
+				'merchantId'           => __('Merchant ID', 'pronamic_ideal'),
206
+				'orderId'              => __('Order ID', 'pronamic_ideal'),
207
+				'transactionDateTime'  => __('Transaction Date Time', 'pronamic_ideal'),
208
+				'transactionReference' => __('Transaction Reference', 'pronamic_ideal'),
209
+				'keyVersion'           => __('Key Version', 'pronamic_ideal'),
210
+				'authorisationId'      => __('Authorisation ID', 'pronamic_ideal'),
211
+				'paymentMeanBrand'     => __('Payment Mean Brand', 'pronamic_ideal'),
212
+				'paymentMeanType'      => __('Payment Mean Type', 'pronamic_ideal'),
213
+				'responseCode'         => __('Response Code', 'pronamic_ideal'),
214 214
 			);
215 215
 
216 216
 			$note = '';
217 217
 
218 218
 			$note .= '<p>';
219
-			$note .= __( 'OmniKassa transaction data in response message:', 'pronamic_ideal' );
219
+			$note .= __('OmniKassa transaction data in response message:', 'pronamic_ideal');
220 220
 			$note .= '</p>';
221 221
 
222 222
 			$note .= '<dl>';
223 223
 
224
-			foreach ( $labels as $key => $label ) {
225
-				if ( isset( $data[ $key ] ) ) {
226
-					$note .= sprintf( '<dt>%s</dt>', esc_html( $label ) );
227
-					$note .= sprintf( '<dd>%s</dd>', esc_html( $data[ $key ] ) );
224
+			foreach ($labels as $key => $label) {
225
+				if (isset($data[$key])) {
226
+					$note .= sprintf('<dt>%s</dt>', esc_html($label));
227
+					$note .= sprintf('<dd>%s</dd>', esc_html($data[$key]));
228 228
 				}
229 229
 			}
230 230
 
231 231
 			$note .= '</dl>';
232 232
 
233
-			$payment->add_note( $note );
233
+			$payment->add_note($note);
234 234
 		}
235 235
 	}
236 236
 }
Please login to merge, or discard this patch.
src/LocaleHelper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 	 *
21 21
 	 * @return string|null
22 22
 	 */
23
-	public static function transform( $language ) {
24
-		if ( ! is_string( $language ) ) {
23
+	public static function transform($language) {
24
+		if ( ! is_string($language)) {
25 25
 			return null;
26 26
 		}
27 27
 
@@ -38,13 +38,13 @@  discard block
 block discarded – undo
38 38
 		);
39 39
 
40 40
 		// Sub string.
41
-		$locale = substr( $language, 0, 2 );
41
+		$locale = substr($language, 0, 2);
42 42
 
43 43
 		// Upper case.
44
-		$locale = strtoupper( $locale );
44
+		$locale = strtoupper($locale);
45 45
 
46 46
 		// Is supported?
47
-		if ( in_array( $locale, $supported, true ) ) {
47
+		if (in_array($locale, $supported, true)) {
48 48
 			return $locale;
49 49
 		}
50 50
 
Please login to merge, or discard this patch.