original_string: public static function getExternalIP()
      {
          $ip = \Cache::rememberForever('external-ip-address', function () {
              $response = Curl::get('http://ipinfo.io/ip');
              $ip = trim($response, "\t\r\n");
              try {
                  $validator = Validator::make(['ip' => $ip], ['ip' => 'ip']);
                  $validator->validate();
              } catch (ValidationException $e) {
                  $ip = null;
              }
  
              return $ip;
          });
  
          return $ip;
      }
code: public static function getExternalIP()
      {
          $ip = \Cache::rememberForever('external-ip-address', function () {
              $response = Curl::get('http://ipinfo.io/ip');
              $ip = trim($response, "\t\r\n");
              try {
                  $validator = Validator::make(['ip' => $ip], ['ip' => 'ip']);
                  $validator->validate();
              } catch (ValidationException $e) {
                  $ip = null;
              }
  
              return $ip;
          });
  
          return $ip;
      }
code_tokens: public static function getExternalIP ( ) { $ ip = \ Cache :: rememberForever ( 'external-ip-address' , function ( ) { $ response = Curl :: get ( 'http://ipinfo.io/ip' ) ; $ ip = trim ( $ response , "\t\r\n" ) ; try { $ validator = Validator :: make ( [ 'ip' => $ ip ] , [ 'ip' => 'ip' ] ) ; $ validator -> validate ( ) ; } catch ( ValidationException $ e ) { $ ip = null ; } return $ ip ; } ) ; return $ ip ; }
docstring: Returns instance's external IP address.
  
  @return mixed
docstring_tokens: Returns instance s external IP address .