Code Duplication    Length = 12-12 lines in 2 locations

command/CreateReceiverMonthBillCommandHandler.php 2 locations

@@ 75-86 (lines=12) @@
72
     *
73
     * @return int
74
     */
75
    private function getBillingCondition()
76
    {
77
        if (!empty($this->getCustomer()->cond_reglement_id)) {
78
            return $this->getCustomer()->cond_reglement_id;
79
        }
80
81
        if (!empty($this->conf->BBC_DEFAULT_PAYMENT_TERM_ID)) {
82
            return $this->conf->BBC_DEFAULT_PAYMENT_TERM_ID;
83
        }
84
85
        throw new \InvalidArgumentException('Billing condition / MAIN_DEFAULT_PAYMENT_TERM_ID not set');
86
    }
87
88
    /**
89
     * Get the default billing type if not set in the customer.
@@ 93-104 (lines=12) @@
90
     *
91
     * @return int
92
     */
93
    private function getBillingType()
94
    {
95
        if (!empty($this->getCustomer()->mode_reglement_id)) {
96
            return $this->getCustomer()->mode_reglement_id;
97
        }
98
99
        if (!empty($this->conf->BBC_DEFAULT_PAYMENT_TYPE_ID)) {
100
            return $this->conf->BBC_DEFAULT_PAYMENT_TYPE_ID;
101
        }
102
103
        throw new \InvalidArgumentException('Billing type / MAIN_DEFAULT_PAYMENT_TYPE_ID not set');
104
    }
105
106
107
}