浏览代码

Merge branch 'develop'

master
Guillaume 2 年前
父节点
当前提交
79ea2f943f
共有 1 个文件被更改,包括 5 次插入8 次删除
  1. +5
    -8
      Solver/Config/UnitSolver.php

+ 5
- 8
Solver/Config/UnitSolver.php 查看文件

@@ -2,20 +2,17 @@

namespace Lc\CaracoleBundle\Solver\Config;



use Lc\CaracoleBundle\Model\Config\UnitInterface;

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


}

正在加载...
取消
保存