Completed
Push — master ( 31131b...6176aa )
by Mike
15:27
created
src/Controllers/Version4/Requests/OrderRequest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 		foreach ( $request_props as $prop => $value ) {
57 57
 			switch ( $prop ) {
58 58
 				case 'customer_id':
59
-					$prop_values[ $prop ] = $this->parse_customer_id_field( $value );
59
+					$prop_values[$prop] = $this->parse_customer_id_field( $value );
60 60
 					break;
61 61
 				case 'billing':
62 62
 				case 'shipping':
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 					$prop_values = array_merge( $prop_values, $address );
65 65
 					break;
66 66
 				default:
67
-					$prop_values[ $prop ] = $value;
67
+					$prop_values[$prop] = $value;
68 68
 			}
69 69
 		}
70 70
 
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
 		];
87 87
 
88 88
 		foreach ( $types as $type ) {
89
-			if ( ! isset( $this->request[ $type ] ) || ! is_array( $this->request[ $type ] ) ) {
89
+			if ( ! isset( $this->request[$type] ) || ! is_array( $this->request[$type] ) ) {
90 90
 				continue;
91 91
 			}
92
-			$items = $this->request[ $type ];
92
+			$items = $this->request[$type];
93 93
 
94 94
 			foreach ( $items as $item ) {
95 95
 				if ( ! is_array( $item ) ) {
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 		$keys = array( 'product_id', 'method_id', 'method_title', 'name', 'code' );
116 116
 
117 117
 		foreach ( $keys as $key ) {
118
-			if ( array_key_exists( $key, $item ) && is_null( $item[ $key ] ) ) {
118
+			if ( array_key_exists( $key, $item ) && is_null( $item[$key] ) ) {
119 119
 				return true;
120 120
 			}
121 121
 		}
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
 	 * @param array          $posted Request data.
132 132
 	 */
133 133
 	protected function maybe_set_item_prop( $item, $prop, $posted ) {
134
-		if ( isset( $posted[ $prop ] ) ) {
135
-			$item->{"set_$prop"}( $posted[ $prop ] );
134
+		if ( isset( $posted[$prop] ) ) {
135
+			$item->{"set_$prop"}( $posted[$prop] );
136 136
 		}
137 137
 	}
138 138
 
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 		$address = [];
319 319
 		foreach ( $data as $key => $value ) {
320 320
 			if ( is_callable( array( $object, "set_{$type}_{$key}" ) ) ) {
321
-				$address[ "{$type}_{$key}" ] = $value;
321
+				$address["{$type}_{$key}"] = $value;
322 322
 			}
323 323
 		}
324 324
 		return $address;
Please login to merge, or discard this patch.
src/Controllers/Version4/SystemStatus.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@
 block discarded – undo
68 68
 		$response = array();
69 69
 
70 70
 		foreach ( $mappings as $section => $values ) {
71
-			$response[ $section ] = $values;
71
+			$response[$section] = $values;
72 72
 		}
73 73
 
74 74
 		$response = $this->prepare_item_for_response( $response, $request );
Please login to merge, or discard this patch.
src/Utilities/PluginInformation.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 	 * @return array
37 37
 	 */
38 38
 	public function get_active_plugin_data() {
39
-		return array_map( [ $this, 'format_plugin_data' ], array_map( [ $this, 'get_plugin_data' ], $this->get_active_plugins() ) );
39
+		return array_map( [$this, 'format_plugin_data'], array_map( [$this, 'get_plugin_data'], $this->get_active_plugins() ) );
40 40
 	}
41 41
 
42 42
 	/**
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 	 * @return array
46 46
 	 */
47 47
 	public function get_inactive_plugin_data() {
48
-		return array_map( [ $this, 'format_plugin_data' ], array_map( [ $this, 'get_plugin_data' ], $this->get_inactive_plugins() ) );
48
+		return array_map( [$this, 'format_plugin_data'], array_map( [$this, 'get_plugin_data'], $this->get_inactive_plugins() ) );
49 49
 	}
50 50
 
51 51
 	/**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * @return array
56 56
 	 */
57 57
 	public function get_dropin_and_mu_plugin_data() {
58
-		$plugins               = [
58
+		$plugins = [
59 59
 			'dropins'    => [],
60 60
 			'mu_plugins' => [],
61 61
 		];
@@ -131,8 +131,8 @@  discard block
 block discarded – undo
131 131
 		$version_latest = $data['Version'];
132 132
 
133 133
 		// Find latest version.
134
-		if ( isset( $this->available_updates[ $data['plugin_file'] ]->update->new_version ) ) {
135
-			$version_latest = $this->available_updates[ $data['plugin_file'] ]->update->new_version;
134
+		if ( isset( $this->available_updates[$data['plugin_file']]->update->new_version ) ) {
135
+			$version_latest = $this->available_updates[$data['plugin_file']]->update->new_version;
136 136
 		}
137 137
 
138 138
 		return array(
Please login to merge, or discard this patch.
src/Utilities/WooEnvironment.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,14 +23,14 @@
 block discarded – undo
23 23
 		$term_response = array();
24 24
 		$terms         = get_terms( 'product_type', array( 'hide_empty' => 0 ) );
25 25
 		foreach ( $terms as $term ) {
26
-			$term_response[ $term->slug ] = strtolower( $term->name );
26
+			$term_response[$term->slug] = strtolower( $term->name );
27 27
 		}
28 28
 
29 29
 		// Get a list of terms used for product visibility.
30 30
 		$product_visibility_terms = array();
31 31
 		$terms                    = get_terms( 'product_visibility', array( 'hide_empty' => 0 ) );
32 32
 		foreach ( $terms as $term ) {
33
-			$product_visibility_terms[ $term->slug ] = strtolower( $term->name );
33
+			$product_visibility_terms[$term->slug] = strtolower( $term->name );
34 34
 		}
35 35
 
36 36
 		// Check if WooCommerce.com account is connected.
Please login to merge, or discard this patch.
src/Utilities/DatabaseInformation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
 			}
97 97
 			$table_type = in_array( $table->name, $core_tables, true ) ? 'woocommerce' : 'other';
98 98
 
99
-			$tables[ $table_type ][ $table->name ] = array(
99
+			$tables[$table_type][$table->name] = array(
100 100
 				'data'   => $table->data,
101 101
 				'index'  => $table->index,
102 102
 				'engine' => $table->engine,
Please login to merge, or discard this patch.