Passed
Push — develop ( 8ad0f0...975412 )
by Remco
04:29
created
admin/meta-box-gateway-test.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	$html = $gateway->get_input_html();
45 45
 
46 46
 	if ( ! empty( $html ) ) {
47
-		$inputs[ $payment_method ] = array(
47
+		$inputs[$payment_method] = array(
48 48
 			'label' => $method_name,
49 49
 			'html'  => $html,
50 50
 		);
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
 					foreach ( $options as $key => $label ) {
168 168
 						$interval_suffix = '';
169 169
 
170
-						if ( isset( $options_interval_suffix[ $key ] ) ) {
171
-							$interval_suffix = $options_interval_suffix[ $key ];
170
+						if ( isset( $options_interval_suffix[$key] ) ) {
171
+							$interval_suffix = $options_interval_suffix[$key];
172 172
 						}
173 173
 
174 174
 						printf(
Please login to merge, or discard this patch.
admin/meta-box-gateway-config.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,13 +16,13 @@  discard block
 block discarded – undo
16 16
 $sections_fields = array();
17 17
 
18 18
 foreach ( $sections as $id => $section ) {
19
-	$sections_fields[ $id ] = array();
19
+	$sections_fields[$id] = array();
20 20
 }
21 21
 
22 22
 foreach ( $fields as $id => $field ) {
23 23
 	$section = $field['section'];
24 24
 
25
-	$sections_fields[ $section ][ $id ] = $field;
25
+	$sections_fields[$section][$id] = $field;
26 26
 }
27 27
 
28 28
 // Sections.
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
 
181 181
 					<?php
182 182
 
183
-					foreach ( $sections_fields[ $id ] as $field ) :
183
+					foreach ( $sections_fields[$id] as $field ) :
184 184
 
185 185
 						$classes = array();
186 186
 						if ( isset( $field['methods'] ) ) {
Please login to merge, or discard this patch.
src/readme-md/gateways.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -5,21 +5,21 @@  discard block
 block discarded – undo
5 5
 
6 6
 $providers = array();
7 7
 foreach ( $data as $provider ) {
8
-	$providers[ $provider->slug ] = $provider;
8
+	$providers[$provider->slug] = $provider;
9 9
 }
10 10
 
11 11
 $data     = file_get_contents( __DIR__ . '/../gateways.json' );
12 12
 $gateways = json_decode( $data );
13 13
 
14 14
 foreach ( $gateways as $gateway ) {
15
-	if ( isset( $providers[ $gateway->provider ] ) ) {
16
-		$provider = $providers[ $gateway->provider ];
15
+	if ( isset( $providers[$gateway->provider] ) ) {
16
+		$provider = $providers[$gateway->provider];
17 17
 
18 18
 		if ( ! isset( $provider->gateways ) ) {
19 19
 			$provider->gateways = array();
20 20
 		}
21 21
 
22
-		$provider->gateways[ $gateway->slug ] = $gateway;
22
+		$provider->gateways[$gateway->slug] = $gateway;
23 23
 	}
24 24
 }
25 25
 
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
 <?php foreach ( $gateways as $gateway ) : ?>
30 30
 | <?php
31 31
 
32
-if ( isset( $gateway->provider, $providers[ $gateway->provider ] ) ) {
33
-	$provider = $providers[ $gateway->provider ];
32
+if ( isset( $gateway->provider, $providers[$gateway->provider] ) ) {
33
+	$provider = $providers[$gateway->provider];
34 34
 
35 35
 	if ( isset( $provider->url ) ) {
36 36
 		printf( '[%s](%s)', $provider->name, $provider->url );
Please login to merge, or discard this patch.
src/readme-txt/gateways.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,21 +5,21 @@
 block discarded – undo
5 5
 
6 6
 $providers = array();
7 7
 foreach ( $data as $provider ) {
8
-	$providers[ $provider->slug ] = $provider;
8
+	$providers[$provider->slug] = $provider;
9 9
 }
10 10
 
11 11
 $data     = file_get_contents( __DIR__ . '/../gateways.json' );
12 12
 $gateways = json_decode( $data );
13 13
 
14 14
 foreach ( $gateways as $gateway ) {
15
-	if ( isset( $providers[ $gateway->provider ] ) ) {
16
-		$provider = $providers[ $gateway->provider ];
15
+	if ( isset( $providers[$gateway->provider] ) ) {
16
+		$provider = $providers[$gateway->provider];
17 17
 
18 18
 		if ( ! isset( $provider->gateways ) ) {
19 19
 			$provider->gateways = array();
20 20
 		}
21 21
 
22
-		$provider->gateways[ $gateway->slug ] = $gateway;
22
+		$provider->gateways[$gateway->slug] = $gateway;
23 23
 	}
24 24
 }
25 25
 
Please login to merge, or discard this patch.
classes/Admin/AdminGatewayPostType.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
 
93 93
 		$integrations = $this->plugin->gateway_integrations;
94 94
 
95
-		if ( isset( $integrations[ $id ] ) ) {
96
-			$integration = $integrations[ $id ];
95
+		if ( isset( $integrations[$id] ) ) {
96
+			$integration = $integrations[$id];
97 97
 		}
98 98
 
99 99
 		switch ( $column ) {
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 				$name   = $field['meta_key'];
284 284
 				$filter = $field['filter'];
285 285
 
286
-				$definition[ $name ] = $filter;
286
+				$definition[$name] = $filter;
287 287
 			}
288 288
 		}
289 289
 
@@ -292,15 +292,15 @@  discard block
 block discarded – undo
292 292
 		if ( ! empty( $data['_pronamic_gateway_id'] ) ) {
293 293
 			$integrations = $this->admin->plugin->gateway_integrations;
294 294
 
295
-			if ( isset( $integrations[ $data['_pronamic_gateway_id'] ] ) ) {
296
-				$integration = $integrations[ $data['_pronamic_gateway_id'] ];
295
+			if ( isset( $integrations[$data['_pronamic_gateway_id']] ) ) {
296
+				$integration = $integrations[$data['_pronamic_gateway_id']];
297 297
 			}
298 298
 
299 299
 			if ( $integration ) {
300 300
 				$settings = $integration->get_settings();
301 301
 
302 302
 				foreach ( $fields as $field ) {
303
-					if ( isset( $field['default'], $field['meta_key'], $data[ $field['meta_key'] ] ) ) {
303
+					if ( isset( $field['default'], $field['meta_key'], $data[$field['meta_key']] ) ) {
304 304
 						// Remove default value if not applicable to the selected gateway.
305 305
 						if ( isset( $field['methods'] ) ) {
306 306
 							$clean_default = array_intersect( $settings, $field['methods'] );
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 
311 311
 								// Only remove value if not saved before.
312 312
 								if ( empty( $meta_value ) ) {
313
-									$data[ $field['meta_key'] ] = null;
313
+									$data[$field['meta_key']] = null;
314 314
 
315 315
 									continue;
316 316
 								}
@@ -318,13 +318,13 @@  discard block
 block discarded – undo
318 318
 						}
319 319
 
320 320
 						// Set the default value if empty.
321
-						if ( empty( $data[ $field['meta_key'] ] ) ) {
321
+						if ( empty( $data[$field['meta_key']] ) ) {
322 322
 							$default = $field['default'];
323 323
 
324 324
 							if ( is_array( $default ) && 2 === count( $default ) && Util::class_method_exists( $default[0], $default[1] ) ) {
325
-								$data[ $field['meta_key'] ] = call_user_func( $default, $field );
325
+								$data[$field['meta_key']] = call_user_func( $default, $field );
326 326
 							} else {
327
-								$data[ $field['meta_key'] ] = $default;
327
+								$data[$field['meta_key']] = $default;
328 328
 							}
329 329
 						}
330 330
 					}
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
 		// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352797&filters[translation_id]=37948900
371 371
 		$scheduled_date = date_i18n( __( 'M j, Y @ H:i', 'pronamic_ideal' ), strtotime( $post->post_date ) );
372 372
 
373
-		$messages[ self::POST_TYPE ] = array(
373
+		$messages[self::POST_TYPE] = array(
374 374
 			0  => '', // Unused. Messages start at index 1.
375 375
 			1  => __( 'Configuration updated.', 'pronamic_ideal' ),
376 376
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352799&filters[translation_id]=37947229
Please login to merge, or discard this patch.
classes/Admin/AdminPaymentPostType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -545,7 +545,7 @@
 block discarded – undo
545 545
 		// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352797&filters[translation_id]=37948900
546 546
 		$scheduled_date = date_i18n( __( 'M j, Y @ H:i', 'pronamic_ideal' ), strtotime( $post->post_date ) );
547 547
 
548
-		$messages[ self::POST_TYPE ] = array(
548
+		$messages[self::POST_TYPE] = array(
549 549
 			0  => '', // Unused. Messages start at index 1.
550 550
 			1  => __( 'Payment updated.', 'pronamic_ideal' ),
551 551
 			// @see https://translate.wordpress.org/projects/wp/4.4.x/admin/nl/default?filters[status]=either&filters[original_id]=2352799&filters[translation_id]=37947229.
Please login to merge, or discard this patch.
classes/Admin/GatewaySettings.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -131,13 +131,13 @@
 block discarded – undo
131 131
 		foreach ( $supported as $payment_method ) {
132 132
 			$name = PaymentMethods::get_name( $payment_method );
133 133
 
134
-			$payment_methods[ $payment_method ] = array(
134
+			$payment_methods[$payment_method] = array(
135 135
 				'id'        => $payment_method,
136 136
 				'name'      => $name,
137 137
 				'available' => in_array( $payment_method, $available, true ),
138 138
 			);
139 139
 
140
-			$sort[ $payment_method ] = $name;
140
+			$sort[$payment_method] = $name;
141 141
 		}
142 142
 
143 143
 		$sort_flags = SORT_STRING;
Please login to merge, or discard this patch.
classes/Admin/AdminReports.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -343,8 +343,8 @@
 block discarded – undo
343 343
 			$key = $date->format( 'Y-m' );
344 344
 
345 345
 			$value = 0;
346
-			if ( isset( $data[ $key ] ) ) {
347
-				$value = (float) $data[ $key ]->value;
346
+			if ( isset( $data[$key] ) ) {
347
+				$value = (float) $data[$key]->value;
348 348
 			}
349 349
 
350 350
 			$report[] = array(
Please login to merge, or discard this patch.
classes/Admin/AdminModule.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -596,10 +596,10 @@
 block discarded – undo
596 596
 
597 597
 			if ( is_array( $class ) ) {
598 598
 				foreach ( $class as $c ) {
599
-					$classes[ $c ] = $c;
599
+					$classes[$c] = $c;
600 600
 				}
601 601
 			} else {
602
-				$classes[ $class ] = $class;
602
+				$classes[$class] = $class;
603 603
 			}
604 604
 		}
605 605
 
Please login to merge, or discard this patch.