public function continueRecipe(): callable
    {
        return function (array $with = [], string $nextStep = null): ChefInterface {
            /**
             * @var Chef $this
             */
            $this->updateMyWorkPlan($with);

            while (($callable = $this->getNextStep($nextStep)) instanceof BowlInterface) {
                try {
                    $callable->execute($this, $this->workPlan);
                } catch (\Throwable $error) {
                    $this->position = \count($this->steps) + 1;

                    $this->callErrors($error);
                }

                $nextStep = null;
            }

            return $this;
        };
    }
public function continueRecipe(): callable
    {
        return function (array $with = [], string $nextStep = null): ChefInterface {
            /**
             * @var Chef $this
             */
            $this->updateMyWorkPlan($with);

            while (($callable = $this->getNextStep($nextStep)) instanceof BowlInterface) {
                try {
                    $callable->execute($this, $this->workPlan);
                } catch (\Throwable $error) {
                    $this->position = \count($this->steps) + 1;

                    $this->callErrors($error);
                }

                $nextStep = null;
            }

            return $this;
        };
    }
public function continueRecipe ( ) : callable { return function ( array $ with = [ ] , string $ nextStep = null ) : ChefInterface { /**
             * @var Chef $this
             */ $ this -> updateMyWorkPlan ( $ with ) ; while ( ( $ callable = $ this -> getNextStep ( $ nextStep ) ) instanceof BowlInterface ) { try { $ callable -> execute ( $ this , $ this -> workPlan ) ; } catch ( \ Throwable $ error ) { $ this -> position = \ count ( $ this -> steps ) + 1 ; $ this -> callErrors ( $ error ) ; } $ nextStep = null ; } return $ this ; } ; }
Called by a step to continue the execution of the recipe but before, update ingredients available on the workplan
Called by a step to continue the execution of the recipe but before update ingredients available on the workplan