@@ -68,23 +68,23 @@ private function doRequest(string $method, string $url, array $options): ConsulR
6868 $ options ['body ' ] = json_encode ($ options ['body ' ], \JSON_THROW_ON_ERROR );
6969 }
7070
71- $ this ->logger ->info (sprintf ('%s "%s" ' , $ method , $ url ));
72- $ this ->logger ->debug (sprintf ('Requesting %s %s ' , $ method , $ url ), ['options ' => $ options ]);
71+ $ this ->logger ->info (\ sprintf ('%s "%s" ' , $ method , $ url ));
72+ $ this ->logger ->debug (\ sprintf ('Requesting %s %s ' , $ method , $ url ), ['options ' => $ options ]);
7373
7474 try {
7575 $ response = $ this ->client ->request ($ method , $ url , $ options );
7676 } catch (TransportExceptionInterface $ e ) {
77- $ message = sprintf ('Something went wrong when calling consul (%s). ' , $ e ->getMessage ());
77+ $ message = \ sprintf ('Something went wrong when calling consul (%s). ' , $ e ->getMessage ());
7878
7979 $ this ->logger ->error ($ message );
8080
8181 throw new ServerException ($ message );
8282 }
8383
84- $ this ->logger ->debug (sprintf ("Response: \n%s " , $ this ->formatResponse ($ response )));
84+ $ this ->logger ->debug (\ sprintf ("Response: \n%s " , $ this ->formatResponse ($ response )));
8585
8686 if (400 <= $ response ->getStatusCode ()) {
87- $ message = sprintf ('Something went wrong when calling consul (%s). ' , $ response ->getStatusCode ());
87+ $ message = \ sprintf ('Something went wrong when calling consul (%s). ' , $ response ->getStatusCode ());
8888
8989 $ this ->logger ->error ($ message );
9090
@@ -105,10 +105,10 @@ private function formatResponse(ResponseInterface $response): string
105105
106106 foreach ($ response ->getHeaders (false ) as $ key => $ values ) {
107107 foreach ($ values as $ value ) {
108- $ headers [] = sprintf ('%s: %s ' , $ key , $ value );
108+ $ headers [] = \ sprintf ('%s: %s ' , $ key , $ value );
109109 }
110110 }
111111
112- return sprintf ("%s \n\n%s " , implode ("\n" , $ headers ), $ response ->getContent (false ));
112+ return \ sprintf ("%s \n\n%s " , implode ("\n" , $ headers ), $ response ->getContent (false ));
113113 }
114114}
0 commit comments