/** * @return Client */ public static function getHttpClient() { if (self::$httpClient) { return self::$httpClient; } $client = new Client(['timeout' => self::$defaultTimeout]); return self::$httpClient = $client; }
/** * @return HttpClient */ public static function getHttpClient() { if (self::$httpClient) { return self::$httpClient; } $client = new HttpClient(); $client->setDefaultOption('timeout', self::$defaultTimeout); return self::$httpClient = $client; }