steps; } /** * @param Step[] $steps * @return self */ public static function create(array $steps): self { return new self($steps); } public function jsonSerialize(): mixed { return [ 'steps' => array_map(fn(Step $step) => $step->jsonSerialize(), $this->steps), ]; } }