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