Completed
Push — master ( ff6614...d47068 )
by
unknown
17s
created
classes/models/FrmStyle.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -134,22 +134,22 @@  discard block
 block discarded – undo
134 134
 			$default_settings = $this->get_defaults();
135 135
 
136 136
 			foreach ( $default_settings as $setting => $default ) {
137
-				if ( ! isset( $new_instance['post_content'][ $setting ] ) ) {
138
-					$new_instance['post_content'][ $setting ] = $default;
137
+				if ( ! isset( $new_instance['post_content'][$setting] ) ) {
138
+					$new_instance['post_content'][$setting] = $default;
139 139
 				}
140 140
 
141 141
 				if ( $this->is_color( $setting ) ) {
142
-					$color_val = $new_instance['post_content'][ $setting ];
142
+					$color_val = $new_instance['post_content'][$setting];
143 143
 
144 144
 					if ( $color_val !== '' && false !== strpos( $color_val, 'rgb' ) ) {
145 145
 						// Maybe sanitize if invalid rgba value is entered.
146 146
 						$this->maybe_sanitize_rgba_value( $color_val );
147 147
 					}
148
-					$new_instance['post_content'][ $setting ] = str_replace( '#', '', $color_val );
149
-				} elseif ( in_array( $setting, array( 'submit_style', 'important_style', 'auto_width' ), true ) && ! isset( $new_instance['post_content'][ $setting ] ) ) {
150
-					$new_instance['post_content'][ $setting ] = 0;
148
+					$new_instance['post_content'][$setting] = str_replace( '#', '', $color_val );
149
+				} elseif ( in_array( $setting, array( 'submit_style', 'important_style', 'auto_width' ), true ) && ! isset( $new_instance['post_content'][$setting] ) ) {
150
+					$new_instance['post_content'][$setting] = 0;
151 151
 				} elseif ( $setting === 'font' ) {
152
-					$new_instance['post_content'][ $setting ] = $this->force_balanced_quotation( $new_instance['post_content'][ $setting ] );
152
+					$new_instance['post_content'][$setting] = $this->force_balanced_quotation( $new_instance['post_content'][$setting] );
153 153
 				}
154 154
 			}
155 155
 
@@ -265,14 +265,14 @@  discard block
 block discarded – undo
265 265
 		$sanitized_settings = array();
266 266
 
267 267
 		foreach ( $valid_keys as $key ) {
268
-			if ( isset( $settings[ $key ] ) ) {
269
-				$sanitized_settings[ $key ] = sanitize_textarea_field( $settings[ $key ] );
268
+			if ( isset( $settings[$key] ) ) {
269
+				$sanitized_settings[$key] = sanitize_textarea_field( $settings[$key] );
270 270
 			} else {
271
-				$sanitized_settings[ $key ] = $defaults[ $key ];
271
+				$sanitized_settings[$key] = $defaults[$key];
272 272
 			}
273 273
 
274 274
 			if ( 'custom_css' !== $key && 'single_style_custom_css' !== $key ) {
275
-				$sanitized_settings[ $key ] = $this->strip_invalid_characters( $sanitized_settings[ $key ] );
275
+				$sanitized_settings[$key] = $this->strip_invalid_characters( $sanitized_settings[$key] );
276 276
 			}
277 277
 		}
278 278
 		return $sanitized_settings;
@@ -578,13 +578,13 @@  discard block
 block discarded – undo
578 578
 			$style->post_content = $this->override_defaults( $style->post_content );
579 579
 			$style->post_content = wp_parse_args( $style->post_content, $default_values );
580 580
 
581
-			$styles[ $style->ID ] = $style;
581
+			$styles[$style->ID] = $style;
582 582
 		}//end foreach
583 583
 
584 584
 		if ( ! $default_style ) {
585 585
 			$default_style = reset( $styles );
586 586
 
587
-			$styles[ $default_style->ID ]->menu_order = 1;
587
+			$styles[$default_style->ID]->menu_order = 1;
588 588
 		}
589 589
 
590 590
 		return $styles;
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
 				continue;
840 840
 			}
841 841
 
842
-			if ( $value && $char === $value[ strlen( $value ) - 1 ] ) {
842
+			if ( $value && $char === $value[strlen( $value ) - 1] ) {
843 843
 				$value = $char . $value;
844 844
 			} else {
845 845
 				$value .= $char;
Please login to merge, or discard this patch.
classes/helpers/FrmCssScopeHelper.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -25,14 +25,14 @@  discard block
 block discarded – undo
25 25
 		$buffer = '';
26 26
 
27 27
 		while ( $i < $length ) {
28
-			$char = $css[ $i ];
28
+			$char = $css[$i];
29 29
 
30 30
 			if ( '@' === $char ) {
31 31
 				$brace_pos = strpos( $css, '{', $i );
32 32
 
33 33
 				if ( false === $brace_pos ) {
34 34
 					$buffer .= $char;
35
-					++$i;
35
+					++ $i;
36 36
 					continue;
37 37
 				}
38 38
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 			}//end if
85 85
 
86 86
 			$buffer .= $char;
87
-			++$i;
87
+			++ $i;
88 88
 		}//end while
89 89
 
90 90
 		return implode( '', $output );
@@ -112,14 +112,14 @@  discard block
 block discarded – undo
112 112
 		$prefix_length = strlen( $prefix );
113 113
 
114 114
 		while ( $i < $length ) {
115
-			$char = $css[ $i ];
115
+			$char = $css[$i];
116 116
 
117 117
 			if ( '@' === $char ) {
118 118
 				$brace_pos = strpos( $css, '{', $i );
119 119
 
120 120
 				if ( false === $brace_pos ) {
121 121
 					$buffer .= $char;
122
-					++$i;
122
+					++ $i;
123 123
 
124 124
 					continue;
125 125
 				}
@@ -147,9 +147,9 @@  discard block
 block discarded – undo
147 147
 
148 148
 				if ( '' !== $selector && '' !== trim( $declarations ) ) {
149 149
 					// Handle multiple selectors
150
-					$selectors            = array_filter(
150
+					$selectors = array_filter(
151 151
 						array_map( 'trim', explode( ',', $selector ) ),
152
-						function ( $s ) {
152
+						function( $s ) {
153 153
 							return '' !== $s;
154 154
 						}
155 155
 					);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 			}//end if
173 173
 
174 174
 			$buffer .= $char;
175
-			++$i;
175
+			++ $i;
176 176
 		}//end while
177 177
 		return implode( '', $output );
178 178
 	}
@@ -228,11 +228,11 @@  discard block
 block discarded – undo
228 228
 		$in_string   = false;
229 229
 		$string_char = '';
230 230
 
231
-		for ( $i = $open_pos + 1; $i < $length; $i++ ) {
232
-			$char = $css[ $i ];
231
+		for ( $i = $open_pos + 1; $i < $length; $i ++ ) {
232
+			$char = $css[$i];
233 233
 
234 234
 			// Handle string literals to avoid matching braces inside strings
235
-			if ( ( '"' === $char || "'" === $char ) && ( 0 === $i || '\\' !== $css[ $i - 1 ] ) ) {
235
+			if ( ( '"' === $char || "'" === $char ) && ( 0 === $i || '\\' !== $css[$i - 1] ) ) {
236 236
 				if ( ! $in_string ) {
237 237
 					$in_string   = true;
238 238
 					$string_char = $char;
@@ -248,9 +248,9 @@  discard block
 block discarded – undo
248 248
 			}
249 249
 
250 250
 			if ( '{' === $char ) {
251
-				++$level;
251
+				++ $level;
252 252
 			} elseif ( '}' === $char ) {
253
-				--$level;
253
+				-- $level;
254 254
 
255 255
 				if ( 0 === $level ) {
256 256
 					return $i;
Please login to merge, or discard this patch.