Completed
Push — master ( 4f30f5...d702ea )
by
unknown
22s queued 10s
created
classes/models/FrmApplicationTemplate.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 		 *
38 38
 		 * @param array $keys
39 39
 		 */
40
-		self::$keys             = apply_filters(
40
+		self::$keys = apply_filters(
41 41
 			'frm_application_data_keys',
42 42
 			array( 'key', 'name', 'description', 'link', 'categories', 'views', 'forms', 'used_addons' )
43 43
 		);
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 			self::get_template_keys_with_local_png_images(),
46 46
 			self::get_template_keys_with_local_webp_images()
47 47
 		);
48
-		self::$categories       = array();
48
+		self::$categories = array();
49 49
 	}
50 50
 
51 51
 	/**
@@ -170,20 +170,20 @@  discard block
 block discarded – undo
170 170
 		$application = array();
171 171
 
172 172
 		foreach ( self::$keys as $key ) {
173
-			if ( ! isset( $this->api_data[ $key ] ) ) {
173
+			if ( ! isset( $this->api_data[$key] ) ) {
174 174
 				continue;
175 175
 			}
176 176
 
177
-			$value = $this->api_data[ $key ];
177
+			$value = $this->api_data[$key];
178 178
 
179 179
 			if ( 'icon' === $key ) {
180 180
 				// Icon is an array. The first array item is the image URL.
181
-				$application[ $key ] = reset( $value );
181
+				$application[$key] = reset( $value );
182 182
 			} elseif ( 'categories' === $key ) {
183
-				$application[ $key ] = array_values(
183
+				$application[$key] = array_values(
184 184
 					array_filter(
185 185
 						$value,
186
-						function ( $category ) {
186
+						function( $category ) {
187 187
 							return ! str_contains( $category, '+Views' );
188 188
 						}
189 189
 					)
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 					$value = substr( $value, 0, -9 );
201 201
 				}
202 202
 
203
-				$application[ $key ] = $value;
203
+				$application[$key] = $value;
204 204
 			}//end if
205 205
 		}//end foreach
206 206
 
Please login to merge, or discard this patch.
classes/models/fields/FrmFieldCaptcha.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -296,8 +296,8 @@  discard block
 block discarded – undo
296 296
 
297 297
 		if ( is_wp_error( $resp ) ) {
298 298
 			$error_string                     = $resp->get_error_message();
299
-			$errors[ 'field' . $args['id'] ]  = __( 'There was a problem verifying your captcha', 'formidable' );
300
-			$errors[ 'field' . $args['id'] ] .= ' ' . $error_string;
299
+			$errors['field' . $args['id']]  = __( 'There was a problem verifying your captcha', 'formidable' );
300
+			$errors['field' . $args['id']] .= ' ' . $error_string;
301 301
 			return $errors;
302 302
 		}
303 303
 
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 				$invalid_message = '';
327 327
 			}
328 328
 
329
-			$errors[ 'field' . $args['id'] ] = $invalid_message === '' ? $frm_settings->re_msg : $invalid_message;
329
+			$errors['field' . $args['id']] = $invalid_message === '' ? $frm_settings->re_msg : $invalid_message;
330 330
 		}
331 331
 
332 332
 		return $errors;
@@ -346,8 +346,8 @@  discard block
 block discarded – undo
346 346
 
347 347
 		$form_id = is_object( $this->field ) ? $this->field->form_id : $this->field['form_id'];
348 348
 
349
-		if ( ! isset( $frm_vars['captcha_scores'][ $form_id ] ) ) {
350
-			$frm_vars['captcha_scores'][ $form_id ] = $score;
349
+		if ( ! isset( $frm_vars['captcha_scores'][$form_id] ) ) {
350
+			$frm_vars['captcha_scores'][$form_id] = $score;
351 351
 		}
352 352
 	}
353 353
 
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
 	protected static function post_data_includes_token() {
379 379
 		$settings = FrmCaptchaFactory::get_settings_object();
380 380
 		// phpcs:ignore WordPress.Security.NonceVerification.Missing
381
-		return ! empty( $_POST[ $settings->token_field ] );
381
+		return ! empty( $_POST[$settings->token_field] );
382 382
 	}
383 383
 
384 384
 	/**
Please login to merge, or discard this patch.
classes/models/FrmEntry.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -53,8 +53,8 @@  discard block
 block discarded – undo
53 53
 	 * @return void
54 54
 	 */
55 55
 	private static function flag_new_unique_key( $unique_id ) {
56
-		if ( ! isset( self::$unique_id_match_checks[ $unique_id ] ) ) {
57
-			self::$unique_id_match_checks[ $unique_id ] = false;
56
+		if ( ! isset( self::$unique_id_match_checks[$unique_id] ) ) {
57
+			self::$unique_id_match_checks[$unique_id] = false;
58 58
 		}
59 59
 	}
60 60
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 					continue;
113 113
 				}
114 114
 
115
-				$field_metas[ $meta->field_id ] = $meta->meta_value;
115
+				$field_metas[$meta->field_id] = $meta->meta_value;
116 116
 			}
117 117
 
118 118
 			$filtered_vals = array_filter( $values['item_meta'] );
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
 			return false;
181 181
 		}
182 182
 
183
-		if ( isset( self::$unique_id_match_checks[ $unique_id ] ) ) {
184
-			return self::$unique_id_match_checks[ $unique_id ];
183
+		if ( isset( self::$unique_id_match_checks[$unique_id] ) ) {
184
+			return self::$unique_id_match_checks[$unique_id];
185 185
 		}
186 186
 
187 187
 		$timestamp = strtotime( $created_at );
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 			$timestamp = time();
191 191
 		}
192 192
 
193
-		self::$unique_id_match_checks[ $unique_id ] = (bool) FrmDb::get_var(
193
+		self::$unique_id_match_checks[$unique_id] = (bool) FrmDb::get_var(
194 194
 			'frm_item_metas',
195 195
 			array(
196 196
 				'field_id'     => 0,
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 			'id'
201 201
 		);
202 202
 
203
-		return self::$unique_id_match_checks[ $unique_id ];
203
+		return self::$unique_id_match_checks[$unique_id];
204 204
 	}
205 205
 
206 206
 	/**
@@ -234,11 +234,11 @@  discard block
 block discarded – undo
234 234
 
235 235
 		foreach ( $filter_vals as $field_id => $value ) {
236 236
 			$field                = FrmFieldFactory::get_field_object( $field_id );
237
-			$reduced[ $field_id ] = $field->get_value_to_save( $value, array( 'entry_id' => $entry_id ) );
238
-			$reduced[ $field_id ] = $field->set_value_before_save( $reduced[ $field_id ] );
237
+			$reduced[$field_id] = $field->get_value_to_save( $value, array( 'entry_id' => $entry_id ) );
238
+			$reduced[$field_id] = $field->set_value_before_save( $reduced[$field_id] );
239 239
 
240
-			if ( '' === $reduced[ $field_id ] || ( is_array( $reduced[ $field_id ] ) && 0 === count( $reduced[ $field_id ] ) ) ) {
241
-				unset( $reduced[ $field_id ] );
240
+			if ( '' === $reduced[$field_id] || ( is_array( $reduced[$field_id] ) && 0 === count( $reduced[$field_id] ) ) ) {
241
+				unset( $reduced[$field_id] );
242 242
 			}
243 243
 		}
244 244
 
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
 	private static function prepare_entries( &$entries ) {
533 533
 		foreach ( $entries as $k => $entry ) {
534 534
 			self::prepare_entry( $entry );
535
-			$entries[ $k ] = $entry;
535
+			$entries[$k] = $entry;
536 536
 		}
537 537
 	}
538 538
 
@@ -564,20 +564,20 @@  discard block
 block discarded – undo
564 564
 			FrmFieldsHelper::prepare_field_value( $meta_val->meta_value, $meta_val->type );
565 565
 
566 566
 			if ( (int) $meta_val->item_id === (int) $entry->id ) {
567
-				$entry->metas[ $meta_val->field_id ] = $meta_val->meta_value;
567
+				$entry->metas[$meta_val->field_id] = $meta_val->meta_value;
568 568
 
569 569
 				if ( $include_key ) {
570
-					$entry->metas[ $meta_val->field_key ] = $entry->metas[ $meta_val->field_id ];
570
+					$entry->metas[$meta_val->field_key] = $entry->metas[$meta_val->field_id];
571 571
 				}
572 572
 				continue;
573 573
 			}
574 574
 
575 575
 			// include sub entries in an array
576
-			if ( ! isset( $entry->metas[ $meta_val->field_id ] ) ) {
577
-				$entry->metas[ $meta_val->field_id ] = array();
576
+			if ( ! isset( $entry->metas[$meta_val->field_id] ) ) {
577
+				$entry->metas[$meta_val->field_id] = array();
578 578
 			}
579 579
 
580
-			$entry->metas[ $meta_val->field_id ][] = $meta_val->meta_value;
580
+			$entry->metas[$meta_val->field_id][] = $meta_val->meta_value;
581 581
 
582 582
 			unset( $meta_val );
583 583
 		}//end foreach
@@ -678,16 +678,16 @@  discard block
 block discarded – undo
678 678
 		}
679 679
 
680 680
 		foreach ( $metas as $m_key => $meta_val ) {
681
-			if ( ! isset( $entries[ $meta_val->item_id ] ) ) {
681
+			if ( ! isset( $entries[$meta_val->item_id] ) ) {
682 682
 				continue;
683 683
 			}
684 684
 
685
-			if ( ! isset( $entries[ $meta_val->item_id ]->metas ) ) {
686
-				$entries[ $meta_val->item_id ]->metas = array();
685
+			if ( ! isset( $entries[$meta_val->item_id]->metas ) ) {
686
+				$entries[$meta_val->item_id]->metas = array();
687 687
 			}
688 688
 
689 689
 			FrmFieldsHelper::prepare_field_value( $meta_val->meta_value, $meta_val->type );
690
-			$entries[ $meta_val->item_id ]->metas[ $meta_val->field_id ] = $meta_val->meta_value;
690
+			$entries[$meta_val->item_id]->metas[$meta_val->field_id] = $meta_val->meta_value;
691 691
 			unset( $m_key, $meta_val );
692 692
 		}
693 693
 
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
 	 * @return mixed
882 882
 	 */
883 883
 	private static function get_entry_value( $values, $name, $default ) {
884
-		return $values[ $name ] ?? $default;
884
+		return $values[$name] ?? $default;
885 885
 	}
886 886
 
887 887
 	/**
@@ -1080,7 +1080,7 @@  discard block
 block discarded – undo
1080 1080
 		global $frm_vars;
1081 1081
 
1082 1082
 		if ( array_key_exists( 'captcha_scores', $frm_vars ) && array_key_exists( $form_id, $frm_vars['captcha_scores'] ) ) {
1083
-			$captcha_score_meta = array( 'captcha_score' => $frm_vars['captcha_scores'][ $form_id ] );
1083
+			$captcha_score_meta = array( 'captcha_score' => $frm_vars['captcha_scores'][$form_id] );
1084 1084
 			FrmEntryMeta::add_entry_meta( $entry_id, 0, '', maybe_serialize( $captcha_score_meta ) );
1085 1085
 		}
1086 1086
 	}
Please login to merge, or discard this patch.
classes/controllers/FrmStylesController.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 			/**
161 161
 			 * Update the form data on the "Manage Styles" tab after global settings are saved.
162 162
 			 */
163
-			function () {
163
+			function() {
164 164
 				self::manage_styles();
165 165
 			}
166 166
 		);
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
 
440 440
 		if ( ! $form_id ) {
441 441
 			// Fallback to any form.
442
-			$where   = array(
442
+			$where = array(
443 443
 				'status'         => 'published',
444 444
 				// Make sure it's not a repeater.
445 445
 				'parent_form_id' => array( null, 0 ),
@@ -458,7 +458,7 @@  discard block
 block discarded – undo
458 458
 	private static function disable_admin_page_styling_on_submit_buttons() {
459 459
 		add_filter(
460 460
 			'frm_submit_button_class',
461
-			function ( $classes ) {
461
+			function( $classes ) {
462 462
 				$classes[] = 'frm_no_style_button';
463 463
 				return $classes;
464 464
 			}
@@ -690,13 +690,13 @@  discard block
 block discarded – undo
690 690
 	private static function force_form_style( $style ) {
691 691
 		add_filter(
692 692
 			'frm_add_form_style_class',
693
-			function ( $class ) use ( $style ) {
694
-				$split   = array_filter(
693
+			function( $class ) use ( $style ) {
694
+				$split = array_filter(
695 695
 					explode( ' ', $class ),
696 696
 					/**
697 697
 					 * @param string $class
698 698
 					 */
699
-					function ( $class ) {
699
+					function( $class ) {
700 700
 						return $class && ! str_starts_with( $class, 'frm_style_' );
701 701
 					}
702 702
 				);
@@ -822,11 +822,11 @@  discard block
 block discarded – undo
822 822
 		$forms = FrmForm::get_published_forms();
823 823
 
824 824
 		foreach ( $forms as $form ) {
825
-			if ( ! isset( $_POST['style'] ) || ! isset( $_POST['style'][ $form->id ] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
825
+			if ( ! isset( $_POST['style'] ) || ! isset( $_POST['style'][$form->id] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Missing
826 826
 				continue;
827 827
 			}
828 828
 
829
-			$new_style = sanitize_text_field( wp_unslash( $_POST['style'][ $form->id ] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
829
+			$new_style = sanitize_text_field( wp_unslash( $_POST['style'][$form->id] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Missing
830 830
 
831 831
 			$form->options['custom_style'] = $new_style;
832 832
 			$wpdb->update( $wpdb->prefix . 'frm_forms', array( 'options' => maybe_serialize( $form->options ) ), array( 'id' => $form->id ) );
@@ -1282,8 +1282,8 @@  discard block
 block discarded – undo
1282 1282
 	public static function get_style_val( $val, $form = 'default' ) {
1283 1283
 		$style = self::get_form_style( $form );
1284 1284
 
1285
-		if ( $style && isset( $style->post_content[ $val ] ) ) {
1286
-			return $style->post_content[ $val ];
1285
+		if ( $style && isset( $style->post_content[$val] ) ) {
1286
+			return $style->post_content[$val];
1287 1287
 		}
1288 1288
 
1289 1289
 		return null;
@@ -1311,7 +1311,7 @@  discard block
 block discarded – undo
1311 1311
 				$setting = 'bg_color_active';
1312 1312
 			}
1313 1313
 
1314
-			$default_styles[ $name ] = $style->post_content[ $setting ];
1314
+			$default_styles[$name] = $style->post_content[$setting];
1315 1315
 			unset( $name, $val );
1316 1316
 		}
1317 1317
 
@@ -1366,16 +1366,16 @@  discard block
 block discarded – undo
1366 1366
 		$i          = 0;
1367 1367
 		$first_open = false;
1368 1368
 
1369
-		if ( isset( $wp_meta_boxes[ $page ][ $context ] ) ) {
1369
+		if ( isset( $wp_meta_boxes[$page][$context] ) ) {
1370 1370
 			foreach ( array( 'high', 'core', 'default', 'low' ) as $priority ) {
1371
-				if ( isset( $wp_meta_boxes[ $page ][ $context ][ $priority ] ) ) {
1372
-					foreach ( $wp_meta_boxes[ $page ][ $context ][ $priority ] as $box ) {
1371
+				if ( isset( $wp_meta_boxes[$page][$context][$priority] ) ) {
1372
+					foreach ( $wp_meta_boxes[$page][$context][$priority] as $box ) {
1373 1373
 						if ( false === $box || ! $box['title'] ) {
1374 1374
 							continue;
1375 1375
 						}
1376 1376
 
1377
-						++$i;
1378
-						$icon_id    = array_key_exists( $box['id'], $icon_ids ) ? $icon_ids[ $box['id'] ] : 'frm-' . $box['id'];
1377
+						++ $i;
1378
+						$icon_id    = array_key_exists( $box['id'], $icon_ids ) ? $icon_ids[$box['id']] : 'frm-' . $box['id'];
1379 1379
 						$open_class = '';
1380 1380
 
1381 1381
 						if ( ! $first_open ) {
Please login to merge, or discard this patch.
Formidable/Sniffs/WhiteSpace/BlankLineAfterClosingBraceSniff.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 		}
59 59
 
60 60
 		// For variables, check if followed by an assignment operator (or array access then assignment).
61
-		if ( $tokens[ $stackPtr ]['code'] === T_VARIABLE ) {
61
+		if ( $tokens[$stackPtr]['code'] === T_VARIABLE ) {
62 62
 			$assignmentTokens = array(
63 63
 				T_EQUAL,
64 64
 				T_PLUS_EQUAL,
@@ -79,10 +79,10 @@  discard block
 block discarded – undo
79 79
 			$checkToken = $nextToken;
80 80
 
81 81
 			// If followed by array access, skip to after the closing bracket.
82
-			if ( $tokens[ $nextToken ]['code'] === T_OPEN_SQUARE_BRACKET ) {
82
+			if ( $tokens[$nextToken]['code'] === T_OPEN_SQUARE_BRACKET ) {
83 83
 				// Find the matching closing bracket.
84
-				if ( isset( $tokens[ $nextToken ]['bracket_closer'] ) ) {
85
-					$closeBracket = $tokens[ $nextToken ]['bracket_closer'];
84
+				if ( isset( $tokens[$nextToken]['bracket_closer'] ) ) {
85
+					$closeBracket = $tokens[$nextToken]['bracket_closer'];
86 86
 					$checkToken   = $phpcsFile->findNext( T_WHITESPACE, $closeBracket + 1, null, true );
87 87
 
88 88
 					if ( false === $checkToken ) {
@@ -93,12 +93,12 @@  discard block
 block discarded – undo
93 93
 				}
94 94
 			}
95 95
 
96
-			if ( ! in_array( $tokens[ $checkToken ]['code'], $assignmentTokens, true ) ) {
96
+			if ( ! in_array( $tokens[$checkToken]['code'], $assignmentTokens, true ) ) {
97 97
 				return;
98 98
 			}
99
-		} elseif ( $tokens[ $stackPtr ]['code'] === T_STRING ) {
99
+		} elseif ( $tokens[$stackPtr]['code'] === T_STRING ) {
100 100
 			// For function calls, check if followed by an opening parenthesis.
101
-			if ( $tokens[ $nextToken ]['code'] !== T_OPEN_PARENTHESIS ) {
101
+			if ( $tokens[$nextToken]['code'] !== T_OPEN_PARENTHESIS ) {
102 102
 				return;
103 103
 			}
104 104
 		}
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
 		// Find the first token on the current line.
107 107
 		$firstOnLine = $stackPtr;
108 108
 
109
-		for ( $i = $stackPtr - 1; $i >= 0; $i-- ) {
110
-			if ( $tokens[ $i ]['line'] < $tokens[ $stackPtr ]['line'] ) {
109
+		for ( $i = $stackPtr - 1; $i >= 0; $i -- ) {
110
+			if ( $tokens[$i]['line'] < $tokens[$stackPtr]['line'] ) {
111 111
 				break;
112 112
 			}
113 113
 			$firstOnLine = $i;
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 		}
122 122
 
123 123
 		// Now find what's on the previous line.
124
-		$currentLine  = $tokens[ $stackPtr ]['line'];
124
+		$currentLine  = $tokens[$stackPtr]['line'];
125 125
 		$previousLine = $currentLine - 1;
126 126
 
127 127
 		if ( $previousLine < 1 ) {
@@ -131,12 +131,12 @@  discard block
 block discarded – undo
131 131
 		// Find the last non-whitespace token on the previous line.
132 132
 		$lastTokenOnPrevLine = null;
133 133
 
134
-		for ( $i = $stackPtr - 1; $i >= 0; $i-- ) {
135
-			if ( $tokens[ $i ]['line'] < $previousLine ) {
134
+		for ( $i = $stackPtr - 1; $i >= 0; $i -- ) {
135
+			if ( $tokens[$i]['line'] < $previousLine ) {
136 136
 				break;
137 137
 			}
138 138
 
139
-			if ( $tokens[ $i ]['line'] === $previousLine && $tokens[ $i ]['code'] !== T_WHITESPACE ) {
139
+			if ( $tokens[$i]['line'] === $previousLine && $tokens[$i]['code'] !== T_WHITESPACE ) {
140 140
 				$lastTokenOnPrevLine = $i;
141 141
 				break;
142 142
 			}
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 		}
150 150
 
151 151
 		// Check if the last token on the previous line is a closing brace.
152
-		if ( $tokens[ $lastTokenOnPrevLine ]['code'] !== T_CLOSE_CURLY_BRACKET ) {
152
+		if ( $tokens[$lastTokenOnPrevLine]['code'] !== T_CLOSE_CURLY_BRACKET ) {
153 153
 			return;
154 154
 		}
155 155
 
@@ -166,9 +166,9 @@  discard block
 block discarded – undo
166 166
 			}
167 167
 
168 168
 			// Check if this function contains our token.
169
-			if ( isset( $tokens[ $searchPtr ]['scope_opener'] ) && isset( $tokens[ $searchPtr ]['scope_closer'] ) ) {
170
-				$funcStart = $tokens[ $searchPtr ]['scope_opener'];
171
-				$funcEnd   = $tokens[ $searchPtr ]['scope_closer'];
169
+			if ( isset( $tokens[$searchPtr]['scope_opener'] ) && isset( $tokens[$searchPtr]['scope_closer'] ) ) {
170
+				$funcStart = $tokens[$searchPtr]['scope_opener'];
171
+				$funcEnd   = $tokens[$searchPtr]['scope_closer'];
172 172
 
173 173
 				if ( $stackPtr > $funcStart && $stackPtr < $funcEnd ) {
174 174
 					$functionPtr = $searchPtr;
@@ -176,23 +176,23 @@  discard block
 block discarded – undo
176 176
 				}
177 177
 			}
178 178
 
179
-			--$searchPtr;
179
+			-- $searchPtr;
180 180
 		}
181 181
 
182 182
 		if ( null === $functionPtr ) {
183 183
 			return;
184 184
 		}
185 185
 
186
-		$functionStart = $tokens[ $functionPtr ]['scope_opener'];
187
-		$functionEnd   = $tokens[ $functionPtr ]['scope_closer'];
186
+		$functionStart = $tokens[$functionPtr]['scope_opener'];
187
+		$functionEnd   = $tokens[$functionPtr]['scope_closer'];
188 188
 
189 189
 		// Check if the function has any other blank lines.
190 190
 		// PHPCS splits whitespace into separate tokens, so look for consecutive newline tokens.
191 191
 		$hasOtherBlankLines = false;
192 192
 		$lastWasNewline     = false;
193 193
 
194
-		for ( $i = $functionStart + 1; $i < $functionEnd; $i++ ) {
195
-			if ( $tokens[ $i ]['code'] === T_WHITESPACE && $tokens[ $i ]['content'] === "\n" ) {
194
+		for ( $i = $functionStart + 1; $i < $functionEnd; $i ++ ) {
195
+			if ( $tokens[$i]['code'] === T_WHITESPACE && $tokens[$i]['content'] === "\n" ) {
196 196
 				if ( $lastWasNewline ) {
197 197
 					$hasOtherBlankLines = true;
198 198
 					break;
Please login to merge, or discard this patch.
stripe/models/FrmStrpLiteAuth.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
 		if ( $intent_is_processing ) {
63 63
 			// Append an additional processing message to the end of the success message.
64
-			$filter = function ( $message ) {
64
+			$filter = function( $message ) {
65 65
 				$stripe_settings = FrmStrpLiteAppHelper::get_settings();
66 66
 				return $message . ( '<p>' . esc_html( $stripe_settings->settings->processing_message ) . '</p>' );
67 67
 			};
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 		$atts['form']        = FrmForm::getOne( $atts['entry']->form_id );
170 170
 		$atts['entry_id']    = $atts['entry']->id;
171 171
 		$opt                 = 'success_action';
172
-		$atts['conf_method'] = ! empty( $atts['form']->options[ $opt ] ) ? $atts['form']->options[ $opt ] : 'message';
172
+		$atts['conf_method'] = ! empty( $atts['form']->options[$opt] ) ? $atts['form']->options[$opt] : 'message';
173 173
 
174 174
 		$actions = FrmFormsController::get_met_on_submit_actions( $atts, 'create' );
175 175
 
@@ -267,11 +267,11 @@  discard block
 block discarded – undo
267 267
 	 */
268 268
 	public static function get_payment_intents( $name ) {
269 269
 		// phpcs:ignore WordPress.Security.NonceVerification.Missing
270
-		if ( ! isset( $_POST[ $name ] ) ) {
270
+		if ( ! isset( $_POST[$name] ) ) {
271 271
 			return array();
272 272
 		}
273 273
 
274
-		$intents = $_POST[ $name ]; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
274
+		$intents = $_POST[$name]; // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.NonceVerification.Missing
275 275
 		FrmAppHelper::sanitize_value( 'sanitize_text_field', $intents );
276 276
 		return $intents;
277 277
 	}
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 		self::format_form_data( $form );
300 300
 
301 301
 		$form_id = absint( $form['form_id'] );
302
-		$intents = $form[ 'frmintent' . $form_id ] ?? array();
302
+		$intents = $form['frmintent' . $form_id] ?? array();
303 303
 
304 304
 		if ( ! $intents ) {
305 305
 			wp_die();
@@ -309,8 +309,8 @@  discard block
 block discarded – undo
309 309
 			$intents = array( $intents );
310 310
 		} else {
311 311
 			foreach ( $intents as $k => $intent ) {
312
-				if ( is_array( $intent ) && isset( $intent[ $k ] ) ) {
313
-					$intents[ $k ] = $intent[ $k ];
312
+				if ( is_array( $intent ) && isset( $intent[$k] ) ) {
313
+					$intents[$k] = $intent[$k];
314 314
 				}
315 315
 			}
316 316
 		}
@@ -374,7 +374,7 @@  discard block
 block discarded – undo
374 374
 					continue;
375 375
 				}
376 376
 
377
-				$intents[ $k ] = array(
377
+				$intents[$k] = array(
378 378
 					'id'     => $intent,
379 379
 					'action' => $action->ID,
380 380
 				);
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 			if ( $k === 'item_meta' ) {
423 423
 				foreach ( $v as $f => $value ) {
424 424
 					FrmAppHelper::sanitize_value( 'wp_kses_post', $value );
425
-					$entry->metas[ absint( $f ) ] = $value;
425
+					$entry->metas[absint( $f )] = $value;
426 426
 				}
427 427
 			} else {
428 428
 				FrmAppHelper::sanitize_value( 'wp_kses_post', $v );
@@ -448,14 +448,14 @@  discard block
 block discarded – undo
448 448
 		foreach ( $form as $input ) {
449 449
 			$key = $input['name'];
450 450
 
451
-			if ( isset( $formatted[ $key ] ) ) {
452
-				if ( is_array( $formatted[ $key ] ) ) {
453
-					$formatted[ $key ][] = $input['value'];
451
+			if ( isset( $formatted[$key] ) ) {
452
+				if ( is_array( $formatted[$key] ) ) {
453
+					$formatted[$key][] = $input['value'];
454 454
 				} else {
455
-					$formatted[ $key ] = array( $formatted[ $key ], $input['value'] );
455
+					$formatted[$key] = array( $formatted[$key], $input['value'] );
456 456
 				}
457 457
 			} else {
458
-				$formatted[ $key ] = $input['value'];
458
+				$formatted[$key] = $input['value'];
459 459
 			}
460 460
 		}
461 461
 
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
 
700 700
 		foreach ( $actions as $k => $action ) {
701 701
 			$amount                                = self::get_amount_before_submit( compact( 'action', 'form' ) );
702
-			$actions[ $k ]->post_content['amount'] = $amount;
702
+			$actions[$k]->post_content['amount'] = $amount;
703 703
 		}
704 704
 	}
705 705
 
Please login to merge, or discard this patch.