Skip to content

Commit

Permalink
Update price_calculation.rb: lc true/false
Browse files Browse the repository at this point in the history
  • Loading branch information
mjavurek authored Dec 17, 2024
1 parent f2868fe commit 9f11da4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/concerns/price_calculation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module PriceCalculation

# Gross price = net price + deposit + tax.
# @return [Number] Gross price.
def gross_price(include_deposit = TRUE)
def gross_price(include_deposit = true)

Check failure on line 6 in app/models/concerns/price_calculation.rb

View workflow job for this annotation

GitHub Actions / test

Style/OptionalBooleanParameter: Prefer keyword arguments for arguments with a boolean default value; use `include_deposit: true` instead of `include_deposit = true`.
if include_deposit
add_percent(price + deposit, tax)
else
Expand All @@ -13,7 +13,7 @@ def gross_price(include_deposit = TRUE)

# @return [Number] Price for the foodcoop-member.
def fc_price
add_percent(gross_price(include_deposit = FALSE), FoodsoftConfig[:price_markup]) + fc_deposit
add_percent(gross_price(include_deposit = false), FoodsoftConfig[:price_markup]) + fc_deposit

Check failure on line 16 in app/models/concerns/price_calculation.rb

View workflow job for this annotation

GitHub Actions / test

Lint/UselessAssignment: Useless assignment to variable - `include_deposit`.
end

def gross_deposit
Expand Down

0 comments on commit 9f11da4

Please sign in to comment.