@@ -194,17 +194,17 @@ private function guzzle_post_and_maybe_retry(string $uri, array $options = [], b
194194
195195 $ fd = $ this ->file ->get_content_file_handle ();
196196 try {
197- $ options [" multipart " ][] = [
198- " name " => " package " ,
199- " contents " => $ fd ,
197+ $ options [' multipart ' ][] = [
198+ ' name ' => ' package ' ,
199+ ' contents ' => $ fd ,
200200 ];
201201
202202 return $ this ->guzzle_post_and_maybe_retry ($ uri , $ options , allowretry: false );
203203 } finally {
204204 @fclose ($ fd );
205205 }
206206 } catch (GuzzleException $ e ) {
207- throw new coding_exception (" Request to QPy server failed: " . $ e ->getMessage ());
207+ throw new coding_exception (' Request to QPy server failed: ' . $ e ->getMessage ());
208208 }
209209 }
210210
@@ -226,7 +226,7 @@ public function download_static_file(string $namespace, string $shortname, strin
226226 try {
227227 $ res = $ this ->guzzle_post_and_maybe_retry (
228228 "/packages/ $ this ->hash /file/ $ namespace/ $ shortname/ $ kind/ $ path " ,
229- [" sink " => $ targetpath ]
229+ [' sink ' => $ targetpath ]
230230 );
231231 } catch (BadResponseException $ e ) {
232232 if ($ e ->getResponse ()->getStatusCode () == 404 ) {
@@ -239,11 +239,11 @@ public function download_static_file(string $namespace, string $shortname, strin
239239 );
240240 }
241241
242- if ($ res ->hasHeader (" Content-Type " )) {
243- return $ res ->getHeader (" Content-Type " )[0 ];
242+ if ($ res ->hasHeader (' Content-Type ' )) {
243+ return $ res ->getHeader (' Content-Type ' )[0 ];
244244 } else {
245- debugging (" Server did not send Content-Type header, falling back to application/octet-stream " );
246- return " application/octet-stream " ;
245+ debugging (' Server did not send Content-Type header, falling back to application/octet-stream ' );
246+ return ' application/octet-stream ' ;
247247 }
248248 }
249249
0 commit comments