1
0
mirror of https://github.com/ovh/php-ovh.git synced 2023-11-05 03:20:26 +01:00

Fix timeout and guzzle 6

Fix copyrights

Signed-off-by: Vincent Casse <vincent.casse@corp.ovh.com>
This commit is contained in:
Vincent Casse 2015-12-17 18:14:11 +01:00
parent cdd9a916f8
commit 9aa7df73bf
7 changed files with 10 additions and 23 deletions

View File

@ -5,11 +5,6 @@
"require": {
"guzzlehttp/guzzle": "^6.0"
},
"authors": [
{
"name": "Vincent Cassé"
}
],
"autoload": {
"psr-4": {"Ovh\\": "src/"}
},

View File

@ -1,5 +1,5 @@
<?php
# Copyright (c) 2013-2014, OVH SAS.
# Copyright (c) 2013-2016, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -44,8 +44,6 @@ use GuzzleHttp\Psr7\Response;
*
* @package Ovh
* @category Ovh
* @author Vincent Cassé <vincent.casse@ovh.net>
* @author Thierry Goettelmann <thierry@byscripts.info>
*/
class Api
{
@ -144,9 +142,10 @@ class Api
}
if (!isset($http_client)) {
$http_client = new Client();
$http_client->setDefaultOption('timeout', 30);
$http_client->setDefaultOption('connect_timeout', 5);
$http_client = new Client([
'timeout' => 30,
'connect_timeout' => 5,
]);
}
$this->application_key = $application_key;

View File

@ -1,5 +1,5 @@
<?php
# Copyright (c) 2013-2014, OVH SAS.
# Copyright (c) 2013-2016, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -40,7 +40,6 @@ use Exception;
*
* @package Ovh
* @category Exceptions
* @author Vincent Cassé <vincent.casse@ovh.net>
*/
class ApiException extends Exception
{

View File

@ -1,5 +1,5 @@
<?php
# Copyright (c) 2013-2014, OVH SAS.
# Copyright (c) 2013-2016, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -40,7 +40,6 @@ use Exception;
*
* @package Ovh
* @category Exceptions
* @author Vincent Cassé <vincent.casse@ovh.net>
*/
class InvalidParameterException extends Exception
{

View File

@ -1,5 +1,5 @@
<?php
# Copyright (c) 2013-2014, OVH SAS.
# Copyright (c) 2013-2016, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -39,7 +39,6 @@ use Exception;
*
* @package Ovh
* @category Exceptions
* @author Vincent Cassé <vincent.casse@ovh.net>
*/
class NotLoggedException extends Exception
{

View File

@ -1,5 +1,5 @@
<?php
# Copyright (c) 2013-2014, OVH SAS.
# Copyright (c) 2013-2016, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -35,8 +35,6 @@ use Ovh\Api;
*
* @package Ovh
* @category Ovh
* @author Vincent Cassé <vincent.casse@ovh.net>
* @author Thierry Goettelmann <thierry@byscripts.info>
*/
class ApiFunctionalTest extends \PHPUnit_Framework_TestCase
{

View File

@ -1,5 +1,5 @@
<?php
# Copyright (c) 2013-2014, OVH SAS.
# Copyright (c) 2013-2016, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@ -37,8 +37,6 @@ use Ovh\Api;
*
* @package Ovh
* @category Ovh
* @author Vincent Cassé <vincent.casse@ovh.net>
* @author Thierry Goettelmann <thierry@byscripts.info>
*/
class ApiTest extends \PHPUnit_Framework_TestCase
{