Code Duplication    Length = 4-6 lines in 2 locations

classes/helpers/FrmFormsHelper.php 1 location

@@ 162-167 (lines=6) @@
159
160
        $values = self::fill_default_opts($values, false, $post_values);
161
162
        if ( $post_values && isset($post_values['options']['custom_style']) ) {
163
            $values['custom_style'] = $post_values['options']['custom_style'];
164
        } else {
165
            $frm_settings = FrmAppHelper::get_settings();
166
            $values['custom_style'] = ( $frm_settings->load_style != 'none' );
167
        }
168
169
        return apply_filters('frm_setup_new_form_vars', $values);
170
    }

classes/helpers/FrmAppHelper.php 1 location

@@ 1117-1120 (lines=4) @@
1114
            unset($opt, $defaut);
1115
        }
1116
1117
        if ( ! isset($values['custom_style']) ) {
1118
            $frm_settings = self::get_settings();
1119
			$values['custom_style'] = ( $post_values && isset( $post_values['options']['custom_style'] ) ) ? absint( $_POST['options']['custom_style'] ) : ( $frm_settings->load_style != 'none' );
1120
        }
1121
1122
		foreach ( array( 'before', 'after', 'submit' ) as $h ) {
1123
			if ( ! isset( $values[ $h . '_html' ] ) ) {