Skip to content

Commit

Permalink
Updated namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
s12v committed May 2, 2015
1 parent c7aad59 commit 6b2c40d
Show file tree
Hide file tree
Showing 19 changed files with 43 additions and 43 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ composer require s12v/phpque
```php
<?php

use S12v\Phpque\Client;
use S12v\Phpque\Connection\ConnectionException;
use Phpque\Client;
use Phpque\Connection\ConnectionException;

require '../vendor/autoload.php';

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"autoload": {
"psr-4": {
"S12v\\Phpque\\": "src"
"Phpque\\": "src"
}
}
}
4 changes: 2 additions & 2 deletions example/job.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

use S12v\Phpque\Client;
use S12v\Phpque\Connection\ConnectionException;
use Phpque\Client;
use Phpque\Connection\ConnectionException;

require '../vendor/autoload.php';

Expand Down
26 changes: 13 additions & 13 deletions src/Client.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?php

namespace S12v\Phpque;

use S12v\Phpque\Connection\ConnectionException;
use S12v\Phpque\Connection\Connector;
use S12v\Phpque\Connection\DsnException;
use S12v\Phpque\Connection\TransportException;
use S12v\Phpque\Dto\Job;
use S12v\Phpque\Exception\InvalidArgumentException;
use S12v\Phpque\Exception\RuntimeException;
use S12v\Phpque\Mapper\JobMapper;
use S12v\Phpque\Resp\ResponseException;
use S12v\Phpque\Resp\ResponseReader;
use S12v\Phpque\Resp\Serializer;
namespace Phpque;

use Phpque\Connection\ConnectionException;
use Phpque\Connection\Connector;
use Phpque\Connection\DsnException;
use Phpque\Connection\TransportException;
use Phpque\Dto\Job;
use Phpque\Exception\InvalidArgumentException;
use Phpque\Exception\RuntimeException;
use Phpque\Mapper\JobMapper;
use Phpque\Resp\ResponseException;
use Phpque\Resp\ResponseReader;
use Phpque\Resp\Serializer;

class Client implements ClientInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/ClientInterface.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace S12v\Phpque;
namespace Phpque;

use S12v\Phpque\Dto\Job;
use S12v\Phpque\Exception\RuntimeException;
use Phpque\Dto\Job;
use Phpque\Exception\RuntimeException;

interface ClientInterface {

Expand Down
4 changes: 2 additions & 2 deletions src/Connection/ConnectionException.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace S12v\Phpque\Connection;
namespace Phpque\Connection;

use S12v\Phpque\Exception\RuntimeException;
use Phpque\Exception\RuntimeException;

class ConnectionException extends RuntimeException {
}
2 changes: 1 addition & 1 deletion src/Connection/Connector.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace S12v\Phpque\Connection;
namespace Phpque\Connection;

class Connector {

Expand Down
4 changes: 2 additions & 2 deletions src/Connection/DsnException.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace S12v\Phpque\Connection;
namespace Phpque\Connection;

use S12v\Phpque\Exception\InvalidArgumentException;
use Phpque\Exception\InvalidArgumentException;

class DsnException extends InvalidArgumentException {
}
4 changes: 2 additions & 2 deletions src/Connection/TransportException.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace S12v\Phpque\Connection;
namespace Phpque\Connection;

use S12v\Phpque\Exception\RuntimeException;
use Phpque\Exception\RuntimeException;

class TransportException extends RuntimeException {
}
2 changes: 1 addition & 1 deletion src/Dto/Job.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace S12v\Phpque\Dto;
namespace Phpque\Dto;

class Job {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace S12v\Phpque\Exception;
namespace Phpque\Exception;

class InvalidArgumentException extends \InvalidArgumentException {
}
2 changes: 1 addition & 1 deletion src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace S12v\Phpque\Exception;
namespace Phpque\Exception;

class RuntimeException extends \RuntimeException {
}
4 changes: 2 additions & 2 deletions src/Mapper/JobMapper.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace S12v\Phpque\Mapper;
namespace Phpque\Mapper;

use S12v\Phpque\Dto\Job;
use Phpque\Dto\Job;

class JobMapper {

Expand Down
4 changes: 2 additions & 2 deletions src/Resp/ResponseException.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace S12v\Phpque\Resp;
namespace Phpque\Resp;

use S12v\Phpque\Exception\RuntimeException;
use Phpque\Exception\RuntimeException;

class ResponseException extends RuntimeException {
}
2 changes: 1 addition & 1 deletion src/Resp/ResponseReader.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace S12v\Phpque\Resp;
namespace Phpque\Resp;

class ResponseReader {

Expand Down
2 changes: 1 addition & 1 deletion src/Resp/Serializer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace S12v\Phpque\Resp;
namespace Phpque\Resp;

class Serializer {

Expand Down
8 changes: 4 additions & 4 deletions tests/IntegrationTests/IntegrationTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use S12v\Phpque\Client;
use Phpque\Client;

class IntegrationTest extends \PHPUnit_Framework_TestCase {

Expand All @@ -21,7 +21,7 @@ public function setUp()
}

/**
* @expectedException S12v\Phpque\Connection\DsnException
* @expectedException Phpque\Connection\DsnException
* @expectedExceptionMessage Invalid url "aaa"
*/
public function testConnectToInvalidDsn()
Expand All @@ -31,7 +31,7 @@ public function testConnectToInvalidDsn()
}

/**
* @expectedException S12v\Phpque\Connection\ConnectionException
* @expectedException Phpque\Connection\ConnectionException
* @expectedExceptionMessage No servers available
*/
public function testConnectToInvalidServer()
Expand Down Expand Up @@ -70,7 +70,7 @@ public function testJob()
}

/**
* @expectedException S12v\Phpque\Resp\ResponseException
* @expectedException Phpque\Resp\ResponseException
* @expectedExceptionMessage BADID Invalid Job ID format.
*/
public function testInvalidJobIdFormat()
Expand Down
2 changes: 1 addition & 1 deletion tests/UnitTests/ResponseReaderTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use S12v\Phpque\Resp\ResponseReader;
use Phpque\Resp\ResponseReader;

class DeserializerTest extends \PHPUnit_Framework_TestCase {

Expand Down
2 changes: 1 addition & 1 deletion tests/UnitTests/SerializerTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use S12v\Phpque\Resp\Serializer;
use Phpque\Resp\Serializer;

class SerializerTest extends \PHPUnit_Framework_TestCase {

Expand Down

0 comments on commit 6b2c40d

Please sign in to comment.