Code Duplication    Length = 4-6 lines in 2 locations

classes/helpers/FrmFormsHelper.php 1 location

@@ 177-182 (lines=6) @@
174
175
        $values = self::fill_default_opts($values, false, $post_values);
176
177
        if ( $post_values && isset($post_values['options']['custom_style']) ) {
178
            $values['custom_style'] = $post_values['options']['custom_style'];
179
        } else {
180
            $frm_settings = FrmAppHelper::get_settings();
181
            $values['custom_style'] = ( $frm_settings->load_style != 'none' );
182
        }
183
184
        return apply_filters('frm_setup_new_form_vars', $values);
185
    }

classes/helpers/FrmAppHelper.php 1 location

@@ 1124-1127 (lines=4) @@
1121
            unset($opt, $defaut);
1122
        }
1123
1124
        if ( ! isset($values['custom_style']) ) {
1125
            $frm_settings = self::get_settings();
1126
			$values['custom_style'] = ( $post_values && isset( $post_values['options']['custom_style'] ) ) ? absint( $_POST['options']['custom_style'] ) : ( $frm_settings->load_style != 'none' );
1127
        }
1128
1129
		foreach ( array( 'before', 'after', 'submit' ) as $h ) {
1130
			if ( ! isset( $values[ $h . '_html' ] ) ) {