Code Duplication    Length = 9-9 lines in 2 locations

includes/wpinv-gd-functions.php 1 location

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

includes/wpinv-item-functions.php 1 location

@@ 697-705 (lines=9) @@
694
        $meta['free_trial']         = $data['free_trial'];
695
        $meta['trial_period']       = $data['trial_period'];
696
        $meta['trial_interval']     = absint( $data['trial_interval'] );
697
    } else {
698
        $meta['is_recurring']       = 0;
699
        $meta['recurring_period']   = '';
700
        $meta['recurring_interval'] = '';
701
        $meta['recurring_limit']    = '';
702
        $meta['free_trial']         = 0;
703
        $meta['trial_period']       = '';
704
        $meta['trial_interval']     = '';
705
    }
706
    
707
    $post_data  = array( 
708
        'post_title'    => $data['title'],