You are here

private function Uri::filterPort in Auth0 Single Sign On 8.2

Parameters

int|null $port:

Return value

int|null

Throws

\InvalidArgumentException If the port is invalid.

2 calls to Uri::filterPort()
Uri::applyParts in vendor/guzzlehttp/psr7/src/Uri.php
Apply parse_url parts to a URI.
Uri::withPort in vendor/guzzlehttp/psr7/src/Uri.php
Return an instance with the specified port.

File

vendor/guzzlehttp/psr7/src/Uri.php, line 624

Class

Uri
PSR-7 URI implementation.

Namespace

GuzzleHttp\Psr7

Code

private function filterPort($port) {
  if ($port === null) {
    return null;
  }
  $port = (int) $port;
  if (0 > $port || 0xffff < $port) {
    throw new \InvalidArgumentException(sprintf('Invalid port: %d. Must be between 0 and 65535', $port));
  }
  return $port;
}