Changed namespace to \\InfluxDB

This commit is contained in:
Stephen Hoogendijk
2015-06-23 09:19:24 +02:00
parent 0091131d6b
commit 54fbd31ce2
20 changed files with 74 additions and 74 deletions

View File

@@ -12,7 +12,7 @@ Initialize a new client object:
```php
$client = new Leaseweb\InfluxDB\Client($host, $port);
$client = new InfluxDB\Client($host, $port);
```

View File

@@ -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"
}
}
}

2
composer.lock generated
View File

@@ -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",

View File

@@ -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
{

View File

@@ -0,0 +1,13 @@
<?php
namespace InfluxDB\Client;
/**
* Class Exception
*
* @package InfluxDB\Client
*/
class Exception extends \InfluxDB\Exception
{
}

View File

@@ -3,18 +3,18 @@
* @author Stephen "TheCodeAssassin" Hoogendijk
*/
namespace Leaseweb\InfluxDB;
namespace InfluxDB;
use Leaseweb\InfluxDB\Database\RetentionPolicy;
use Leaseweb\InfluxDB\Query\Builder as QueryBuilder;
use Leaseweb\InfluxDB\Database\Exception as DatabaseException;
use InfluxDB\Database\RetentionPolicy;
use InfluxDB\Query\Builder as QueryBuilder;
use InfluxDB\Database\Exception as DatabaseException;
/**
* Class Database
*
* @todo admin functionality
*
* @package Leaseweb\InfluxDB
* @package InfluxDB
*/
class Database
{

View File

@@ -0,0 +1,12 @@
<?php
/**
* @author Stephen "TheCodeAssassin" Hoogendijk
*/
namespace InfluxDB\Database;
class Exception extends \InfluxDB\Exception
{
}

View File

@@ -3,12 +3,12 @@
* @author Stephen "TheCodeAssassin" Hoogendijk
*/
namespace Leaseweb\InfluxDB\Database;
namespace InfluxDB\Database;
/**
* Class RetentionPolicy
*
* @package Leaseweb\InfluxDB\Database
* @package InfluxDB\Database
*/
class RetentionPolicy
{

View File

@@ -3,7 +3,7 @@
* @author Stephen "TheCodeAssassin" Hoogendijk
*/
namespace Leaseweb\InfluxDB;
namespace InfluxDB;
class Exception extends \Exception

View File

@@ -1,11 +1,11 @@
<?php
namespace Leaseweb\InfluxDB;
namespace InfluxDB;
/**
* Class Point
*
* @package Leaseweb\InfluxDB
* @package InfluxDB
*/
class Point
{

View File

@@ -3,10 +3,10 @@
* @author Stephen "TheCodeAssassin" Hoogendijk <s.hoogendijk@tech.leaseweb.com>
*/
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
{

View File

@@ -0,0 +1,12 @@
<?php
/**
* @author Stephen "TheCodeAssassin" Hoogendijk
*/
namespace InfluxDB\Query;
class Exception extends \InfluxDB\Exception
{
}

View File

@@ -3,14 +3,14 @@
* @author Stephen "TheCodeAssassin" Hoogendijk
*/
namespace Leaseweb\InfluxDB;
namespace InfluxDB;
use Leaseweb\InfluxDB\Client\Exception as ClientException;
use InfluxDB\Client\Exception as ClientException;
/**
* Class ResultSet
*
* @package Leaseweb\InfluxDB
* @package InfluxDB
*/
class ResultSet
{

View File

@@ -1,13 +0,0 @@
<?php
namespace Leaseweb\InfluxDB\Client;
/**
* Class Exception
*
* @package Leaseweb\InfluxDB\Client
*/
class Exception extends \Leaseweb\InfluxDB\Exception
{
}

View File

@@ -1,12 +0,0 @@
<?php
/**
* @author Stephen "TheCodeAssassin" Hoogendijk
*/
namespace Leaseweb\InfluxDB\Database;
class Exception extends \Leaseweb\InfluxDB\Exception
{
}

View File

@@ -1,12 +0,0 @@
<?php
/**
* @author Stephen "TheCodeAssassin" Hoogendijk
*/
namespace Leaseweb\InfluxDB\Query;
class Exception extends \Leaseweb\InfluxDB\Exception
{
}

View File

@@ -1,8 +1,8 @@
<?php
namespace Leaseweb\InfluxDB\Test;
namespace InfluxDB\Test;
use Leaseweb\InfluxDB\Client;
use InfluxDB\Client;
class ClientTest extends \PHPUnit_Framework_TestCase
{

View File

@@ -1,11 +1,11 @@
<?php
namespace Leaseweb\InfluxDB\Test;
namespace InfluxDB\Test;
use Leaseweb\InfluxDB\Client;
use Leaseweb\InfluxDB\Database;
use Leaseweb\InfluxDB\Point;
use InfluxDB\Client;
use InfluxDB\Database;
use InfluxDB\Point;
class DatabaseTest extends \PHPUnit_Framework_TestCase
{
@@ -20,7 +20,7 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
public function setUp()
{
$this->mockClient = $this->getMockBuilder('\Leaseweb\InfluxDB\Client')
$this->mockClient = $this->getMockBuilder('\InfluxDB\Client')
->disableOriginalConstructor()
->getMock();

View File

@@ -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
{

View File

@@ -1,7 +1,7 @@
<?php
namespace Leaseweb\InfluxDB\Test;
namespace InfluxDB\Test;
use Leaseweb\InfluxDB\ResultSet;
use InfluxDB\ResultSet;
class ResultSetTest extends \PHPUnit_Framework_TestCase
{
@@ -26,7 +26,7 @@ class ResultSetTest extends \PHPUnit_Framework_TestCase
/**
* Throws Exception if something went wrong with influxDB
* @expectedException \Leaseweb\InfluxDB\Exception
* @expectedException \InfluxDB\Exception
*/
public function testThrowsInfluxDBException()
{
@@ -42,7 +42,7 @@ EOD;
/**
* Throws Exception if something went wrong with influxDB after processing the query
* @expectedException \Leaseweb\InfluxDB\Exception
* @expectedException \InfluxDB\Exception
*/
public function testThrowsInfluxDBExceptionIfAnyErrorInSeries()
{