diff --git a/examples/custromString.php b/examples/custromString.php index a513daa..4bc0a13 100644 --- a/examples/custromString.php +++ b/examples/custromString.php @@ -3,11 +3,11 @@ declare(strict_types=1); use DawidMazurek\JsonRpc\handler\MethodCallableHandler; -use DawidMazurek\JsonRpc\io\CustomStringInput; -use DawidMazurek\JsonRpc\io\InputStream; -use DawidMazurek\JsonRpc\io\JsonSerializer; -use DawidMazurek\JsonRpc\request\JsonRpcRequestBuilder; -use DawidMazurek\JsonRpc\server\JsonRpcServer; +use DawidMazurek\JsonRpc\IO\CustomStringInput; +use DawidMazurek\JsonRpc\IO\InputStream; +use DawidMazurek\JsonRpc\IO\JsonSerializer; +use DawidMazurek\JsonRpc\Request\JsonRpcRequestBuilder; +use DawidMazurek\JsonRpc\Server\JsonRpcServer; include __DIR__ . '/../vendor/autoload.php'; $requestBuilder = new JsonRpcRequestBuilder(new JsonSerializer()); diff --git a/examples/postInput.php b/examples/postInput.php index b2d7e25..ee69e5e 100644 --- a/examples/postInput.php +++ b/examples/postInput.php @@ -3,10 +3,10 @@ declare(strict_types=1); use DawidMazurek\JsonRpc\handler\MethodCallableHandler; -use DawidMazurek\JsonRpc\io\InputStream; -use DawidMazurek\JsonRpc\io\JsonSerializer; -use DawidMazurek\JsonRpc\request\JsonRpcRequestBuilder; -use DawidMazurek\JsonRpc\server\JsonRpcServer; +use DawidMazurek\JsonRpc\IO\InputStream; +use DawidMazurek\JsonRpc\IO\JsonSerializer; +use DawidMazurek\JsonRpc\Request\JsonRpcRequestBuilder; +use DawidMazurek\JsonRpc\Server\JsonRpcServer; include __DIR__ . '/../vendor/autoload.php'; $requestBuilder = new JsonRpcRequestBuilder(new JsonSerializer()); diff --git a/src/error/JsonRpcErrorCodes.php b/src/Error/JsonRpcErrorCodes.php similarity index 86% rename from src/error/JsonRpcErrorCodes.php rename to src/Error/JsonRpcErrorCodes.php index b0bbecc..26356b5 100644 --- a/src/error/JsonRpcErrorCodes.php +++ b/src/Error/JsonRpcErrorCodes.php @@ -2,7 +2,7 @@ declare(strict_types = 1); -namespace DawidMazurek\JsonRpc\error; +namespace DawidMazurek\JsonRpc\Error; class JsonRpcErrorCodes { diff --git a/src/exception/InvalidParams.php b/src/Exception/InvalidParams.php similarity index 72% rename from src/exception/InvalidParams.php rename to src/Exception/InvalidParams.php index 6ec4e7a..69b1ac8 100644 --- a/src/exception/InvalidParams.php +++ b/src/Exception/InvalidParams.php @@ -2,9 +2,9 @@ declare(strict_types = 1); -namespace DawidMazurek\JsonRpc\exception; +namespace DawidMazurek\JsonRpc\Exception; -use DawidMazurek\JsonRpc\error\JsonRpcErrorCodes; +use DawidMazurek\JsonRpc\Error\JsonRpcErrorCodes; class InvalidParams extends JsonRpcException { diff --git a/src/exception/InvalidRequest.php b/src/Exception/InvalidRequest.php similarity index 73% rename from src/exception/InvalidRequest.php rename to src/Exception/InvalidRequest.php index 5327d6d..7127419 100644 --- a/src/exception/InvalidRequest.php +++ b/src/Exception/InvalidRequest.php @@ -2,9 +2,9 @@ declare(strict_types = 1); -namespace DawidMazurek\JsonRpc\exception; +namespace DawidMazurek\JsonRpc\Exception; -use DawidMazurek\JsonRpc\error\JsonRpcErrorCodes; +use DawidMazurek\JsonRpc\Error\JsonRpcErrorCodes; class InvalidRequest extends JsonRpcException { diff --git a/src/exception/JsonRpcException.php b/src/Exception/JsonRpcException.php similarity index 70% rename from src/exception/JsonRpcException.php rename to src/Exception/JsonRpcException.php index 5af1b0e..c8755c7 100644 --- a/src/exception/JsonRpcException.php +++ b/src/Exception/JsonRpcException.php @@ -2,7 +2,7 @@ declare(strict_types = 1); -namespace DawidMazurek\JsonRpc\exception; +namespace DawidMazurek\JsonRpc\Exception; use Exception; diff --git a/src/exception/MethodNotFound.php b/src/Exception/MethodNotFound.php similarity index 73% rename from src/exception/MethodNotFound.php rename to src/Exception/MethodNotFound.php index 05e915d..f67ea8c 100644 --- a/src/exception/MethodNotFound.php +++ b/src/Exception/MethodNotFound.php @@ -2,9 +2,9 @@ declare(strict_types = 1); -namespace DawidMazurek\JsonRpc\exception; +namespace DawidMazurek\JsonRpc\Exception; -use DawidMazurek\JsonRpc\error\JsonRpcErrorCodes; +use DawidMazurek\JsonRpc\Error\JsonRpcErrorCodes; class MethodNotFound extends JsonRpcException { diff --git a/src/exception/ParseError.php b/src/Exception/ParseError.php similarity index 72% rename from src/exception/ParseError.php rename to src/Exception/ParseError.php index 98478eb..292d7a0 100644 --- a/src/exception/ParseError.php +++ b/src/Exception/ParseError.php @@ -2,9 +2,9 @@ declare(strict_types = 1); -namespace DawidMazurek\JsonRpc\exception; +namespace DawidMazurek\JsonRpc\Exception; -use DawidMazurek\JsonRpc\error\JsonRpcErrorCodes; +use DawidMazurek\JsonRpc\Error\JsonRpcErrorCodes; class ParseError extends JsonRpcException { diff --git a/src/handler/JsonRpcRequestHandler.php b/src/Handler/JsonRpcRequestHandler.php similarity index 60% rename from src/handler/JsonRpcRequestHandler.php rename to src/Handler/JsonRpcRequestHandler.php index 5ee1f6c..1149789 100644 --- a/src/handler/JsonRpcRequestHandler.php +++ b/src/Handler/JsonRpcRequestHandler.php @@ -2,11 +2,11 @@ declare(strict_types = 1); -namespace DawidMazurek\JsonRpc\handler; +namespace DawidMazurek\JsonRpc\Handler; -use DawidMazurek\JsonRpc\exception\JsonRpcException; -use DawidMazurek\JsonRpc\request\JsonRpcRequest; -use DawidMazurek\JsonRpc\response\JsonRpcResponse; +use DawidMazurek\JsonRpc\Exception\JsonRpcException; +use DawidMazurek\JsonRpc\Request\JsonRpcRequest; +use DawidMazurek\JsonRpc\Response\JsonRpcResponse; interface JsonRpcRequestHandler { diff --git a/src/handler/MethodCallableHandler.php b/src/Handler/MethodCallableHandler.php similarity index 80% rename from src/handler/MethodCallableHandler.php rename to src/Handler/MethodCallableHandler.php index 1bbc224..d931ffb 100644 --- a/src/handler/MethodCallableHandler.php +++ b/src/Handler/MethodCallableHandler.php @@ -2,16 +2,16 @@ declare(strict_types = 1); -namespace DawidMazurek\JsonRpc\handler; +namespace DawidMazurek\JsonRpc\Handler; -use DawidMazurek\JsonRpc\exception\JsonRpcException; -use DawidMazurek\JsonRpc\exception\MethodNotFound; -use DawidMazurek\JsonRpc\request\JsonRpcRequest; -use DawidMazurek\JsonRpc\request\Request; -use DawidMazurek\JsonRpc\response\FailedResponse; -use DawidMazurek\JsonRpc\response\JsonRpcResponse; -use DawidMazurek\JsonRpc\response\NotificationResponse; -use DawidMazurek\JsonRpc\response\Response; +use DawidMazurek\JsonRpc\Exception\JsonRpcException; +use DawidMazurek\JsonRpc\Exception\MethodNotFound; +use DawidMazurek\JsonRpc\Request\JsonRpcRequest; +use DawidMazurek\JsonRpc\Request\Request; +use DawidMazurek\JsonRpc\Response\FailedResponse; +use DawidMazurek\JsonRpc\Response\JsonRpcResponse; +use DawidMazurek\JsonRpc\Response\NotificationResponse; +use DawidMazurek\JsonRpc\Response\Response; class MethodCallableHandler implements JsonRpcRequestHandler { diff --git a/src/io/CustomStringInput.php b/src/IO/CustomStringInput.php similarity index 79% rename from src/io/CustomStringInput.php rename to src/IO/CustomStringInput.php index 3f47307..e9e1028 100644 --- a/src/io/CustomStringInput.php +++ b/src/IO/CustomStringInput.php @@ -2,10 +2,10 @@ declare(strict_types = 1); -namespace DawidMazurek\JsonRpc\io; +namespace DawidMazurek\JsonRpc\IO; -use DawidMazurek\JsonRpc\request\JsonRpcRequestAggregate; -use DawidMazurek\JsonRpc\request\JsonRpcRequestBuilder; +use DawidMazurek\JsonRpc\Request\JsonRpcRequestAggregate; +use DawidMazurek\JsonRpc\Request\JsonRpcRequestBuilder; class CustomStringInput implements JsonRpcInput { diff --git a/src/io/InputStream.php b/src/IO/InputStream.php similarity index 78% rename from src/io/InputStream.php rename to src/IO/InputStream.php index 293c495..50ecc78 100644 --- a/src/io/InputStream.php +++ b/src/IO/InputStream.php @@ -2,10 +2,10 @@ declare(strict_types = 1); -namespace DawidMazurek\JsonRpc\io; +namespace DawidMazurek\JsonRpc\IO; -use DawidMazurek\JsonRpc\request\JsonRpcRequestAggregate; -use DawidMazurek\JsonRpc\request\JsonRpcRequestBuilder; +use DawidMazurek\JsonRpc\Request\JsonRpcRequestAggregate; +use DawidMazurek\JsonRpc\Request\JsonRpcRequestBuilder; class InputStream implements JsonRpcInput { diff --git a/src/io/JsonRpcInput.php b/src/IO/JsonRpcInput.php similarity index 50% rename from src/io/JsonRpcInput.php rename to src/IO/JsonRpcInput.php index 151a7b4..7392480 100644 --- a/src/io/JsonRpcInput.php +++ b/src/IO/JsonRpcInput.php @@ -1,8 +1,8 @@