Skip to content

Commit ec45f51

Browse files
authored
Merge pull request #16 from DawidMazurek/psr-2-namespaces
Transform namespaces to PSR-2
2 parents 886d7a3 + ef3eb20 commit ec45f51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+107
-107
lines changed

examples/custromString.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
declare(strict_types=1);
44

55
use DawidMazurek\JsonRpc\handler\MethodCallableHandler;
6-
use DawidMazurek\JsonRpc\io\CustomStringInput;
7-
use DawidMazurek\JsonRpc\io\InputStream;
8-
use DawidMazurek\JsonRpc\io\JsonSerializer;
9-
use DawidMazurek\JsonRpc\request\JsonRpcRequestBuilder;
10-
use DawidMazurek\JsonRpc\server\JsonRpcServer;
6+
use DawidMazurek\JsonRpc\IO\CustomStringInput;
7+
use DawidMazurek\JsonRpc\IO\InputStream;
8+
use DawidMazurek\JsonRpc\IO\JsonSerializer;
9+
use DawidMazurek\JsonRpc\Request\JsonRpcRequestBuilder;
10+
use DawidMazurek\JsonRpc\Server\JsonRpcServer;
1111

1212
include __DIR__ . '/../vendor/autoload.php';
1313
$requestBuilder = new JsonRpcRequestBuilder(new JsonSerializer());

examples/postInput.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
declare(strict_types=1);
44

55
use DawidMazurek\JsonRpc\handler\MethodCallableHandler;
6-
use DawidMazurek\JsonRpc\io\InputStream;
7-
use DawidMazurek\JsonRpc\io\JsonSerializer;
8-
use DawidMazurek\JsonRpc\request\JsonRpcRequestBuilder;
9-
use DawidMazurek\JsonRpc\server\JsonRpcServer;
6+
use DawidMazurek\JsonRpc\IO\InputStream;
7+
use DawidMazurek\JsonRpc\IO\JsonSerializer;
8+
use DawidMazurek\JsonRpc\Request\JsonRpcRequestBuilder;
9+
use DawidMazurek\JsonRpc\Server\JsonRpcServer;
1010

1111
include __DIR__ . '/../vendor/autoload.php';
1212
$requestBuilder = new JsonRpcRequestBuilder(new JsonSerializer());

src/error/JsonRpcErrorCodes.php renamed to src/Error/JsonRpcErrorCodes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types = 1);
44

5-
namespace DawidMazurek\JsonRpc\error;
5+
namespace DawidMazurek\JsonRpc\Error;
66

77
class JsonRpcErrorCodes
88
{

src/exception/InvalidParams.php renamed to src/Exception/InvalidParams.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types = 1);
44

5-
namespace DawidMazurek\JsonRpc\exception;
5+
namespace DawidMazurek\JsonRpc\Exception;
66

7-
use DawidMazurek\JsonRpc\error\JsonRpcErrorCodes;
7+
use DawidMazurek\JsonRpc\Error\JsonRpcErrorCodes;
88

99
class InvalidParams extends JsonRpcException
1010
{

src/exception/InvalidRequest.php renamed to src/Exception/InvalidRequest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types = 1);
44

5-
namespace DawidMazurek\JsonRpc\exception;
5+
namespace DawidMazurek\JsonRpc\Exception;
66

7-
use DawidMazurek\JsonRpc\error\JsonRpcErrorCodes;
7+
use DawidMazurek\JsonRpc\Error\JsonRpcErrorCodes;
88

99
class InvalidRequest extends JsonRpcException
1010
{

src/exception/JsonRpcException.php renamed to src/Exception/JsonRpcException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types = 1);
44

5-
namespace DawidMazurek\JsonRpc\exception;
5+
namespace DawidMazurek\JsonRpc\Exception;
66

77
use Exception;
88

src/exception/MethodNotFound.php renamed to src/Exception/MethodNotFound.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types = 1);
44

5-
namespace DawidMazurek\JsonRpc\exception;
5+
namespace DawidMazurek\JsonRpc\Exception;
66

7-
use DawidMazurek\JsonRpc\error\JsonRpcErrorCodes;
7+
use DawidMazurek\JsonRpc\Error\JsonRpcErrorCodes;
88

99
class MethodNotFound extends JsonRpcException
1010
{

src/exception/ParseError.php renamed to src/Exception/ParseError.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types = 1);
44

5-
namespace DawidMazurek\JsonRpc\exception;
5+
namespace DawidMazurek\JsonRpc\Exception;
66

7-
use DawidMazurek\JsonRpc\error\JsonRpcErrorCodes;
7+
use DawidMazurek\JsonRpc\Error\JsonRpcErrorCodes;
88

99
class ParseError extends JsonRpcException
1010
{

src/handler/JsonRpcRequestHandler.php renamed to src/Handler/JsonRpcRequestHandler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
declare(strict_types = 1);
44

5-
namespace DawidMazurek\JsonRpc\handler;
5+
namespace DawidMazurek\JsonRpc\Handler;
66

7-
use DawidMazurek\JsonRpc\exception\JsonRpcException;
8-
use DawidMazurek\JsonRpc\request\JsonRpcRequest;
9-
use DawidMazurek\JsonRpc\response\JsonRpcResponse;
7+
use DawidMazurek\JsonRpc\Exception\JsonRpcException;
8+
use DawidMazurek\JsonRpc\Request\JsonRpcRequest;
9+
use DawidMazurek\JsonRpc\Response\JsonRpcResponse;
1010

1111
interface JsonRpcRequestHandler
1212
{

src/handler/MethodCallableHandler.php renamed to src/Handler/MethodCallableHandler.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
declare(strict_types = 1);
44

5-
namespace DawidMazurek\JsonRpc\handler;
5+
namespace DawidMazurek\JsonRpc\Handler;
66

7-
use DawidMazurek\JsonRpc\exception\JsonRpcException;
8-
use DawidMazurek\JsonRpc\exception\MethodNotFound;
9-
use DawidMazurek\JsonRpc\request\JsonRpcRequest;
10-
use DawidMazurek\JsonRpc\request\Request;
11-
use DawidMazurek\JsonRpc\response\FailedResponse;
12-
use DawidMazurek\JsonRpc\response\JsonRpcResponse;
13-
use DawidMazurek\JsonRpc\response\NotificationResponse;
14-
use DawidMazurek\JsonRpc\response\Response;
7+
use DawidMazurek\JsonRpc\Exception\JsonRpcException;
8+
use DawidMazurek\JsonRpc\Exception\MethodNotFound;
9+
use DawidMazurek\JsonRpc\Request\JsonRpcRequest;
10+
use DawidMazurek\JsonRpc\Request\Request;
11+
use DawidMazurek\JsonRpc\Response\FailedResponse;
12+
use DawidMazurek\JsonRpc\Response\JsonRpcResponse;
13+
use DawidMazurek\JsonRpc\Response\NotificationResponse;
14+
use DawidMazurek\JsonRpc\Response\Response;
1515

1616
class MethodCallableHandler implements JsonRpcRequestHandler
1717
{

0 commit comments

Comments
 (0)