Code Duplication    Length = 12-12 lines in 2 locations

command/CreateReceiverMonthBillCommandHandler.php 2 locations

@@ 91-102 (lines=12) @@
88
     *
89
     * @return int
90
     */
91
    private function getBillingCondition()
92
    {
93
        if (!empty($this->getCustomer()->cond_reglement_id)) {
94
            return $this->getCustomer()->cond_reglement_id;
95
        }
96
97
        if (!empty($this->conf->BBC_DEFAULT_PAYMENT_TERM_ID)) {
98
            return $this->conf->BBC_DEFAULT_PAYMENT_TERM_ID;
99
        }
100
101
        throw new \InvalidArgumentException('Billing condition / MAIN_DEFAULT_PAYMENT_TERM_ID not set');
102
    }
103
104
    /**
105
     * Get the default billing type if not set in the customer.
@@ 109-120 (lines=12) @@
106
     *
107
     * @return int
108
     */
109
    private function getBillingType()
110
    {
111
        if (!empty($this->getCustomer()->mode_reglement_id)) {
112
            return $this->getCustomer()->mode_reglement_id;
113
        }
114
115
        if (!empty($this->conf->BBC_DEFAULT_PAYMENT_TYPE_ID)) {
116
            return $this->conf->BBC_DEFAULT_PAYMENT_TYPE_ID;
117
        }
118
119
        throw new \InvalidArgumentException('Billing type / MAIN_DEFAULT_PAYMENT_TYPE_ID not set');
120
    }
121
122
123
}