public static function priceWithDiscount($price, $discount, bool $discountIsPercent = false)
    {
        if ($discountIsPercent) {
            $discount = $discount / 100;
        }
        return $price - ($price * $discount);
    }
public static function priceWithDiscount($price, $discount, bool $discountIsPercent = false)
    {
        if ($discountIsPercent) {
            $discount = $discount / 100;
        }
        return $price - ($price * $discount);
    }
public static function priceWithDiscount ( $ price , $ discount , bool $ discountIsPercent = false ) { if ( $ discountIsPercent ) { $ discount = $ discount / 100 ; } return $ price - ( $ price * $ discount ) ; }
Get a price minus the discount
@param float $price
@param float $discount
@param bool $discountIsPercent
@return float
Get a price minus the discount