Code Duplication    Length = 9-9 lines in 2 locations

includes/wpinv-gd-functions.php 1 location

@@ 128-136 (lines=9) @@
125
        $meta['free_trial']         = $sub_num_trial_days > 0 ? 1 : 0;
126
        $meta['trial_period']       = $package->sub_num_trial_units;
127
        $meta['trial_interval']     = $sub_num_trial_days;
128
    } else {
129
        $meta['is_recurring']       = 0;
130
        $meta['recurring_period']   = '';
131
        $meta['recurring_interval'] = '';
132
        $meta['recurring_limit']    = '';
133
        $meta['free_trial']         = 0;
134
        $meta['trial_period']       = '';
135
        $meta['trial_interval']     = '';
136
    }
137
    
138
    $data  = array( 
139
        'post_title'    => $package->title,

includes/wpinv-item-functions.php 1 location

@@ 743-751 (lines=9) @@
740
        $meta['free_trial']         = $data['free_trial'];
741
        $meta['trial_period']       = $data['trial_period'];
742
        $meta['trial_interval']     = absint( $data['trial_interval'] );
743
    } else {
744
        $meta['is_recurring']       = 0;
745
        $meta['recurring_period']   = '';
746
        $meta['recurring_interval'] = '';
747
        $meta['recurring_limit']    = '';
748
        $meta['free_trial']         = 0;
749
        $meta['trial_period']       = '';
750
        $meta['trial_interval']     = '';
751
    }
752
    
753
    $post_data  = array( 
754
        'post_title'    => $data['title'],