public static function flushEvents(): void
    {
        $client = Hub::getCurrent()->getClient();

        if ($client instanceof Client) {
            $transportProperty = new \ReflectionProperty(Client::class, 'transport');
            $transportProperty->setAccessible(true);

            $transport = $transportProperty->getValue($client);

            if ($transport instanceof HttpTransport) {
                $closure = \Closure::bind(function () {
                    $this->cleanupPendingRequests();
                }, $transport, $transport);

                $closure();
            }
        }
    }
public static function flushEvents(): void
    {
        $client = Hub::getCurrent()->getClient();

        if ($client instanceof Client) {
            $transportProperty = new \ReflectionProperty(Client::class, 'transport');
            $transportProperty->setAccessible(true);

            $transport = $transportProperty->getValue($client);

            if ($transport instanceof HttpTransport) {
                $closure = \Closure::bind(function () {
                    $this->cleanupPendingRequests();
                }, $transport, $transport);

                $closure();
            }
        }
    }
public static function flushEvents ( ) : void { $ client = Hub :: getCurrent ( ) -> getClient ( ) ; if ( $ client instanceof Client ) { $ transportProperty = new \ ReflectionProperty ( Client :: class , 'transport' ) ; $ transportProperty -> setAccessible ( true ) ; $ transport = $ transportProperty -> getValue ( $ client ) ; if ( $ transport instanceof HttpTransport ) { $ closure = \ Closure :: bind ( function ( ) { $ this -> cleanupPendingRequests ( ) ; } , $ transport , $ transport ) ; $ closure ( ) ; } } }
Block until all async events are processed for the HTTP transport.

@internal This is not part of the public API and is here temporarily until
the underlying issue can be resolved, this method will be removed.
Block until all async events are processed for the HTTP transport .