src/Entity/Recipe.php
public function setProducts(array $products)
    {
        $this->products = array_values(array_filter($products, function ($product): bool {
            return $product instanceof Product;
        }));
        return $this;
    }
public function setProducts(array $products)
    {
        $this->products = array_values(array_filter($products, function ($product): bool {
            return $product instanceof Product;
        }));
        return $this;
    }
public function setProducts ( array $ products ) { $ this -> products = array_values ( array_filter ( $ products , function ( $ product ) : bool { return $ product instanceof Product ; } ) ) ; return $ this ; }
Sets the products of the recipe.
@param array|Product[] $products
@return $this Implementing fluent interface.
Sets the products of the recipe .