original_string: private static function getServerParamIp(ServerRequestInterface $request, string $key): string
      {
          $ip = self::getServerParam($request, $key);
  
          if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) {
              return $ip;
          }
  
          return '-';
      }
code: private static function getServerParamIp(ServerRequestInterface $request, string $key): string
      {
          $ip = self::getServerParam($request, $key);
  
          if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6)) {
              return $ip;
          }
  
          return '-';
      }
code_tokens: private static function getServerParamIp ( ServerRequestInterface $ request , string $ key ) : string { $ ip = self :: getServerParam ( $ request , $ key ) ; if ( filter_var ( $ ip , FILTER_VALIDATE_IP , FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6 ) ) { return $ ip ; } return '-' ; }
docstring: Returns an ip from the server params
docstring_tokens: Returns an ip from the server params