public function finishRecipe(): callable
    {
        return function ($result): ChefInterface {
            /**
             * @var Chef $this
             */
            //This method is called only if $this->recipe is a valid RecipeInterface instance
            $this->recipe->validate($result);

            $this->position = \count($this->steps) + 1;

            return $this;
        };
    }
public function finishRecipe(): callable
    {
        return function ($result): ChefInterface {
            /**
             * @var Chef $this
             */
            //This method is called only if $this->recipe is a valid RecipeInterface instance
            $this->recipe->validate($result);

            $this->position = \count($this->steps) + 1;

            return $this;
        };
    }
public function finishRecipe ( ) : callable { return function ( $ result ) : ChefInterface { /**
             * @var Chef $this
             */ //This method is called only if $this->recipe is a valid RecipeInterface instance $ this -> recipe -> validate ( $ result ) ; $ this -> position = \ count ( $ this -> steps ) + 1 ; return $ this ; } ; }
Called by a step to stop the execution of the recipe and check if the dish is the result excepted.
Called by a step to stop the execution of the recipe and check if the dish is the result excepted .