public function runRecipe(): callable
    {
        return function (array $workPlan): ChefInterface {
            //If this method is called, $this->recipe is a valid RecipeInterface instance
            $this->workPlan = \array_merge($this->workPlan, $workPlan);
            $this->cooking = true;

            $this->updateStates();

            $this->prepare();

            $this->continue();

            $this->clean();

            return $this;
        };
    }
public function runRecipe(): callable
    {
        return function (array $workPlan): ChefInterface {
            //If this method is called, $this->recipe is a valid RecipeInterface instance
            $this->workPlan = \array_merge($this->workPlan, $workPlan);
            $this->cooking = true;

            $this->updateStates();

            $this->prepare();

            $this->continue();

            $this->clean();

            return $this;
        };
    }
public function runRecipe ( ) : callable { return function ( array $ workPlan ) : ChefInterface { //If this method is called, $this->recipe is a valid RecipeInterface instance $ this -> workPlan = \ array_merge ( $ this -> workPlan , $ workPlan ) ; $ this -> cooking = true ; $ this -> updateStates ( ) ; $ this -> prepare ( ) ; $ this -> continue ( ) ; $ this -> clean ( ) ; return $ this ; } ; }
To execute a cooking and switch to cookine state.
To execute a cooking and switch to cookine state .