public function followStepsRecipe(): callable
    {
        return function (array $steps, array $onError): ChefInterface {
            /**
             * @var Chef $this
             */
            $this->steps = \array_values($steps);
            $this->stepsNames = \array_flip(\array_keys($steps));
            $this->onError = $onError;

            $this->updateStates();

            return $this;
        };
    }
public function followStepsRecipe(): callable
    {
        return function (array $steps, array $onError): ChefInterface {
            /**
             * @var Chef $this
             */
            $this->steps = \array_values($steps);
            $this->stepsNames = \array_flip(\array_keys($steps));
            $this->onError = $onError;

            $this->updateStates();

            return $this;
        };
    }
public function followStepsRecipe ( ) : callable { return function ( array $ steps , array $ onError ) : ChefInterface { /**
             * @var Chef $this
             */ $ this -> steps = \ array_values ( $ steps ) ; $ this -> stepsNames = \ array_flip ( \ array_keys ( $ steps ) ) ; $ this -> onError = $ onError ; $ this -> updateStates ( ) ; return $ this ; } ; }
To learn steps in the recipe, in the good order
To learn steps in the recipe in the good order