Skip to content

Commit

Permalink
format GbfsFreeVehicleStatusMapper
Browse files Browse the repository at this point in the history
  • Loading branch information
JustCris654 committed Dec 17, 2024
1 parent 086effd commit ee50eee
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,12 @@ public VehicleRentalVehicle mapFreeVehicleStatus(GBFSBike vehicle) {
);
}
// if the propulsion type has an engine current_range_meters is required
if (vehicle.getVehicleTypeId() != null
&& vehicleTypes.get(vehicle.getVehicleTypeId()).propulsionType != RentalVehicleType.PropulsionType.HUMAN
&& rangeMeters == null) {
if (
vehicle.getVehicleTypeId() != null &&
vehicleTypes.get(vehicle.getVehicleTypeId()).propulsionType !=
RentalVehicleType.PropulsionType.HUMAN &&
rangeMeters == null
) {
return null;
}
rentalVehicle.fuel = new RentalVehicleFuel(fuelPercent, rangeMeters);
Expand Down

0 comments on commit ee50eee

Please sign in to comment.