original_string: protected function marshalPort($port): ? int
      {
          if ( null === $port ) {
              return null;
          }
  
          $port = (int) $port;
  
          if ( 0 > $port || 65535 < $port ) {
              throw new UriException(
                  sprintf('Invalid port: %s, value must be between 0 and 65535', $port)
              );
          }
  
          return $port;
      }
code: protected function marshalPort($port): ? int
      {
          if ( null === $port ) {
              return null;
          }
  
          $port = (int) $port;
  
          if ( 0 > $port || 65535 < $port ) {
              throw new UriException(
                  sprintf('Invalid port: %s, value must be between 0 and 65535', $port)
              );
          }
  
          return $port;
      }
code_tokens: protected function marshalPort ( $ port ) : ? int { if ( null === $ port ) { return null ; } $ port = ( int ) $ port ; if ( 0 > $ port || 65535 < $ port ) { throw new UriException ( sprintf ( 'Invalid port: %s, value must be between 0 and 65535' , $ port ) ) ; } return $ port ; }
docstring: marshals the port.
  
  @param $port
  @return int|null
  @throws UriException
docstring_tokens: marshals the port .