<?php
 namespace GuzzleHttp\Handler; use GuzzleHttp\Promise\PromiseInterface; use GuzzleHttp\RequestOptions; use Psr\Http\Message\RequestInterface; class Proxy { public static function wrapSync(callable $default, callable $sync): callable { return static function (RequestInterface $request, array $options) use ($default, $sync): PromiseInterface { return empty($options[RequestOptions::SYNCHRONOUS]) ? $default($request, $options) : $sync($request, $options); }; } public static function wrapStreaming(callable $default, callable $streaming): callable { return static function (RequestInterface $request, array $options) use ($default, $streaming): PromiseInterface { return empty($options['stream']) ? $default($request, $options) : $streaming($request, $options); }; } } 