Code Duplication    Length = 11-11 lines in 2 locations

includes/class-wpinv-invoice.php 2 locations

@@ 1022-1032 (lines=11) @@
1019
        $this->recalculate_total();
1020
    }
1021
1022
    private function decrease_subtotal( $amount = 0.00 ) {
1023
        $amount          = (float) $amount;
1024
        $this->subtotal -= $amount;
1025
        $this->subtotal  = wpinv_round_amount( $this->subtotal );
1026
1027
        if ( $this->subtotal < 0 ) {
1028
            $this->subtotal = 0;
1029
        }
1030
1031
        $this->recalculate_total();
1032
    }
1033
1034
    private function increase_fees( $amount = 0.00 ) {
1035
        $amount            = (float)$amount;
@@ 1042-1052 (lines=11) @@
1039
        $this->recalculate_total();
1040
    }
1041
1042
    private function decrease_fees( $amount = 0.00 ) {
1043
        $amount            = (float) $amount;
1044
        $this->fees_total -= $amount;
1045
        $this->fees_total  = wpinv_round_amount( $this->fees_total );
1046
1047
        if ( $this->fees_total < 0 ) {
1048
            $this->fees_total = 0;
1049
        }
1050
1051
        $this->recalculate_total();
1052
    }
1053
1054
    public function recalculate_total() {
1055
        global $wpi_nosave;