Code Duplication    Length = 11-11 lines in 2 locations

includes/class-wpinv-invoice.php 2 locations

@@ 1025-1035 (lines=11) @@
1022
        $this->recalculate_total();
1023
    }
1024
1025
    private function decrease_subtotal( $amount = 0.00 ) {
1026
        $amount          = (float) $amount;
1027
        $this->subtotal -= $amount;
1028
        $this->subtotal  = wpinv_format_amount( $this->subtotal, NULL, true );
1029
1030
        if ( $this->subtotal < 0 ) {
1031
            $this->subtotal = 0;
1032
        }
1033
1034
        $this->recalculate_total();
1035
    }
1036
1037
    private function increase_fees( $amount = 0.00 ) {
1038
        $amount            = (float)$amount;
@@ 1045-1055 (lines=11) @@
1042
        $this->recalculate_total();
1043
    }
1044
1045
    private function decrease_fees( $amount = 0.00 ) {
1046
        $amount            = (float) $amount;
1047
        $this->fees_total -= $amount;
1048
        $this->fees_total  = wpinv_format_amount( $this->fees_total, NULL, true );
1049
1050
        if ( $this->fees_total < 0 ) {
1051
            $this->fees_total = 0;
1052
        }
1053
1054
        $this->recalculate_total();
1055
    }
1056
1057
    public function recalculate_total() {
1058
        global $wpi_nosave;