Dumplie\Inventory\Application\Command\CreateProduct::precision PHP Method

precision() public method

public precision ( ) : integer
return integer
    public function precision() : int
    {
        return $this->precision;
    }

Usage Example

 /**
  * @param CreateProduct $createProduct
  *
  * @throws \Exception
  */
 public function handle(CreateProduct $createProduct)
 {
     $this->products->add(new Product(new SKU($createProduct->sku()), new Price($createProduct->amount(), $createProduct->currency(), $createProduct->precision()), $createProduct->isInStock()));
 }