Passed
Push — master ( bd3828...767719 )
by Mike
06:57 queued 18s
created
src/Autoloader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 		}
77 77
 
78 78
 		if ( array_key_exists( $class, self::$classmap ) ) {
79
-			return include self::$classmap[ $class ];
79
+			return include self::$classmap[$class];
80 80
 		}
81 81
 	}
82 82
 }
Please login to merge, or discard this patch.
src/Controllers/Version4/Coupons.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -148,19 +148,19 @@  discard block
 block discarded – undo
148 148
 
149 149
 		// Format decimal values.
150 150
 		foreach ( $format_decimal as $key ) {
151
-			$data[ $key ] = wc_format_decimal( $data[ $key ], 2 );
151
+			$data[$key] = wc_format_decimal( $data[$key], 2 );
152 152
 		}
153 153
 
154 154
 		// Format date values.
155 155
 		foreach ( $format_date as $key ) {
156
-			$datetime              = $data[ $key ];
157
-			$data[ $key ]          = wc_rest_prepare_date_response( $datetime, false );
158
-			$data[ $key . '_gmt' ] = wc_rest_prepare_date_response( $datetime );
156
+			$datetime              = $data[$key];
157
+			$data[$key]          = wc_rest_prepare_date_response( $datetime, false );
158
+			$data[$key . '_gmt'] = wc_rest_prepare_date_response( $datetime );
159 159
 		}
160 160
 
161 161
 		// Format null values.
162 162
 		foreach ( $format_null as $key ) {
163
-			$data[ $key ] = $data[ $key ] ? $data[ $key ] : null;
163
+			$data[$key] = $data[$key] ? $data[$key] : null;
164 164
 		}
165 165
 
166 166
 		return array(
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 
267 267
 		// Handle all writable props.
268 268
 		foreach ( $data_keys as $key ) {
269
-			$value = $request[ $key ];
269
+			$value = $request[$key];
270 270
 
271 271
 			if ( ! is_null( $value ) ) {
272 272
 				switch ( $key ) {
Please login to merge, or discard this patch.
src/Controllers/Version4/TaxClasses.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -232,7 +232,7 @@
 block discarded – undo
232 232
 		foreach ( $classes as $key => $class ) {
233 233
 			if ( sanitize_title( $class ) === $tax_class['slug'] ) {
234 234
 				$tax_class['name'] = $class;
235
-				unset( $classes[ $key ] );
235
+				unset( $classes[$key] );
236 236
 				$deleted = true;
237 237
 				break;
238 238
 			}
Please login to merge, or discard this patch.
src/Controllers/Version4/Webhooks.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -722,13 +722,13 @@  discard block
 block discarded – undo
722 722
 
723 723
 		$params['context']['default'] = 'view';
724 724
 
725
-		$params['after']   = array(
725
+		$params['after'] = array(
726 726
 			'description'       => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ),
727 727
 			'type'              => 'string',
728 728
 			'format'            => 'date-time',
729 729
 			'validate_callback' => 'rest_validate_request_arg',
730 730
 		);
731
-		$params['before']  = array(
731
+		$params['before'] = array(
732 732
 			'description'       => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ),
733 733
 			'type'              => 'string',
734 734
 			'format'            => 'date-time',
@@ -752,13 +752,13 @@  discard block
 block discarded – undo
752 752
 			'default'           => array(),
753 753
 			'sanitize_callback' => 'wp_parse_id_list',
754 754
 		);
755
-		$params['offset']  = array(
755
+		$params['offset'] = array(
756 756
 			'description'       => __( 'Offset the result set by a specific number of items.', 'woocommerce' ),
757 757
 			'type'              => 'integer',
758 758
 			'sanitize_callback' => 'absint',
759 759
 			'validate_callback' => 'rest_validate_request_arg',
760 760
 		);
761
-		$params['order']   = array(
761
+		$params['order'] = array(
762 762
 			'description'       => __( 'Order sort attribute ascending or descending.', 'woocommerce' ),
763 763
 			'type'              => 'string',
764 764
 			'default'           => 'desc',
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
 			),
777 777
 			'validate_callback' => 'rest_validate_request_arg',
778 778
 		);
779
-		$params['status']  = array(
779
+		$params['status'] = array(
780 780
 			'default'           => 'all',
781 781
 			'description'       => __( 'Limit result set to webhooks assigned a specific status.', 'woocommerce' ),
782 782
 			'type'              => 'string',
Please login to merge, or discard this patch.
src/Controllers/Version4/ShippingZoneMethods.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -309,17 +309,17 @@  discard block
 block discarded – undo
309 309
 			$instance_settings = $method->instance_settings;
310 310
 			$errors_found      = false;
311 311
 			foreach ( $method->get_instance_form_fields() as $key => $field ) {
312
-				if ( isset( $request['settings'][ $key ] ) ) {
312
+				if ( isset( $request['settings'][$key] ) ) {
313 313
 					if ( is_callable( array( $this, 'validate_setting_' . $field['type'] . '_field' ) ) ) {
314
-						$value = $this->{'validate_setting_' . $field['type'] . '_field'}( $request['settings'][ $key ], $field );
314
+						$value = $this->{'validate_setting_' . $field['type'] . '_field'}( $request['settings'][$key], $field );
315 315
 					} else {
316
-						$value = $this->validate_setting_text_field( $request['settings'][ $key ], $field );
316
+						$value = $this->validate_setting_text_field( $request['settings'][$key], $field );
317 317
 					}
318 318
 					if ( is_wp_error( $value ) ) {
319 319
 						$errors_found = true;
320 320
 						break;
321 321
 					}
322
-					$instance_settings[ $key ] = $value;
322
+					$instance_settings[$key] = $value;
323 323
 				}
324 324
 			}
325 325
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 				'label'       => $field['title'],
398 398
 				'description' => empty( $field['description'] ) ? '' : $field['description'],
399 399
 				'type'        => $field['type'],
400
-				'value'       => $item->instance_settings[ $id ],
400
+				'value'       => $item->instance_settings[$id],
401 401
 				'default'     => empty( $field['default'] ) ? '' : $field['default'],
402 402
 				'tip'         => empty( $field['description'] ) ? '' : $field['description'],
403 403
 				'placeholder' => empty( $field['placeholder'] ) ? '' : $field['placeholder'],
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 			if ( ! empty( $field['options'] ) ) {
406 406
 				$data['options'] = $field['options'];
407 407
 			}
408
-			$settings[ $id ] = $data;
408
+			$settings[$id] = $data;
409 409
 		}
410 410
 		return $settings;
411 411
 	}
Please login to merge, or discard this patch.
src/Controllers/Version4/NetworkOrders.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,25 +46,25 @@
 block discarded – undo
46 46
 	public function get_public_item_schema() {
47 47
 		$schema = parent::get_public_item_schema();
48 48
 
49
-		$schema['properties']['blog']              = array(
49
+		$schema['properties']['blog'] = array(
50 50
 			'description' => __( 'Blog id of the record on the multisite.', 'woocommerce' ),
51 51
 			'type'        => 'integer',
52 52
 			'context'     => array( 'view' ),
53 53
 			'readonly'    => true,
54 54
 		);
55
-		$schema['properties']['edit_url']          = array(
55
+		$schema['properties']['edit_url'] = array(
56 56
 			'description' => __( 'URL to edit the order', 'woocommerce' ),
57 57
 			'type'        => 'string',
58 58
 			'context'     => array( 'view' ),
59 59
 			'readonly'    => true,
60 60
 		);
61
-		$schema['properties']['customer'][]        = array(
61
+		$schema['properties']['customer'][] = array(
62 62
 			'description' => __( 'Name of the customer for the order', 'woocommerce' ),
63 63
 			'type'        => 'string',
64 64
 			'context'     => array( 'view' ),
65 65
 			'readonly'    => true,
66 66
 		);
67
-		$schema['properties']['status_name'][]     = array(
67
+		$schema['properties']['status_name'][] = array(
68 68
 			'description' => __( 'Order Status', 'woocommerce' ),
69 69
 			'type'        => 'string',
70 70
 			'context'     => array( 'view' ),
Please login to merge, or discard this patch.
src/Controllers/Version4/Data/Currencies.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 
91 91
 		$currency = array(
92 92
 			'code'   => $code,
93
-			'name'   => $currencies[ $code ],
93
+			'name'   => $currencies[$code],
94 94
 			'symbol' => get_woocommerce_currency_symbol( $code ),
95 95
 		);
96 96
 
Please login to merge, or discard this patch.
src/Controllers/Version4/Data/Continents.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 			return false;
83 83
 		}
84 84
 
85
-		$continent_list = $continents[ $continent_code ];
85
+		$continent_list = $continents[$continent_code];
86 86
 
87 87
 		$continent = array(
88 88
 			'code' => $continent_code,
@@ -91,17 +91,17 @@  discard block
 block discarded – undo
91 91
 
92 92
 		$local_countries = array();
93 93
 		foreach ( $continent_list['countries'] as $country_code ) {
94
-			if ( isset( $countries[ $country_code ] ) ) {
94
+			if ( isset( $countries[$country_code] ) ) {
95 95
 				$country = array(
96 96
 					'code' => $country_code,
97
-					'name' => $countries[ $country_code ],
97
+					'name' => $countries[$country_code],
98 98
 				);
99 99
 
100 100
 				// If we have detailed locale information include that in the response.
101 101
 				if ( array_key_exists( $country_code, $locale_info ) ) {
102 102
 					// Defensive programming against unexpected changes in locale-info.php.
103 103
 					$country_data = wp_parse_args(
104
-						$locale_info[ $country_code ],
104
+						$locale_info[$country_code],
105 105
 						array(
106 106
 							'currency_code'  => 'USD',
107 107
 							'currency_pos'   => 'left',
@@ -117,8 +117,8 @@  discard block
 block discarded – undo
117 117
 				}
118 118
 
119 119
 				$local_states = array();
120
-				if ( isset( $states[ $country_code ] ) ) {
121
-					foreach ( $states[ $country_code ] as $state_code => $state_name ) {
120
+				if ( isset( $states[$country_code] ) ) {
121
+					foreach ( $states[$country_code] as $state_code => $state_name ) {
122 122
 						$local_states[] = array(
123 123
 							'code' => $state_code,
124 124
 							'name' => $state_name,
Please login to merge, or discard this patch.
src/Controllers/Version4/Data/Countries.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -81,12 +81,12 @@
 block discarded – undo
81 81
 
82 82
 		$country = array(
83 83
 			'code' => $country_code,
84
-			'name' => $countries[ $country_code ],
84
+			'name' => $countries[$country_code],
85 85
 		);
86 86
 
87 87
 		$local_states = array();
88
-		if ( isset( $states[ $country_code ] ) ) {
89
-			foreach ( $states[ $country_code ] as $state_code => $state_name ) {
88
+		if ( isset( $states[$country_code] ) ) {
89
+			foreach ( $states[$country_code] as $state_code => $state_name ) {
90 90
 				$local_states[] = array(
91 91
 					'code' => $state_code,
92 92
 					'name' => $state_name,
Please login to merge, or discard this patch.