Completed
Branch develop (1becb4)
by Aristeides
05:50 queued 02:46
created
includes/settings/class-kirki-settings-repeater-setting.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,9 +50,9 @@
 block discarded – undo
50 50
 			// Make sure that every row is an array, not an object
51 51
 			foreach ( $sanitized as $key => $_value ) {
52 52
 				if ( empty( $_value ) ) {
53
-					unset( $sanitized[ $key ] );
53
+					unset( $sanitized[$key] );
54 54
 				} else {
55
-					$sanitized[ $key ] = (array) $_value;
55
+					$sanitized[$key] = (array) $_value;
56 56
 				}
57 57
 			}
58 58
 
Please login to merge, or discard this patch.
includes/class-kirki-active-callback.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@
 block discarded – undo
15 15
 			$fields = Kirki::$fields;
16 16
 
17 17
 			// Make sure the current object matches a registered field.
18
-			if ( ! isset( $object->setting->id ) || ! isset( $fields[ $object->setting->id ] ) ) {
18
+			if ( ! isset( $object->setting->id ) || ! isset( $fields[$object->setting->id] ) ) {
19 19
 				return true;
20 20
 			}
21 21
 
22
-			$current_object = $fields[ $object->setting->id ];
22
+			$current_object = $fields[$object->setting->id];
23 23
 
24 24
 			if ( isset( $current_object['required'] ) ) {
25 25
 
Please login to merge, or discard this patch.
includes/class-kirki-init.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -172,9 +172,9 @@
 block discarded – undo
172 172
 							 * If no callback is defined (false) then just get the value.
173 173
 							 */
174 174
 							if ( $variable_callback ) {
175
-								$variables[ $variable_name ] = call_user_func( $field_variable['callback'], Kirki::get_option( $field['settings'] ) );
175
+								$variables[$variable_name] = call_user_func( $field_variable['callback'], Kirki::get_option( $field['settings'] ) );
176 176
 							} else {
177
-								$variables[ $variable_name ] = Kirki::get_option( $field['settings'] );
177
+								$variables[$variable_name] = Kirki::get_option( $field['settings'] );
178 178
 							}
179 179
 
180 180
 						}
Please login to merge, or discard this patch.
includes/styles/class-kirki-styles-customizer.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
 		 *
88 88
 		 * @param string $handle
89 89
 		 * @param string $file
90
-		 * @param array  $deps
90
+		 * @param string[]  $deps
91 91
 		 */
92 92
 		public static function enqueue_customizer_control_script( $handle, $file = null, $deps = array(), $in_footer = false ) {
93 93
 			if ( ( false !== strpos( $file, 'controls/' ) && Kirki_Toolkit::kirki_debug() ) || false === strpos( $file, 'controls/' ) ) {
Please login to merge, or discard this patch.
autoloader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,8 @@
 block discarded – undo
21 21
 
22 22
 			$previous_path = '';
23 23
 			for ( $i = 0; $i < $levels; $i++ ) {
24
-				$paths[] = $path . $previous_path . strtolower( $exploded[ $i ] ) . '/' . $filename;
25
-				$previous_path .= strtolower( $exploded[ $i ] ) . '/';
24
+				$paths[] = $path . $previous_path . strtolower( $exploded[$i] ) . '/' . $filename;
25
+				$previous_path .= strtolower( $exploded[$i] ) . '/';
26 26
 			}
27 27
 
28 28
 			foreach ( $paths as $path ) {
Please login to merge, or discard this patch.
includes/controls/class-kirki-controls-repeater-control.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,13 +34,13 @@  discard block
 block discarded – undo
34 34
 
35 35
 			foreach ( $args['fields'] as $key => $value ) {
36 36
 				if ( ! isset( $value['default'] ) ) {
37
-					$args['fields'][ $key ]['default'] = '';
37
+					$args['fields'][$key]['default'] = '';
38 38
 				}
39 39
 
40 40
 				if ( ! isset( $value['label'] ) ) {
41
-					$args['fields'][ $key ]['label'] = '';
41
+					$args['fields'][$key]['label'] = '';
42 42
 				}
43
-				$args['fields'][ $key ]['id'] = $key;
43
+				$args['fields'][$key]['id'] = $key;
44 44
 			}
45 45
 
46 46
 			$this->fields = $args['fields'];
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 					continue;
64 64
 				}
65 65
 
66
-				$fields[ $key ]['buttonLabels'] = $default_image_button_labels;
66
+				$fields[$key]['buttonLabels'] = $default_image_button_labels;
67 67
 			}
68 68
 
69 69
 			$this->json['fields'] = $fields;
Please login to merge, or discard this patch.
includes/controls/class-kirki-controls-spacing-control.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,15 +26,15 @@
 block discarded – undo
26 26
 			if ( is_array( $this->choices ) ) {
27 27
 				foreach ( $this->choices as $choice => $value ) {
28 28
 					if ( true === $value ) {
29
-						$this->json['choices'][ $choice ] = true;
29
+						$this->json['choices'][$choice] = true;
30 30
 					}
31 31
 				}
32 32
 			}
33 33
 
34 34
 			if ( is_array( $this->json['default'] ) ) {
35 35
 				foreach ( $this->json['default'] as $key => $value ) {
36
-					if ( isset( $this->json['choices'][ $key ] ) && ! isset( $this->json['value'][ $key ] ) ) {
37
-						$this->json['value'][ $key ] = $value;
36
+					if ( isset( $this->json['choices'][$key] ) && ! isset( $this->json['value'][$key] ) ) {
37
+						$this->json['value'][$key] = $value;
38 38
 					}
39 39
 				}
40 40
 			}
Please login to merge, or discard this patch.
includes/class-kirki-sanitize-values.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@
 block discarded – undo
189 189
 				return 'auto';
190 190
 			}
191 191
 			// Return empty if there are no numbers in the value.
192
-			if ( ! preg_match( '#[0-9]#' , $value ) ) {
192
+			if ( ! preg_match( '#[0-9]#', $value ) ) {
193 193
 				return '';
194 194
 			}
195 195
 			// The raw value without the units
Please login to merge, or discard this patch.
includes/class-kirki-enqueue.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,14 +113,14 @@
 block discarded – undo
113 113
 				$available_variants = array();
114 114
 				foreach ( $variants as $variant ) {
115 115
 					if ( array_key_exists( $variant, $all_variants ) ) {
116
-						$available_variants[] = array( 'id' => $variant, 'label' => $all_variants[ $variant ] );
116
+						$available_variants[] = array( 'id' => $variant, 'label' => $all_variants[$variant] );
117 117
 					}
118 118
 				}
119 119
 
120 120
 				$available_subsets = array();
121 121
 				foreach ( $subsets as $subset ) {
122 122
 					if ( array_key_exists( $subset, $all_subsets ) ) {
123
-						$available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[ $subset ] );
123
+						$available_subsets[] = array( 'id' => $subset, 'label' => $all_subsets[$subset] );
124 124
 					}
125 125
 				}
126 126
 
Please login to merge, or discard this patch.