public function prepareCooking(): callable
    {
        return function (array $workPlan, ChefInterface $chef): RecipeInterface {
            /**
             * @var Recipe $this
             */
            foreach ($this->requiredIngredients as $ingredient) {
                $ingredient->prepare($workPlan, $chef);
            }

            return $this;
        };
    }
public function prepareCooking(): callable
    {
        return function (array $workPlan, ChefInterface $chef): RecipeInterface {
            /**
             * @var Recipe $this
             */
            foreach ($this->requiredIngredients as $ingredient) {
                $ingredient->prepare($workPlan, $chef);
            }

            return $this;
        };
    }
public function prepareCooking ( ) : callable { return function ( array $ workPlan , ChefInterface $ chef ) : RecipeInterface { /**
             * @var Recipe $this
             */ foreach ( $ this -> requiredIngredients as $ ingredient ) { $ ingredient -> prepare ( $ workPlan , $ chef ) ; } return $ this ; } ; }
To check if all ingredients are available and valid on the workplan
To check if all ingredients are available and valid on the workplan