@@ -152,14 +152,14 @@ public function request(string $method, string $url, array $options = []): Respo
152152 if (\is_array ($ options ['auth_ntlm ' ])) {
153153 $ count = \count ($ options ['auth_ntlm ' ]);
154154 if ($ count <= 0 || $ count > 2 ) {
155- throw new InvalidArgumentException (sprintf ('Option "auth_ntlm" must contain 1 or 2 elements, %d given. ' , $ count ));
155+ throw new InvalidArgumentException (\ sprintf ('Option "auth_ntlm" must contain 1 or 2 elements, %d given. ' , $ count ));
156156 }
157157
158158 $ options ['auth_ntlm ' ] = implode (': ' , $ options ['auth_ntlm ' ]);
159159 }
160160
161161 if (!\is_string ($ options ['auth_ntlm ' ])) {
162- throw new InvalidArgumentException (sprintf ('Option "auth_ntlm" must be a string or an array, "%s" given. ' , get_debug_type ($ options ['auth_ntlm ' ])));
162+ throw new InvalidArgumentException (\ sprintf ('Option "auth_ntlm" must be a string or an array, "%s" given. ' , get_debug_type ($ options ['auth_ntlm ' ])));
163163 }
164164
165165 $ curlopts [\CURLOPT_USERPWD ] = $ options ['auth_ntlm ' ];
@@ -297,21 +297,21 @@ public function request(string $method, string $url, array $options = []): Respo
297297 unset($ multi ->pushedResponses [$ url ]);
298298
299299 if (self ::acceptPushForRequest ($ method , $ options , $ pushedResponse )) {
300- $ this ->logger ?->debug(sprintf ('Accepting pushed response: "%s %s" ' , $ method , $ url ));
300+ $ this ->logger ?->debug(\ sprintf ('Accepting pushed response: "%s %s" ' , $ method , $ url ));
301301
302302 // Reinitialize the pushed response with request's options
303303 $ ch = $ pushedResponse ->handle ;
304304 $ pushedResponse = $ pushedResponse ->response ;
305305 $ pushedResponse ->__construct ($ multi , $ url , $ options , $ this ->logger );
306306 } else {
307- $ this ->logger ?->debug(sprintf ('Rejecting pushed response: "%s" ' , $ url ));
307+ $ this ->logger ?->debug(\ sprintf ('Rejecting pushed response: "%s" ' , $ url ));
308308 $ pushedResponse = null ;
309309 }
310310 }
311311
312312 if (!$ pushedResponse ) {
313313 $ ch = curl_init ();
314- $ this ->logger ?->info(sprintf ('Request: "%s %s" ' , $ method , $ url ));
314+ $ this ->logger ?->info(\ sprintf ('Request: "%s %s" ' , $ method , $ url ));
315315 $ curlopts += [\CURLOPT_SHARE => $ multi ->share ];
316316 }
317317
@@ -321,7 +321,7 @@ public function request(string $method, string $url, array $options = []): Respo
321321 }
322322 if (null !== $ value && !curl_setopt ($ ch , $ opt , $ value ) && \CURLOPT_CERTINFO !== $ opt && (!\defined ('CURLOPT_HEADEROPT ' ) || \CURLOPT_HEADEROPT !== $ opt )) {
323323 $ constantName = $ this ->findConstantName ($ opt );
324- throw new TransportException (sprintf ('Curl option "%s" is not supported. ' , $ constantName ?? $ opt ));
324+ throw new TransportException (\ sprintf ('Curl option "%s" is not supported. ' , $ constantName ?? $ opt ));
325325 }
326326 }
327327
@@ -388,7 +388,7 @@ private static function readRequestBody(int $length, \Closure $body, string &$bu
388388 {
389389 if (!$ eof && \strlen ($ buffer ) < $ length ) {
390390 if (!\is_string ($ data = $ body ($ length ))) {
391- throw new TransportException (sprintf ('The return value of the "body" option callback must be a string, "%s" returned. ' , get_debug_type ($ data )));
391+ throw new TransportException (\ sprintf ('The return value of the "body" option callback must be a string, "%s" returned. ' , get_debug_type ($ data )));
392392 }
393393
394394 $ buffer .= $ data ;
@@ -551,7 +551,7 @@ private function validateExtraCurlOptions(array $options): void
551551 foreach ($ options as $ opt => $ optValue ) {
552552 if (isset ($ curloptsToConfig [$ opt ])) {
553553 $ constName = $ this ->findConstantName ($ opt ) ?? $ opt ;
554- throw new InvalidArgumentException (sprintf ('Cannot set "%s" with "extra.curl", use option "%s" instead. ' , $ constName , $ curloptsToConfig [$ opt ]));
554+ throw new InvalidArgumentException (\ sprintf ('Cannot set "%s" with "extra.curl", use option "%s" instead. ' , $ constName , $ curloptsToConfig [$ opt ]));
555555 }
556556
557557 if (\in_array ($ opt , $ methodOpts )) {
@@ -560,7 +560,7 @@ private function validateExtraCurlOptions(array $options): void
560560
561561 if (\in_array ($ opt , $ curloptsToCheck )) {
562562 $ constName = $ this ->findConstantName ($ opt ) ?? $ opt ;
563- throw new InvalidArgumentException (sprintf ('Cannot set "%s" with "extra.curl". ' , $ constName ));
563+ throw new InvalidArgumentException (\ sprintf ('Cannot set "%s" with "extra.curl". ' , $ constName ));
564564 }
565565 }
566566 }
0 commit comments