diff --git a/.travis.yml b/.travis.yml index 5f2e458..1728b16 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,12 +9,13 @@ php: - 5.4 - 5.5 - 5.6 - - 7.0 + - 7 - hhvm matrix: allow_failures: - php: 7.0 #phpspec cant handle 7.0 yet + #phpspec cant handle 7.0 yet + php: 7 before_script: - composer self-update diff --git a/composer.json b/composer.json index ab06bdf..13098ff 100644 --- a/composer.json +++ b/composer.json @@ -21,12 +21,6 @@ "bossa/phpspec2-expect": "~1" }, - "suggest": { - "guzzlehttp/guzzle": "for using guzzle for http", - "kriswallsmith/buzz": "for using buzz for http", - "zendframework/zend-http": "for using zend for http" - }, - "autoload" : { "psr-4" : {"Rs\\VersionEye\\" : "src"} } diff --git a/src/Client.php b/src/Client.php index 46b4beb..1da33a1 100644 --- a/src/Client.php +++ b/src/Client.php @@ -41,8 +41,8 @@ public function __construct(HttpClient $client = null, $url = 'https://www.versi * @param string $name * * @throws \InvalidArgumentException - * @return Api * + * @return Api */ public function api($name) { @@ -86,8 +86,8 @@ private function initializeClient($url, HttpClient $client = null) * @param string $url * * @throws \Ivory\HttpAdapter\HttpAdapterException - * @return IvoryHttpAdapterClient * + * @return IvoryHttpAdapterClient */ private function createDefaultHttpClient($url) { @@ -97,6 +97,8 @@ private function createDefaultHttpClient($url) $eventDispatcher->addSubscriber(new StatusCodeSubscriber()); $adapter = new EventDispatcherHttpAdapter(HttpAdapterFactory::guess(), $eventDispatcher); + $adapter->getConfiguration()->setTimeout(30); + $adapter->getConfiguration()->setUserAgent('versioneye-php'); return new IvoryHttpAdapterClient($adapter, $url); } diff --git a/src/Http/HttpClient.php b/src/Http/HttpClient.php index 29e6754..0eb12de 100644 --- a/src/Http/HttpClient.php +++ b/src/Http/HttpClient.php @@ -17,8 +17,8 @@ interface HttpClient * @param array $params * * @throws CommunicationException - * @return array * + * @return array */ public function request($method, $url, array $params = []); } diff --git a/src/Http/IvoryHttpAdapterClient.php b/src/Http/IvoryHttpAdapterClient.php index 45599b0..d5b207e 100644 --- a/src/Http/IvoryHttpAdapterClient.php +++ b/src/Http/IvoryHttpAdapterClient.php @@ -30,7 +30,7 @@ public function __construct(HttpAdapterInterface $adapter, $url) } /** - * @inheritdoc + * {@inheritdoc} */ public function request($method, $url, array $params = []) { diff --git a/src/Http/Pager.php b/src/Http/Pager.php index cd1ace7..7bac261 100644 --- a/src/Http/Pager.php +++ b/src/Http/Pager.php @@ -45,7 +45,7 @@ public function __construct(array $result, $key, HttpClient $client, $method, $u } /** - * @inheritdoc + * {@inheritdoc} */ public function current() { @@ -53,7 +53,7 @@ public function current() } /** - * @inheritdoc + * {@inheritdoc} */ public function next() { @@ -61,7 +61,7 @@ public function next() } /** - * @inheritdoc + * {@inheritdoc} */ public function key() { @@ -69,7 +69,7 @@ public function key() } /** - * @inheritdoc + * {@inheritdoc} */ public function valid() { @@ -87,7 +87,7 @@ public function valid() } /** - * @inheritdoc + * {@inheritdoc} */ public function rewind() {