original_string: public function checkIpIsPrivate($ipGiven)
      {
          if (filter_var($ipGiven, FILTER_VALIDATE_IP)) {
              if (!filter_var($ipGiven, FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE | FILTER_FLAG_NO_PRIV_RANGE)) {
                  return 'private';
              }
              return 'public';
          }
          return 'invalid IP';
      }
code: public function checkIpIsPrivate($ipGiven)
      {
          if (filter_var($ipGiven, FILTER_VALIDATE_IP)) {
              if (!filter_var($ipGiven, FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE | FILTER_FLAG_NO_PRIV_RANGE)) {
                  return 'private';
              }
              return 'public';
          }
          return 'invalid IP';
      }
code_tokens: public function checkIpIsPrivate ( $ ipGiven ) { if ( filter_var ( $ ipGiven , FILTER_VALIDATE_IP ) ) { if ( ! filter_var ( $ ipGiven , FILTER_VALIDATE_IP , FILTER_FLAG_NO_RES_RANGE | FILTER_FLAG_NO_PRIV_RANGE ) ) { return 'private' ; } return 'public' ; } return 'invalid IP' ; }
docstring: Checks if given IP is a private or public one
  
  @param ipv4 $ipGiven
  @return string
docstring_tokens: Checks if given IP is a private or public one