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