$handlers */ public function __construct(private readonly array $handlers) {} public function resolve(string $type): ?StepHandler { foreach ($this->handlers as $handler) { if ($handler->type() === $type) { return $handler; } } return null; } }