code: public static function buildConnector(
          LoopInterface $loop,
          DnsResolver $dns = null
      ) {
          return null !== $dns
              ? new Connector($loop, ['dns' => $dns])
              : new Connector($loop);
      }
docs: @param LoopInterface    $loop
  @param DnsResolver|null $dns
  
  @return ConnectorInterface