src/Entity/RecipeProduct.php
public function setProbability(float $probability): self
    {
        $this->probability = (int) ($probability * self::FACTOR_AMOUNT_PROBABILITY);
        return $this;
    }
public function setProbability(float $probability): self
    {
        $this->probability = (int) ($probability * self::FACTOR_AMOUNT_PROBABILITY);
        return $this;
    }
public function setProbability ( float $ probability ) : self { $ this -> probability = ( int ) ( $ probability * self :: FACTOR_AMOUNT_PROBABILITY ) ; return $ this ; }
Sets the probability of the product in the recipe.
@param float $probability
@return $this Implementing fluent interface.
Sets the probability of the product in the recipe .