mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
Inspecting 1480 files
........................................................................................................................................................................................................................................................................................................................................W............................W..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Offenses:
app/models/spree/line_item.rb:283:55: W: [Corrected] Lint/SafeNavigationChain: Do not chain ordinary method call after safe navigation operator.
self.final_weight_volume = variant&.unit_value * quantity
^^^^^^^^^^^
app/models/spree/line_item.rb:283:57: C: [Corrected] Layout/SpaceAroundMethodCallOperator: Avoid using spaces around a method call operator.
self.final_weight_volume = variant&.unit_value&. * quantity
^
app/models/spree/stock/availability_validator.rb:31:77: W: [Corrected] Lint/SafeNavigationChain: Do not chain ordinary method call after safe navigation operator.
return line_item.order.shipments.first if line_item.order&.shipments.any?
^^^^^
1480 files inspected, 3 offenses detected, 3 offenses corrected