From ff23496ce4d89aeede85157f9d04ff6a9e45a7f9 Mon Sep 17 00:00:00 2001 From: doubaokun Date: Sun, 10 Dec 2023 18:56:25 +0000 Subject: [PATCH] Merge branch master of github.com:openswoole/openswoole into master --- src/BaseStub.php | 1 + src/Client.php | 9 +-------- src/ClientFactory.php | 1 + src/ClientInterface.php | 1 + src/ClientPool.php | 1 + src/Constant.php | 1 + src/Context.php | 1 + src/ContextInterface.php | 1 + src/Exception/ClientException.php | 5 ++--- src/Exception/GRPCException.php | 1 + src/Exception/InvokeException.php | 1 + src/Exception/NotFoundException.php | 1 + src/Exception/ServiceException.php | 1 + src/Exception/UnimplementedException.php | 1 + src/Message.php | 1 + src/MessageInterface.php | 5 ++--- src/Middleware/LoggingMiddleware.php | 1 + src/Middleware/MiddlewareInterface.php | 5 ++--- src/Middleware/ServiceHandler.php | 1 + src/Middleware/StackHandler.php | 1 + src/Middleware/TraceMiddleware.php | 1 + src/Request.php | 1 + src/RequestHandlerInterface.php | 5 ++--- src/Response.php | 1 + src/Server.php | 1 + src/ServiceContainer.php | 1 + src/ServiceInterface.php | 5 ++--- src/Status.php | 1 + 28 files changed, 33 insertions(+), 23 deletions(-) diff --git a/src/BaseStub.php b/src/BaseStub.php index ba4ed4c..d0a7eec 100644 --- a/src/BaseStub.php +++ b/src/BaseStub.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; use OpenSwoole\GRPC\Exception\GRPCException; diff --git a/src/Client.php b/src/Client.php index 77d22db..68b93af 100644 --- a/src/Client.php +++ b/src/Client.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; use OpenSwoole\Coroutine; @@ -92,9 +93,6 @@ public function close() /** * Send message to remote endpoint, either end the stream or not depending on $mode of the client - * @param mixed $method - * @param mixed $message - * @param mixed $type */ public function send($method, $message, $type = 'proto') { @@ -116,8 +114,6 @@ public function send($method, $message, $type = 'proto') /** * Receive the data from a stream in the established connection based on streamId. - * @param mixed $streamId - * @param mixed $timeout */ public function recv($streamId, $timeout = -1) { @@ -126,9 +122,6 @@ public function recv($streamId, $timeout = -1) /** * Push message to the remote endpoint, used in client side streaming mode. - * @param mixed $streamId - * @param mixed $message - * @param mixed $type * @param bool $end */ public function push($streamId, $message, $type = 'proto', $end = false) diff --git a/src/ClientFactory.php b/src/ClientFactory.php index 23e492c..e0672fa 100644 --- a/src/ClientFactory.php +++ b/src/ClientFactory.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; final class ClientFactory diff --git a/src/ClientInterface.php b/src/ClientInterface.php index 3f65075..a1d682a 100644 --- a/src/ClientInterface.php +++ b/src/ClientInterface.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; interface ClientInterface diff --git a/src/ClientPool.php b/src/ClientPool.php index 15fc789..ccca639 100644 --- a/src/ClientPool.php +++ b/src/ClientPool.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; use co; diff --git a/src/Constant.php b/src/Constant.php index 96aee5b..13519e0 100644 --- a/src/Constant.php +++ b/src/Constant.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; final class Constant diff --git a/src/Context.php b/src/Context.php index e303735..34e6c34 100644 --- a/src/Context.php +++ b/src/Context.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; use ArrayAccess; diff --git a/src/ContextInterface.php b/src/ContextInterface.php index 0286ba1..58f7c22 100644 --- a/src/ContextInterface.php +++ b/src/ContextInterface.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; interface ContextInterface diff --git a/src/Exception/ClientException.php b/src/Exception/ClientException.php index f9a7feb..7378098 100644 --- a/src/Exception/ClientException.php +++ b/src/Exception/ClientException.php @@ -6,8 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC\Exception; -class ClientException extends GRPCException -{ -} +class ClientException extends GRPCException {} diff --git a/src/Exception/GRPCException.php b/src/Exception/GRPCException.php index 8a6a62d..746e764 100644 --- a/src/Exception/GRPCException.php +++ b/src/Exception/GRPCException.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC\Exception; use OpenSwoole\GRPC\Status; diff --git a/src/Exception/InvokeException.php b/src/Exception/InvokeException.php index da2c545..8a6050f 100644 --- a/src/Exception/InvokeException.php +++ b/src/Exception/InvokeException.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC\Exception; use OpenSwoole\GRPC\Status; diff --git a/src/Exception/NotFoundException.php b/src/Exception/NotFoundException.php index 24c3bea..52e6569 100644 --- a/src/Exception/NotFoundException.php +++ b/src/Exception/NotFoundException.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC\Exception; use OpenSwoole\GRPC\Status; diff --git a/src/Exception/ServiceException.php b/src/Exception/ServiceException.php index d3979e5..dc4443c 100644 --- a/src/Exception/ServiceException.php +++ b/src/Exception/ServiceException.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC\Exception; use OpenSwoole\GRPC\Status; diff --git a/src/Exception/UnimplementedException.php b/src/Exception/UnimplementedException.php index 38df000..a886e91 100644 --- a/src/Exception/UnimplementedException.php +++ b/src/Exception/UnimplementedException.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC\Exception; use OpenSwoole\GRPC\Status; diff --git a/src/Message.php b/src/Message.php index a579603..d750bbb 100644 --- a/src/Message.php +++ b/src/Message.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; final class Message implements MessageInterface diff --git a/src/MessageInterface.php b/src/MessageInterface.php index 892b461..d7cde01 100644 --- a/src/MessageInterface.php +++ b/src/MessageInterface.php @@ -6,8 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; -interface MessageInterface -{ -} +interface MessageInterface {} diff --git a/src/Middleware/LoggingMiddleware.php b/src/Middleware/LoggingMiddleware.php index 6cbb6b4..1942a82 100644 --- a/src/Middleware/LoggingMiddleware.php +++ b/src/Middleware/LoggingMiddleware.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC\Middleware; use OpenSwoole\Constant; diff --git a/src/Middleware/MiddlewareInterface.php b/src/Middleware/MiddlewareInterface.php index e51d211..ad44536 100644 --- a/src/Middleware/MiddlewareInterface.php +++ b/src/Middleware/MiddlewareInterface.php @@ -6,8 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC\Middleware; -interface MiddlewareInterface -{ -} +interface MiddlewareInterface {} diff --git a/src/Middleware/ServiceHandler.php b/src/Middleware/ServiceHandler.php index 734bf0c..e118d15 100644 --- a/src/Middleware/ServiceHandler.php +++ b/src/Middleware/ServiceHandler.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC\Middleware; use OpenSwoole\GRPC\Constant; diff --git a/src/Middleware/StackHandler.php b/src/Middleware/StackHandler.php index 16fcda5..a1d6f9e 100644 --- a/src/Middleware/StackHandler.php +++ b/src/Middleware/StackHandler.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC\Middleware; use OpenSwoole\GRPC\MessageInterface; diff --git a/src/Middleware/TraceMiddleware.php b/src/Middleware/TraceMiddleware.php index eeddc21..d940ce0 100644 --- a/src/Middleware/TraceMiddleware.php +++ b/src/Middleware/TraceMiddleware.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC\Middleware; use OpenSwoole\GRPC\MessageInterface; diff --git a/src/Request.php b/src/Request.php index 5b4936e..f6be5f1 100644 --- a/src/Request.php +++ b/src/Request.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; final class Request implements MessageInterface diff --git a/src/RequestHandlerInterface.php b/src/RequestHandlerInterface.php index afe9376..9277370 100644 --- a/src/RequestHandlerInterface.php +++ b/src/RequestHandlerInterface.php @@ -6,8 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; -interface RequestHandlerInterface -{ -} +interface RequestHandlerInterface {} diff --git a/src/Response.php b/src/Response.php index 96c9204..b956096 100644 --- a/src/Response.php +++ b/src/Response.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; final class Response implements MessageInterface diff --git a/src/Server.php b/src/Server.php index f27046f..5e8aadf 100644 --- a/src/Server.php +++ b/src/Server.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; use Closure; diff --git a/src/ServiceContainer.php b/src/ServiceContainer.php index c110115..122b239 100644 --- a/src/ServiceContainer.php +++ b/src/ServiceContainer.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; use Exception; diff --git a/src/ServiceInterface.php b/src/ServiceInterface.php index adad259..9c16421 100644 --- a/src/ServiceInterface.php +++ b/src/ServiceInterface.php @@ -6,8 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; -interface ServiceInterface -{ -} +interface ServiceInterface {} diff --git a/src/Status.php b/src/Status.php index 67cfef0..6c3cf14 100644 --- a/src/Status.php +++ b/src/Status.php @@ -6,6 +6,7 @@ * @link https://openswoole.com * @contact hello@openswoole.com */ + namespace OpenSwoole\GRPC; final class Status