class UnitSolver | class UnitSolver | ||||
{ | { | ||||
public function getWeight(UnitInterface $unit, int $quantityProduct, ?int $quantity){ | |||||
public function getWeight(UnitInterface $unit, float $quantityProduct, ?int $quantity){ | |||||
if($quantity) { | if($quantity) { | ||||
return ($quantityProduct / $unit->getCoefficient()) * $quantity; | return ($quantityProduct / $unit->getCoefficient()) * $quantity; | ||||
}else{ | }else{ |