module ActionDispatch::Http::URL

def normalize_port(port, protocol)

Experimental RBS support (using type sampling data from the type_fusion project).

def normalize_port: (Integer port, String protocol) -> untyped

This signature was generated using 1 sample from 1 application.

def normalize_port(port, protocol)
  return unless port
  case protocol
  when "//" then yield port
  when "https://"
    yield port unless port.to_i == 443
  else
    yield port unless port.to_i == 80
  end
end