Skip to content

Commit

Permalink
increase timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalkaoz committed Sep 3, 2015
1 parent 80b23b3 commit 1ee0c62
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 17 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
}
Expand Down
6 changes: 4 additions & 2 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand All @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Http/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ interface HttpClient
* @param array $params
*
* @throws CommunicationException
* @return array
*
* @return array
*/
public function request($method, $url, array $params = []);
}
2 changes: 1 addition & 1 deletion src/Http/IvoryHttpAdapterClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(HttpAdapterInterface $adapter, $url)
}

/**
* @inheritdoc
* {@inheritdoc}
*/
public function request($method, $url, array $params = [])
{
Expand Down
10 changes: 5 additions & 5 deletions src/Http/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,31 @@ public function __construct(array $result, $key, HttpClient $client, $method, $u
}

/**
* @inheritdoc
* {@inheritdoc}
*/
public function current()
{
return $this->result[$this->offset];
}

/**
* @inheritdoc
* {@inheritdoc}
*/
public function next()
{
++$this->offset;
}

/**
* @inheritdoc
* {@inheritdoc}
*/
public function key()
{
return $this->offset;
}

/**
* @inheritdoc
* {@inheritdoc}
*/
public function valid()
{
Expand All @@ -87,7 +87,7 @@ public function valid()
}

/**
* @inheritdoc
* {@inheritdoc}
*/
public function rewind()
{
Expand Down

0 comments on commit 1ee0c62

Please sign in to comment.