Completed
Push — master ( 804b0a...fa4158 )
by Stephanie
02:30
created
classes/models/FrmTableHTMLGenerator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 * @param array $atts
72 72
 	 */
73 73
 	private function init_style_settings( $atts ) {
74
-		$style_settings       = array(
74
+		$style_settings = array(
75 75
 			'border_color' => 'dddddd',
76 76
 			'bg_color'     => 'f7f7f7',
77 77
 			'text_color'   => '444444',
@@ -82,12 +82,12 @@  discard block
 block discarded – undo
82 82
 		$this->style_settings = apply_filters( 'frm_show_entry_styles', $style_settings );
83 83
 
84 84
 		foreach ( $this->style_settings as $key => $setting ) {
85
-			if ( isset( $atts[ $key ] ) && $atts[ $key ] !== '' ) {
86
-				$this->style_settings[ $key ] = $atts[ $key ];
85
+			if ( isset( $atts[$key] ) && $atts[$key] !== '' ) {
86
+				$this->style_settings[$key] = $atts[$key];
87 87
 			}
88 88
 
89 89
 			if ( $this->is_color_setting( $key ) ) {
90
-				$this->style_settings[ $key ] = $this->get_color_markup( $this->style_settings[ $key ] );
90
+				$this->style_settings[$key] = $this->get_color_markup( $this->style_settings[$key] );
91 91
 			}
92 92
 		}
93 93
 
Please login to merge, or discard this patch.
classes/models/FrmFieldFormHtml.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -41,8 +41,8 @@  discard block
 block discarded – undo
41 41
 	 * @param array $atts
42 42
 	 */
43 43
 	private function _set( $param, $atts ) {
44
-		if ( isset( $atts[ $param ] ) ) {
45
-			$this->{$param} = $atts[ $param ];
44
+		if ( isset( $atts[$param] ) ) {
45
+			$this->{$param} = $atts[$param];
46 46
 		}
47 47
 	}
48 48
 
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
 
87 87
 		$exclude = array( 'field_obj', 'html' );
88 88
 		foreach ( $exclude as $ex ) {
89
-			if ( isset( $atts[ $ex ] ) ) {
90
-				unset( $this->pass_args[ $ex ] );
89
+			if ( isset( $atts[$ex] ) ) {
90
+				unset( $this->pass_args[$ex] );
91 91
 			}
92 92
 		}
93 93
 	}
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
 	 * @param array $set
100 100
 	 */
101 101
 	private function set_from_field( $atts, $set ) {
102
-		if ( isset( $atts[ $set['param'] ] ) ) {
103
-			$this->{$set['param']} = $atts[ $set['param'] ];
102
+		if ( isset( $atts[$set['param']] ) ) {
103
+			$this->{$set['param']} = $atts[$set['param']];
104 104
 		} else {
105 105
 			$this->{$set['param']} = $this->field_obj->get_field_column( $set['default'] );
106 106
 		}
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 	 */
226 226
 	private function replace_error_shortcode() {
227 227
 		$this->maybe_add_error_id();
228
-		$error = isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ? $this->pass_args['errors'][ 'field' . $this->field_id ] : false;
228
+		$error = isset( $this->pass_args['errors']['field' . $this->field_id] ) ? $this->pass_args['errors']['field' . $this->field_id] : false;
229 229
 		FrmShortcodeHelper::remove_inline_conditions( ! empty( $error ), 'error', $error, $this->html );
230 230
 	}
231 231
 
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 	 * @since 3.06.02
237 237
 	 */
238 238
 	private function maybe_add_error_id() {
239
-		if ( ! isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ) {
239
+		if ( ! isset( $this->pass_args['errors']['field' . $this->field_id] ) ) {
240 240
 			return;
241 241
 		}
242 242
 
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 		preg_match_all( "/\[(input|deletelink)\b(.*?)(?:(\/))?\]/s", $this->html, $shortcodes, PREG_PATTERN_ORDER );
317 317
 
318 318
 		foreach ( $shortcodes[0] as $short_key => $tag ) {
319
-			$shortcode_atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[2][ $short_key ] );
319
+			$shortcode_atts = FrmShortcodeHelper::get_shortcode_attribute_array( $shortcodes[2][$short_key] );
320 320
 			$tag            = FrmShortcodeHelper::get_shortcode_tag( $shortcodes, $short_key );
321 321
 
322 322
 			$replace_with = '';
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 				$replace_with = $this->replace_input_shortcode( $shortcode_atts );
328 328
 			}
329 329
 
330
-			$this->html = str_replace( $shortcodes[0][ $short_key ], $replace_with, $this->html );
330
+			$this->html = str_replace( $shortcodes[0][$short_key], $replace_with, $this->html );
331 331
 		}
332 332
 	}
333 333
 
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
 			unset( $shortcode_atts['class'] );
360 360
 		}
361 361
 
362
-		if ( isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ) {
362
+		if ( isset( $this->pass_args['errors']['field' . $this->field_id] ) ) {
363 363
 			$shortcode_atts['aria-invalid'] = 'true';
364 364
 		}
365 365
 
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
 	 */
417 417
 	private function get_field_div_classes() {
418 418
 		// Add error class
419
-		$classes = isset( $this->pass_args['errors'][ 'field' . $this->field_id ] ) ? ' frm_blank_field' : '';
419
+		$classes = isset( $this->pass_args['errors']['field' . $this->field_id] ) ? ' frm_blank_field' : '';
420 420
 
421 421
 		// Add label position class
422 422
 		$settings = $this->field_obj->display_field_settings();
Please login to merge, or discard this patch.
classes/models/FrmFieldValue.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,8 +59,8 @@
 block discarded – undo
59 59
 	protected function init_saved_value( $entry ) {
60 60
 		if ( $this->field->type === 'html' ) {
61 61
 			$this->saved_value = $this->field->description;
62
-		} elseif ( isset( $entry->metas[ $this->field->id ] ) ) {
63
-			$this->saved_value = $entry->metas[ $this->field->id ];
62
+		} elseif ( isset( $entry->metas[$this->field->id] ) ) {
63
+			$this->saved_value = $entry->metas[$this->field->id];
64 64
 		} else {
65 65
 			$this->saved_value = '';
66 66
 		}
Please login to merge, or discard this patch.
classes/views/frm-fields/back-end/field-multiple.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,6 +6,6 @@
 block discarded – undo
6 6
 	$type = $field['type'];
7 7
 	do_action( 'frm_after_checkbox', compact( 'field', 'field_name', 'type' ) );
8 8
 } else {
9
-	$read_only  = $field['read_only'];
9
+	$read_only = $field['read_only'];
10 10
 	include( dirname( __FILE__ ) . '/' . $field['type'] . '-field.php' );
11 11
 }
Please login to merge, or discard this patch.
classes/views/frm-forms/form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
 		if ( isset( $values['fields'] ) && ! empty( $values['fields'] ) ) {
23 23
 			$values['count'] = 0;
24 24
 			foreach ( $values['fields'] as $field ) {
25
-				$values['count']++;
25
+				$values['count'] ++;
26 26
 				FrmFieldsController::load_single_field( $field, $values );
27 27
 				unset( $field );
28 28
 			}
Please login to merge, or discard this patch.
classes/views/frm-form-actions/_action_inside.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 	$event_labels = FrmFormAction::trigger_labels();
37 37
 	foreach ( $action_control->action_options['event'] as $event ) {
38 38
 		?>
39
-		<option value="<?php echo esc_attr( $event ); ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo esc_html( isset( $event_labels[ $event ] ) ? $event_labels[ $event ] : $event ); ?></option>
39
+		<option value="<?php echo esc_attr( $event ); ?>" <?php echo in_array( $event, (array) $form_action->post_content['event'] ) ? ' selected="selected"' : ''; ?> ><?php echo esc_html( isset( $event_labels[$event] ) ? $event_labels[$event] : $event ); ?></option>
40 40
 <?php } ?>
41 41
 		</select>
42 42
 	</p>
Please login to merge, or discard this patch.
classes/views/frm-form-actions/default_actions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 class FrmDefPostAction extends FrmFormAction {
4 4
 	public function __construct() {
5 5
 		$action_ops = FrmFormAction::default_action_opts( 'frm_wordpress_icon frm-inverse frm_show_upgrade' );
6
-		$action_ops['color']   = 'rgb(0,160,210)';
6
+		$action_ops['color'] = 'rgb(0,160,210)';
7 7
 
8 8
 		parent::__construct( 'wppost', __( 'Create Post', 'formidable' ), $action_ops );
9 9
 	}
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 class FrmDefMlcmpAction extends FrmFormAction {
43 43
 	public function __construct() {
44 44
 		$action_ops = FrmFormAction::default_action_opts( 'frm_mailchimp_icon frm_show_upgrade frm-inverse' );
45
-		$action_ops['color']   = 'var(--dark-grey)';
45
+		$action_ops['color'] = 'var(--dark-grey)';
46 46
 
47 47
 		parent::__construct( 'mailchimp', 'MailChimp', $action_ops );
48 48
 	}
Please login to merge, or discard this patch.
classes/helpers/FrmEntriesListHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 			$s_query['it.form_id'] = $form_id;
18 18
 			$join_form_in_query    = false;
19 19
 		} else {
20
-			$s_query[]          = array(
20
+			$s_query[] = array(
21 21
 				'or'               => 1,
22 22
 				'parent_form_id'   => null,
23 23
 				'parent_form_id <' => 1,
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
 		if ( strpos( $orderby, 'meta' ) !== false ) {
50 50
 			$order_field_type = FrmField::get_type( str_replace( 'meta_', '', $orderby ) );
51
-			$orderby          .= in_array( $order_field_type, array( 'number', 'scale', 'star' ) ) ? '+0' : '';
51
+			$orderby .= in_array( $order_field_type, array( 'number', 'scale', 'star' ) ) ? '+0' : '';
52 52
 		}
53 53
 
54 54
 		$order = self::get_param(
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
 		$r = "<tr id='item-action-{$item->id}'$style>";
160 160
 
161
-		list( $columns, $hidden, , $primary ) = $this->get_column_info();
161
+		list( $columns, $hidden,, $primary ) = $this->get_column_info();
162 162
 		$action_col = false;
163 163
 
164 164
 		foreach ( $columns as $column_name => $column_display_name ) {
Please login to merge, or discard this patch.
classes/helpers/FrmTipsHelper.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 	}
297 297
 
298 298
 	public static function get_banner_tip() {
299
-		$tips       = array(
299
+		$tips = array(
300 300
 			array(
301 301
 				'link' => array(
302 302
 					'medium'  => 'banner',
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 			),
324 324
 		);
325 325
 		$random     = rand( 0, count( $tips ) - 1 );
326
-		$tip        = $tips[ $random ];
326
+		$tip        = $tips[$random];
327 327
 		$tip['num'] = $random;
328 328
 
329 329
 		return $tip;
@@ -332,6 +332,6 @@  discard block
 block discarded – undo
332 332
 	public static function get_random_tip( $tips ) {
333 333
 		$random = rand( 0, count( $tips ) - 1 );
334 334
 
335
-		return $tips[ $random ];
335
+		return $tips[$random];
336 336
 	}
337 337
 }
Please login to merge, or discard this patch.