code: protected function filterPort(?int $port): ?int
      {
          if ((integer) $port >= 0 && (integer) $port <= 65535) {
              return $port;
          }
  
          throw new InvalidArgumentException('Uri port must be null or an integer between 1 and 65535 (inclusive)');
      }
docs: Filter allowable port to minimize risk
  
  @access protected
  @return integer|null $port
  @throws InvalidArgumentException for incorrect port assigned