@@ -0,0 +1,17 @@ | |||
<?php | |||
namespace Lc\CaracoleBundle\Solver\Config; | |||
use Lc\CaracoleBundle\Model\Config\UnitInterface; | |||
class UnitSolver | |||
{ | |||
public function getWeight(UnitInterface $unit, int $quantityProduct, int $quantity){ | |||
return ($quantityProduct / $unit->getCoefficient()) * $quantity; | |||
} | |||
} |