@@ -436,8 +436,8 @@ private function _prepareRequest($method, $url, $params, $headers, $apiMode)
436
436
// X-Stripe-Client-User-Agent header via the optional getUserAgentInfo()
437
437
// method
438
438
$ clientUAInfo = null ;
439
- if (\method_exists ($ this -> httpClient (), 'getUserAgentInfo ' )) {
440
- $ clientUAInfo = $ this -> httpClient ()->getUserAgentInfo ();
439
+ if (\method_exists (self :: httpClient (), 'getUserAgentInfo ' )) {
440
+ $ clientUAInfo = self :: httpClient ()->getUserAgentInfo ();
441
441
}
442
442
443
443
if ($ params && \is_array ($ params )) {
@@ -518,7 +518,7 @@ private function _requestRaw($method, $url, $params, $headers, $apiMode, $usage)
518
518
519
519
$ requestStartMs = Util \Util::currentTimeMillis ();
520
520
521
- list ($ rbody , $ rcode , $ rheaders ) = $ this -> httpClient ()->request (
521
+ list ($ rbody , $ rcode , $ rheaders ) = self :: httpClient ()->request (
522
522
$ method ,
523
523
$ absUrl ,
524
524
$ rawHeaders ,
@@ -562,7 +562,7 @@ private function _requestRawStreaming($method, $url, $params, $headers, $apiMode
562
562
563
563
$ requestStartMs = Util \Util::currentTimeMillis ();
564
564
565
- list ($ rbody , $ rcode , $ rheaders ) = $ this -> streamingHttpClient ()->requestStream (
565
+ list ($ rbody , $ rcode , $ rheaders ) = self :: streamingHttpClient ()->requestStream (
566
566
$ method ,
567
567
$ absUrl ,
568
568
$ rawHeaders ,
@@ -673,7 +673,7 @@ public static function resetTelemetry()
673
673
/**
674
674
* @return HttpClient\ClientInterface
675
675
*/
676
- private function httpClient ()
676
+ public static function httpClient ()
677
677
{
678
678
if (!self ::$ _httpClient ) {
679
679
self ::$ _httpClient = HttpClient \CurlClient::instance ();
@@ -685,7 +685,7 @@ private function httpClient()
685
685
/**
686
686
* @return HttpClient\StreamingClientInterface
687
687
*/
688
- private function streamingHttpClient ()
688
+ public static function streamingHttpClient ()
689
689
{
690
690
if (!self ::$ _streamingHttpClient ) {
691
691
self ::$ _streamingHttpClient = HttpClient \CurlClient::instance ();
0 commit comments