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

@@ 1108-1111 (lines=4) @@
1105
            unset($opt, $defaut);
1106
        }
1107
1108
        if ( ! isset($values['custom_style']) ) {
1109
            $frm_settings = self::get_settings();
1110
			$values['custom_style'] = ( $post_values && isset( $post_values['options']['custom_style'] ) ) ? absint( $_POST['options']['custom_style'] ) : ( $frm_settings->load_style != 'none' );
1111
        }
1112
1113
		foreach ( array( 'before', 'after', 'submit' ) as $h ) {
1114
            if ( ! isset( $values[ $h .'_html' ] ) ) {