Passed
Push — develop ( 3adc2f...c1e48d )
by Reüel
04:53
created
src/repositories.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -75,11 +75,11 @@  discard block
 block discarded – undo
75 75
 		// Git flow
76 76
 		chdir( $git_dir );
77 77
 
78
-		if ( isset( $argv[1] ) && 'develop' === $argv[1] ) {
78
+		if ( isset( $argv[ 1 ] ) && 'develop' === $argv[ 1 ] ) {
79 79
 			`git checkout develop`;
80 80
 		}
81 81
 
82
-		if ( isset( $argv[1] ) && 'pull' === $argv[1] ) {
82
+		if ( isset( $argv[ 1 ] ) && 'pull' === $argv[ 1 ] ) {
83 83
 			$command = 'git pull';
84 84
 
85 85
 			echo $command, PHP_EOL;
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
 			echo shell_exec( $command ), PHP_EOL;
88 88
 		}
89 89
 
90
-		if ( isset( $argv[1], $argv[2] ) && in_array( $argv[1], array( 'git', 'composer', 'yarn' ) ) ) {
91
-			$command = sprintf( '%s %s', $argv[1], $argv[2] );
90
+		if ( isset( $argv[ 1 ], $argv[ 2 ] ) && in_array( $argv[ 1 ], array( 'git', 'composer', 'yarn' ) ) ) {
91
+			$command = sprintf( '%s %s', $argv[ 1 ], $argv[ 2 ] );
92 92
 		}
93 93
 
94 94
 		if ( null !== $command ) {
Please login to merge, or discard this patch.
tests/Payments/PaymentTest.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
 
47 47
 	public function get_and_set_provider() {
48 48
 		return array(
49
-			array( 'set_amount',         'get_amount',         new Money( 89.95, 'EUR' ) ),
50
-			array( 'set_id',             'get_id',             uniqid()    ),
51
-			array( 'set_transaction_id', 'get_transaction_id', uniqid()    ),
52
-			array( 'set_status',         'get_status',         'completed' ),
49
+			array( 'set_amount', 'get_amount', new Money( 89.95, 'EUR' ) ),
50
+			array( 'set_id', 'get_id', uniqid() ),
51
+			array( 'set_transaction_id', 'get_transaction_id', uniqid() ),
52
+			array( 'set_status', 'get_status', 'completed' ),
53 53
 		);
54 54
 	}
55 55
 
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
 
69 69
 	public function set_provider() {
70 70
 		return array(
71
-			array( 'set_consumer_name',           'consumer_name',           'John Doe' ),
71
+			array( 'set_consumer_name', 'consumer_name', 'John Doe' ),
72 72
 			array( 'set_consumer_account_number', 'consumer_account_number', '1086.34.779' ),
73
-			array( 'set_consumer_iban',           'consumer_iban',           'NL56 RABO 0108 6347 79' ),
74
-			array( 'set_consumer_bic',            'consumer_bic',            'RABONL2U' ),
75
-			array( 'set_consumer_city',           'consumer_city',           'Drachten' ),
73
+			array( 'set_consumer_iban', 'consumer_iban', 'NL56 RABO 0108 6347 79' ),
74
+			array( 'set_consumer_bic', 'consumer_bic', 'RABONL2U' ),
75
+			array( 'set_consumer_city', 'consumer_city', 'Drachten' ),
76 76
 		);
77 77
 	}
78 78
 
@@ -91,23 +91,23 @@  discard block
 block discarded – undo
91 91
 
92 92
 	public function get_provider() {
93 93
 		return array(
94
-			array( 'order_id',            'get_order_id',            1234 ),
95
-			array( 'method',              'get_method',              'ideal' ),
96
-			array( 'issuer',              'get_issuer',              'ideal_KNABNL2H' ),
97
-			array( 'language',            'get_language',            'nl' ),
98
-			array( 'locale',              'get_locale',              'nl_NL' ),
99
-			array( 'description',         'get_description',         'Lorem ipsum dolor sit amet, consectetur.' ),
100
-			array( 'email',               'get_email',               '[email protected]' ),
101
-			array( 'first_name',          'get_first_name',          'John' ),
102
-			array( 'last_name',           'get_last_name',           'Doe' ),
103
-			array( 'customer_name',       'get_customer_name',       'John Doe' ),
104
-			array( 'address',             'get_address',             'Burgemeester Wuiteweg 39b' ),
105
-			array( 'city',                'get_city',                'Drachten' ),
106
-			array( 'zip',                 'get_zip',                 '9203 KA' ),
107
-			array( 'country',             'get_country',             'NL' ),
108
-			array( 'telephone_number',    'get_telephone_number',    '1234567890' ),
94
+			array( 'order_id', 'get_order_id', 1234 ),
95
+			array( 'method', 'get_method', 'ideal' ),
96
+			array( 'issuer', 'get_issuer', 'ideal_KNABNL2H' ),
97
+			array( 'language', 'get_language', 'nl' ),
98
+			array( 'locale', 'get_locale', 'nl_NL' ),
99
+			array( 'description', 'get_description', 'Lorem ipsum dolor sit amet, consectetur.' ),
100
+			array( 'email', 'get_email', '[email protected]' ),
101
+			array( 'first_name', 'get_first_name', 'John' ),
102
+			array( 'last_name', 'get_last_name', 'Doe' ),
103
+			array( 'customer_name', 'get_customer_name', 'John Doe' ),
104
+			array( 'address', 'get_address', 'Burgemeester Wuiteweg 39b' ),
105
+			array( 'city', 'get_city', 'Drachten' ),
106
+			array( 'zip', 'get_zip', '9203 KA' ),
107
+			array( 'country', 'get_country', 'NL' ),
108
+			array( 'telephone_number', 'get_telephone_number', '1234567890' ),
109 109
 			array( 'analytics_client_id', 'get_analytics_client_id', 'GA1.2.1234567890.1234567890' ),
110
-			array( 'entrance_code',       'get_entrance_code',       uniqid() ),
110
+			array( 'entrance_code', 'get_entrance_code', uniqid() ),
111 111
 		);
112 112
 	}
113 113
 
Please login to merge, or discard this patch.
tests/Subscriptions/SubscriptionTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -44,10 +44,10 @@  discard block
 block discarded – undo
44 44
 
45 45
 	public function get_and_set_provider() {
46 46
 		return array(
47
-			array( 'set_amount',         'get_amount',         new Money( 89.95, 'EUR' ) ),
48
-			array( 'set_id',             'get_id',             uniqid()    ),
49
-			array( 'set_status',         'get_status',         'completed' ),
50
-			array( 'set_transaction_id', 'get_transaction_id', uniqid()    ),
47
+			array( 'set_amount', 'get_amount', new Money( 89.95, 'EUR' ) ),
48
+			array( 'set_id', 'get_id', uniqid() ),
49
+			array( 'set_status', 'get_status', 'completed' ),
50
+			array( 'set_transaction_id', 'get_transaction_id', uniqid() ),
51 51
 		);
52 52
 	}
53 53
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 		return array(
74 74
 			array( 'set_consumer_name', 'consumer_name', 'John Doe' ),
75 75
 			array( 'set_consumer_iban', 'consumer_iban', 'NL56 RABO 0108 6347 79' ),
76
-			array( 'set_consumer_bic',  'consumer_bic',  'RABONL2U' ),
76
+			array( 'set_consumer_bic', 'consumer_bic', 'RABONL2U' ),
77 77
 		);
78 78
 	}
79 79
 
@@ -97,13 +97,13 @@  discard block
 block discarded – undo
97 97
 	 */
98 98
 	public function get_provider() {
99 99
 		return array(
100
-			array( 'key',                 'get_key',             uniqid() ),
101
-			array( 'source',              'get_source',          'woocommerce' ),
102
-			array( 'source_id',           'get_source_id',       '1234' ),
103
-			array( 'frequency',           'get_frequency',       'daily' ),
104
-			array( 'interval',            'get_interval',        '1' ),
105
-			array( 'interval_period',     'get_interval_period', 'Y' ),
106
-			array( 'description',         'get_description',     'Lorem ipsum dolor sit amet, consectetur.' ),
100
+			array( 'key', 'get_key', uniqid() ),
101
+			array( 'source', 'get_source', 'woocommerce' ),
102
+			array( 'source_id', 'get_source_id', '1234' ),
103
+			array( 'frequency', 'get_frequency', 'daily' ),
104
+			array( 'interval', 'get_interval', '1' ),
105
+			array( 'interval_period', 'get_interval_period', 'Y' ),
106
+			array( 'description', 'get_description', 'Lorem ipsum dolor sit amet, consectetur.' ),
107 107
 		);
108 108
 	}
109 109
 
Please login to merge, or discard this patch.
includes/functions.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	$results = $wpdb->get_results( $db_query ); // WPCS: unprepared SQL ok.
86 86
 
87 87
 	foreach ( $results as $result ) {
88
-		$payments[] = new Payment( $result->post_id );
88
+		$payments[ ] = new Payment( $result->post_id );
89 89
 	}
90 90
 
91 91
 	return $payments;
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 	$results = $wpdb->get_results( $db_query ); // WPCS: unprepared SQL ok.
195 195
 
196 196
 	foreach ( $results as $result ) {
197
-		$subscriptions[] = new Subscription( $result->post_id );
197
+		$subscriptions[ ] = new Subscription( $result->post_id );
198 198
 	}
199 199
 
200 200
 	return $subscriptions;
@@ -210,13 +210,13 @@  discard block
 block discarded – undo
210 210
 
211 211
 	foreach ( $pronamic_ideal->gateway_integrations as $integration ) {
212 212
 		if ( isset( $pronamic_pay_providers[ $integration->provider ] ) ) {
213
-			$provider =& $pronamic_pay_providers[ $integration->provider ];
213
+			$provider = & $pronamic_pay_providers[ $integration->provider ];
214 214
 
215
-			if ( ! isset( $provider['integrations'] ) ) {
216
-				$provider['integrations'] = array();
215
+			if ( ! isset( $provider[ 'integrations' ] ) ) {
216
+				$provider[ 'integrations' ] = array();
217 217
 			}
218 218
 
219
-			$provider['integrations'][] = $integration;
219
+			$provider[ 'integrations' ][ ] = $integration;
220 220
 		}
221 221
 	}
222 222
 }
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 	if ( false === $separator ) {
272 272
 		// WordPress locale number format was introduced in WordPress version 2.3.
273 273
 		// @see https://github.com/WordPress/WordPress/blob/2.3/wp-includes/locale.php#L90-L100.
274
-		$separator = $wp_locale->number_format['thousands_sep'];
274
+		$separator = $wp_locale->number_format[ 'thousands_sep' ];
275 275
 	}
276 276
 
277 277
 	return $separator;
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
 	if ( false === $separator ) {
293 293
 		// WordPress locale number format was introduced in WordPress version 2.3.
294 294
 		// @see https://github.com/WordPress/WordPress/blob/2.3/wp-includes/locale.php#L90-L100.
295
-		$separator = $wp_locale->number_format['decimal_point'];
295
+		$separator = $wp_locale->number_format[ 'decimal_point' ];
296 296
 	}
297 297
 
298 298
 	return $separator ? $separator : '.';
Please login to merge, or discard this patch.
classes/Payments/PaymentsModule.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
 	 * @return array
80 80
 	 */
81 81
 	public function exclude_payment_comment_notes( $clauses, $query ) {
82
-		$type = $query->query_vars['type'];
82
+		$type = $query->query_vars[ 'type' ];
83 83
 
84 84
 		// Ignore payment notes comments if it's not specifically requested.
85 85
 		if ( 'payment_note' !== $type ) {
86
-			$clauses['where'] .= " AND comment_type != 'payment_note'";
86
+			$clauses[ 'where' ] .= " AND comment_type != 'payment_note'";
87 87
 		}
88 88
 
89 89
 		return $clauses;
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 			return $exporters;
191 191
 		}
192 192
 
193
-		$exporters['pronamic-pay-payments'] = array(
193
+		$exporters[ 'pronamic-pay-payments' ] = array(
194 194
 			'exporter_friendly_name' => __( 'Pronamic Pay Payments', 'pronamic_ideal' ),
195 195
 			'callback'               => array( $this, 'privacy_export' ),
196 196
 		);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
 				}
234 234
 
235 235
 				// Add meta to export data.
236
-				$data[] = array(
236
+				$data[ ] = array(
237 237
 					'name'  => $meta_key,
238 238
 					'value' => $meta_value,
239 239
 				);
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
 
242 242
 			// Add item to export data.
243 243
 			if ( ! empty( $data ) ) {
244
-				$items[] = array(
244
+				$items[ ] = array(
245 245
 					'group_id'    => 'pronamic-payments',
246 246
 					'group_label' => __( 'Payments', 'pronamic_ideal' ),
247 247
 					'item_id'     => 'pronamic-payment-' . $payment->get_id(),
Please login to merge, or discard this patch.
classes/Subscriptions/SubscriptionsModule.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 		// Handle renewals.
313 313
 		if ( is_array( $renewal ) ) {
314 314
 			$payment->recurring = false;
315
-			$payment->issuer    = $renewal['issuer'];
315
+			$payment->issuer    = $renewal[ 'issuer' ];
316 316
 		}
317 317
 
318 318
 		// Start payment.
@@ -356,11 +356,11 @@  discard block
 block discarded – undo
356 356
 	 * @return array
357 357
 	 */
358 358
 	public function exclude_subscription_comment_notes( $clauses, $query ) {
359
-		$type = $query->query_vars['type'];
359
+		$type = $query->query_vars[ 'type' ];
360 360
 
361 361
 		// Ignore subscription notes comments if it's not specifically requested.
362 362
 		if ( 'subscription_note' !== $type ) {
363
-			$clauses['where'] .= " AND comment_type != 'subscription_note'";
363
+			$clauses[ 'where' ] .= " AND comment_type != 'subscription_note'";
364 364
 		}
365 365
 
366 366
 		return $clauses;
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 			return $exporters;
586 586
 		}
587 587
 
588
-		$exporters['pronamic-pay-subscriptions'] = array(
588
+		$exporters[ 'pronamic-pay-subscriptions' ] = array(
589 589
 			'exporter_friendly_name' => __( 'Pronamic Pay Subscriptions', 'pronamic_ideal' ),
590 590
 			'callback'               => array( $this, 'privacy_export' ),
591 591
 		);
@@ -628,7 +628,7 @@  discard block
 block discarded – undo
628 628
 				}
629 629
 
630 630
 				// Add meta to export data.
631
-				$data[] = array(
631
+				$data[ ] = array(
632 632
 					'name'  => $meta_key,
633 633
 					'value' => $meta_value,
634 634
 				);
@@ -636,7 +636,7 @@  discard block
 block discarded – undo
636 636
 
637 637
 			// Add item to export data.
638 638
 			if ( ! empty( $data ) ) {
639
-				$items[] = array(
639
+				$items[ ] = array(
640 640
 					'group_id'    => 'pronamic-subscriptions',
641 641
 					'group_label' => __( 'Subscriptions', 'pronamic_ideal' ),
642 642
 					'item_id'     => 'pronamic-subscription-' . $subscription->get_id(),
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
 		);
745 745
 
746 746
 		if ( ! $cli_test ) {
747
-			$args['meta_query'][] = array(
747
+			$args[ 'meta_query' ][ ] = array(
748 748
 				'key'     => '_pronamic_subscription_next_payment',
749 749
 				'compare' => '<=',
750 750
 				'value'   => current_time( 'mysql', true ),
Please login to merge, or discard this patch.