From 54fbd31ce220c5803f87d1370d8cd118765e4b66 Mon Sep 17 00:00:00 2001 From: Stephen Hoogendijk Date: Tue, 23 Jun 2015 09:19:24 +0200 Subject: [PATCH] Changed namespace to \\InfluxDB --- README.md | 2 +- composer.json | 4 ++-- composer.lock | 2 +- src/{Leaseweb => }/InfluxDB/Client.php | 6 +++--- src/InfluxDB/Client/Exception.php | 13 +++++++++++++ src/{Leaseweb => }/InfluxDB/Database.php | 10 +++++----- src/InfluxDB/Database/Exception.php | 12 ++++++++++++ .../InfluxDB/Database/RetentionPolicy.php | 4 ++-- src/{Leaseweb => }/InfluxDB/Exception.php | 2 +- src/{Leaseweb => }/InfluxDB/Point.php | 4 ++-- src/{Leaseweb => }/InfluxDB/Query/Builder.php | 8 ++++---- src/InfluxDB/Query/Exception.php | 12 ++++++++++++ src/{Leaseweb => }/InfluxDB/ResultSet.php | 6 +++--- src/Leaseweb/InfluxDB/Client/Exception.php | 13 ------------- src/Leaseweb/InfluxDB/Database/Exception.php | 12 ------------ src/Leaseweb/InfluxDB/Query/Exception.php | 12 ------------ tests/unit/ClientTest.php | 4 ++-- tests/unit/DatabaseTest.php | 10 +++++----- tests/unit/PointTest.php | 4 ++-- tests/unit/ResultSetTest.php | 8 ++++---- 20 files changed, 74 insertions(+), 74 deletions(-) rename src/{Leaseweb => }/InfluxDB/Client.php (98%) create mode 100644 src/InfluxDB/Client/Exception.php rename src/{Leaseweb => }/InfluxDB/Database.php (94%) create mode 100644 src/InfluxDB/Database/Exception.php rename src/{Leaseweb => }/InfluxDB/Database/RetentionPolicy.php (91%) rename src/{Leaseweb => }/InfluxDB/Exception.php (78%) rename src/{Leaseweb => }/InfluxDB/Point.php (96%) rename src/{Leaseweb => }/InfluxDB/Query/Builder.php (97%) create mode 100644 src/InfluxDB/Query/Exception.php rename src/{Leaseweb => }/InfluxDB/ResultSet.php (95%) delete mode 100644 src/Leaseweb/InfluxDB/Client/Exception.php delete mode 100644 src/Leaseweb/InfluxDB/Database/Exception.php delete mode 100644 src/Leaseweb/InfluxDB/Query/Exception.php diff --git a/README.md b/README.md index 600553ba6..9cea2d410 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Initialize a new client object: ```php -$client = new Leaseweb\InfluxDB\Client($host, $port); +$client = new InfluxDB\Client($host, $port); ``` diff --git a/composer.json b/composer.json index 5308120ac..b969c7b3d 100644 --- a/composer.json +++ b/composer.json @@ -22,12 +22,12 @@ }, "autoload": { "psr-4" : { - "Leaseweb\\InfluxDB\\": "src/Leaseweb/InfluxDB" + "InfluxDB\\": "src/InfluxDB" } }, "autoload-dev": { "psr-4": { - "Leaseweb\\InfluxDB\\Test\\": "tests" + "InfluxDB\\Test\\": "tests" } } } diff --git a/composer.lock b/composer.lock index 0613c1ffe..3040b508d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "d4cd96b7a6d552bb16ed5847dd32d4e3", + "hash": "ef84333e4b0fdb96255d8f56a4d42e3b", "packages": [ { "name": "guzzlehttp/guzzle", diff --git a/src/Leaseweb/InfluxDB/Client.php b/src/InfluxDB/Client.php similarity index 98% rename from src/Leaseweb/InfluxDB/Client.php rename to src/InfluxDB/Client.php index 49d0df05f..9540a2a84 100644 --- a/src/Leaseweb/InfluxDB/Client.php +++ b/src/InfluxDB/Client.php @@ -3,16 +3,16 @@ * @author Stephen "TheCodeAssassin" Hoogendijk */ -namespace Leaseweb\InfluxDB; +namespace InfluxDB; use GuzzleHttp\Client as httpClient; -use Leaseweb\InfluxDB\Client\Exception as ClientException; +use InfluxDB\Client\Exception as ClientException; /** * Class Client * - * @package Leaseweb\InfluxDB + * @package InfluxDB */ class Client { diff --git a/src/InfluxDB/Client/Exception.php b/src/InfluxDB/Client/Exception.php new file mode 100644 index 000000000..1b446a2ac --- /dev/null +++ b/src/InfluxDB/Client/Exception.php @@ -0,0 +1,13 @@ + */ -namespace Leaseweb\InfluxDB\Query; +namespace InfluxDB\Query; -use Leaseweb\InfluxDB\Database; -use Leaseweb\InfluxDB\ResultSet; +use InfluxDB\Database; +use InfluxDB\ResultSet; /** * Class Builder @@ -20,7 +20,7 @@ use Leaseweb\InfluxDB\ResultSet; * * $series->select('*')->from('*')->getResult(); * - * @package Leaseweb\InfluxDB\Query + * @package InfluxDB\Query */ class Builder { diff --git a/src/InfluxDB/Query/Exception.php b/src/InfluxDB/Query/Exception.php new file mode 100644 index 000000000..4571efb74 --- /dev/null +++ b/src/InfluxDB/Query/Exception.php @@ -0,0 +1,12 @@ +mockClient = $this->getMockBuilder('\Leaseweb\InfluxDB\Client') + $this->mockClient = $this->getMockBuilder('\InfluxDB\Client') ->disableOriginalConstructor() ->getMock(); diff --git a/tests/unit/PointTest.php b/tests/unit/PointTest.php index ea693cf76..d57713b37 100644 --- a/tests/unit/PointTest.php +++ b/tests/unit/PointTest.php @@ -6,10 +6,10 @@ * Time: 17:39 */ -namespace Leaseweb\InfluxDB\Test; +namespace InfluxDB\Test; -use Leaseweb\InfluxDB\Point; +use InfluxDB\Point; class PointTest extends \PHPUnit_Framework_TestCase { diff --git a/tests/unit/ResultSetTest.php b/tests/unit/ResultSetTest.php index a85c74f9d..4c04bf1e9 100644 --- a/tests/unit/ResultSetTest.php +++ b/tests/unit/ResultSetTest.php @@ -1,7 +1,7 @@