if ($handler instanceof DropboxHttpClientInterface) {
28
52
return $handler;
29
}
30
31
//Handler is a custom configured Guzzle Client
32
52
if ($handler instanceof Guzzle) {
33
52
return new DropboxGuzzleHttpClient($handler);
34
}
35
36
//Invalid handler
37
throw new InvalidArgumentException('The http client handler must be an instance of GuzzleHttp\Client or an instance of Dropbox\Http\Clients\DropboxHttpClientInterface.');