This commit is contained in:
2021-03-31 18:37:53 +08:00
parent 627faaf0c9
commit 3f6a19aea7
10 changed files with 17 additions and 75 deletions
+3 -9
View File
@@ -4,10 +4,8 @@
namespace Annotation; namespace Annotation;
use ReflectionException; use Exception;
use ReflectionProperty; use ReflectionProperty;
use Snowflake\Exception\ComponentException;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake; use Snowflake\Snowflake;
/** /**
@@ -31,9 +29,7 @@ use Snowflake\Snowflake;
/** /**
* @param array $handler * @param array $handler
* @return mixed * @return mixed
* @throws ComponentException * @throws Exception
* @throws NotFindClassException
* @throws ReflectionException
*/ */
public function execute(array $handler): mixed public function execute(array $handler): mixed
{ {
@@ -58,9 +54,7 @@ use Snowflake\Snowflake;
/** /**
* @return mixed * @return mixed
* @throws ComponentException * @throws Exception
* @throws NotFindClassException
* @throws ReflectionException
*/ */
private function parseInjectValue(): mixed private function parseInjectValue(): mixed
{ {
+1 -3
View File
@@ -227,9 +227,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
/** /**
* @return mixed * @return mixed
* @throws ComponentException * @throws Exception
* @throws NotFindClassException
* @throws ReflectionException
* get last exception or other error * get last exception or other error
*/ */
public function getLastError(): mixed public function getLastError(): mixed
+4 -12
View File
@@ -107,9 +107,7 @@ class Connection extends Component
/** /**
* @throws ComponentException * @throws Exception
* @throws NotFindClassException
* @throws ReflectionException
*/ */
public function fill() public function fill()
{ {
@@ -165,9 +163,7 @@ class Connection extends Component
/** /**
* @return mixed * @return mixed
* @throws ComponentException * @throws Exception
* @throws NotFindClassException
* @throws ReflectionException
*/ */
public function getCacheDriver(): mixed public function getCacheDriver(): mixed
{ {
@@ -203,9 +199,7 @@ class Connection extends Component
/** /**
* @return \Snowflake\Pool\Connection * @return \Snowflake\Pool\Connection
* @throws ComponentException * @throws Exception
* @throws NotFindClassException
* @throws ReflectionException
*/ */
private function connections(): \Snowflake\Pool\Connection private function connections(): \Snowflake\Pool\Connection
{ {
@@ -293,9 +287,7 @@ class Connection extends Component
/** /**
* @throws ComponentException * @throws Exception
* @throws NotFindClassException
* @throws ReflectionException
*/ */
public function recovery() public function recovery()
{ {
-6
View File
@@ -108,9 +108,6 @@ class Http2 extends Component
* @param int $timeout * @param int $timeout
* @param bool $isUpload * @param bool $isUpload
* @return mixed * @return mixed
* @throws ComponentException
* @throws NotFindClassException
* @throws ReflectionException
* @throws Exception * @throws Exception
*/ */
private function dispatch($domain, $path, $method, $params = [], $timeout = -1, $isUpload = false): mixed private function dispatch($domain, $path, $method, $params = [], $timeout = -1, $isUpload = false): mixed
@@ -204,9 +201,6 @@ class Http2 extends Component
* @param bool $isSsl * @param bool $isSsl
* @param int $timeout * @param int $timeout
* @return H2Client * @return H2Client
* @throws ComponentException
* @throws NotFindClassException
* @throws ReflectionException
* @throws Exception * @throws Exception
*/ */
private function getClient($domain, $isSsl = false, $timeout = -1): H2Client private function getClient($domain, $isSsl = false, $timeout = -1): H2Client
-3
View File
@@ -315,9 +315,6 @@ class Node extends HttpService
* @param string $className * @param string $className
* @param string $action * @param string $action
* @return Node * @return Node
* @throws ComponentException
* @throws NotFindClassException
* @throws ReflectionException
* @throws Exception * @throws Exception
*/ */
public function annotationInject(string $className, string $action): Node public function annotationInject(string $className, string $action): Node
-9
View File
@@ -5,12 +5,9 @@ namespace Rpc;
use Exception; use Exception;
use ReflectionException;
use Snowflake\Abstracts\Component; use Snowflake\Abstracts\Component;
use Snowflake\Channel; use Snowflake\Channel;
use Snowflake\Core\Json; use Snowflake\Core\Json;
use Snowflake\Exception\ComponentException;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake; use Snowflake\Snowflake;
use Swoole\Coroutine\Client as CClient; use Swoole\Coroutine\Client as CClient;
@@ -64,9 +61,6 @@ class Client extends Component
/** /**
* @return Client * @return Client
* @throws ComponentException
* @throws NotFindClassException
* @throws ReflectionException
* @throws Exception * @throws Exception
*/ */
public function clientRecover(): static public function clientRecover(): static
@@ -117,9 +111,6 @@ class Client extends Component
/** /**
* @return mixed * @return mixed
* @throws ComponentException
* @throws NotFindClassException
* @throws ReflectionException
* @throws Exception * @throws Exception
*/ */
public function getClient(): CClient public function getClient(): CClient
+1 -9
View File
@@ -6,10 +6,7 @@ namespace Rpc;
use Exception; use Exception;
use JetBrains\PhpStorm\ArrayShape; use JetBrains\PhpStorm\ArrayShape;
use ReflectionException;
use Snowflake\Abstracts\Component; use Snowflake\Abstracts\Component;
use Snowflake\Exception\ComponentException;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake; use Snowflake\Snowflake;
@@ -118,9 +115,6 @@ class Producer extends Component
* @param string $name * @param string $name
* @param string|null $host * @param string|null $host
* @return mixed * @return mixed
* @throws ComponentException
* @throws NotFindClassException
* @throws ReflectionException
* @throws Exception * @throws Exception
*/ */
public function getClient(string $name, string $host = null): Client public function getClient(string $name, string $host = null): Client
@@ -149,9 +143,7 @@ class Producer extends Component
* @param string $name * @param string $name
* @param string|null $host * @param string|null $host
* @return Client * @return Client
* @throws ComponentException * @throws Exception
* @throws NotFindClassException
* @throws ReflectionException
*/ */
public function consumer(string $name, string $host = null): Client public function consumer(string $name, string $host = null): Client
{ {
+4 -12
View File
@@ -319,9 +319,7 @@ abstract class BaseApplication extends Service
/** /**
* @return Connection * @return Connection
* @throws ComponentException * @throws Exception
* @throws NotFindClassException
* @throws ReflectionException
*/ */
public function getMysqlFromPool(): Connection public function getMysqlFromPool(): Connection
{ {
@@ -331,9 +329,7 @@ abstract class BaseApplication extends Service
/** /**
* @return SRedis * @return SRedis
* @throws NotFindClassException * @throws Exception
* @throws ReflectionException
* @throws ComponentException
*/ */
public function getRedisFromPool(): SRedis public function getRedisFromPool(): SRedis
{ {
@@ -453,9 +449,7 @@ abstract class BaseApplication extends Service
/** /**
* @return \Rpc\Producer * @return \Rpc\Producer
* @throws ComponentException * @throws Exception
* @throws NotFindClassException
* @throws ReflectionException
*/ */
public function getRpc(): \Rpc\Producer public function getRpc(): \Rpc\Producer
{ {
@@ -465,9 +459,7 @@ abstract class BaseApplication extends Service
/** /**
* @return Channel * @return Channel
* @throws ComponentException * @throws Exception
* @throws NotFindClassException
* @throws ReflectionException
*/ */
public function getChannel(): Channel public function getChannel(): Channel
{ {
+3 -9
View File
@@ -5,10 +5,8 @@ declare(strict_types=1);
namespace Snowflake\Pool; namespace Snowflake\Pool;
use ReflectionException; use Exception;
use Snowflake\Abstracts\BaseObject; use Snowflake\Abstracts\BaseObject;
use Snowflake\Exception\ComponentException;
use Snowflake\Exception\NotFindClassException;
use Snowflake\Snowflake; use Snowflake\Snowflake;
/** /**
@@ -23,9 +21,7 @@ class Pool extends BaseObject
/** /**
* @return Redis * @return Redis
* @throws ComponentException * @throws Exception
* @throws ReflectionException
* @throws NotFindClassException
*/ */
public function getRedis(): Redis public function getRedis(): Redis
{ {
@@ -34,9 +30,7 @@ class Pool extends BaseObject
/** /**
* @return Connection * @return Connection
* @throws ComponentException * @throws Exception
* @throws NotFindClassException
* @throws ReflectionException
*/ */
public function getDb(): Connection public function getDb(): Connection
{ {
+1 -3
View File
@@ -61,9 +61,7 @@ class Snowflake
* @param $alias * @param $alias
* @param array $array * @param array $array
* @return mixed * @return mixed
* @throws ComponentException * @throws Exception
* @throws NotFindClassException
* @throws ReflectionException
*/ */
public static function set($alias, $array = []): mixed public static function set($alias, $array = []): mixed
{ {