fix styles

This commit is contained in:
sunxyw
2022-09-09 18:59:46 +08:00
parent 8f7fd97ebe
commit 9d77d60887
10 changed files with 30 additions and 31 deletions

View File

@@ -108,9 +108,9 @@ class BotCommand extends AnnotationBase implements Level
} }
/** /**
* @return $this
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @throws ZMKnownException * @throws ZMKnownException
* @return $this
*/ */
public function withArgument( public function withArgument(
string $name, string $name,

View File

@@ -102,7 +102,7 @@ class ZMConfig
foreach ($this->config_paths as $config_path) { foreach ($this->config_paths as $config_path) {
$files = scandir($config_path); $files = scandir($config_path);
foreach ($files as $file) { foreach ($files as $file) {
[, $ext, $load_type,] = $this->getFileMeta($file); [, $ext, $load_type] = $this->getFileMeta($file);
// 略过不支持的文件 // 略过不支持的文件
if (!in_array($ext, self::ALLOWED_FILE_EXTENSIONS, true)) { if (!in_array($ext, self::ALLOWED_FILE_EXTENSIONS, true)) {
continue; continue;

View File

@@ -16,9 +16,9 @@ class BoundMethod
* *
* @param Container $container * @param Container $container
* @param callable|string $callback * @param callable|string $callback
* @return mixed
* @throws EntryResolutionException|ReflectionException * @throws EntryResolutionException|ReflectionException
* @throws InvalidArgumentException * @throws InvalidArgumentException
* @return mixed
*/ */
public static function call(ContainerInterface $container, $callback, array $parameters = [], string $default_method = null) public static function call(ContainerInterface $container, $callback, array $parameters = [], string $default_method = null)
{ {

View File

@@ -41,8 +41,8 @@ class Container implements ContainerInterface
* @template T * @template T
* @param class-string<T> $abstract 类或接口名 * @param class-string<T> $abstract 类或接口名
* @param array $parameters 参数 * @param array $parameters 参数
* @throws EntryResolutionException
* @return Closure|mixed|T 实例 * @return Closure|mixed|T 实例
* @throws EntryResolutionException
*/ */
public function make(string $abstract, array $parameters = []) public function make(string $abstract, array $parameters = [])
{ {

View File

@@ -247,8 +247,8 @@ trait ContainerTrait
* @template T * @template T
* @param class-string<T> $abstract 类或接口名 * @param class-string<T> $abstract 类或接口名
* @param array $parameters 参数 * @param array $parameters 参数
* @throws EntryResolutionException
* @return Closure|mixed|T 实例 * @return Closure|mixed|T 实例
* @throws EntryResolutionException
*/ */
public function make(string $abstract, array $parameters = []) public function make(string $abstract, array $parameters = [])
{ {
@@ -317,8 +317,8 @@ trait ContainerTrait
* 实例化具体的类实例 * 实例化具体的类实例
* *
* @param Closure|string $concrete 类名或对应的闭包 * @param Closure|string $concrete 类名或对应的闭包
* @throws EntryResolutionException
* @return mixed * @return mixed
* @throws EntryResolutionException
*/ */
public function build($concrete) public function build($concrete)
{ {
@@ -394,10 +394,9 @@ trait ContainerTrait
* *
* @param string $id identifier of the entry to look for * @param string $id identifier of the entry to look for
* *
* @return mixed entry
* @throws NotFoundExceptionInterface no entry was found for **this** identifier * @throws NotFoundExceptionInterface no entry was found for **this** identifier
* @throws ContainerExceptionInterface error while retrieving the entry * @throws ContainerExceptionInterface error while retrieving the entry
*
* @return mixed entry
*/ */
public function get(string $id) public function get(string $id)
{ {
@@ -640,8 +639,8 @@ trait ContainerTrait
/** /**
* 解析基本类型 * 解析基本类型
* *
* @throws EntryResolutionException 如参数不存在默认值,则抛出异常
* @return mixed 对应类型的默认值 * @return mixed 对应类型的默认值
* @throws EntryResolutionException 如参数不存在默认值,则抛出异常
*/ */
protected function resolvePrimitive(ReflectionParameter $parameter) protected function resolvePrimitive(ReflectionParameter $parameter)
{ {
@@ -655,8 +654,8 @@ trait ContainerTrait
/** /**
* 解析类 * 解析类
* *
* @throws EntryResolutionException 如果无法解析类,则抛出异常
* @return mixed * @return mixed
* @throws EntryResolutionException 如果无法解析类,则抛出异常
*/ */
protected function resolveClass(ReflectionParameter $parameter) protected function resolveClass(ReflectionParameter $parameter)
{ {

View File

@@ -45,8 +45,8 @@ class Pipeline
* 接下来要调用的内容 * 接下来要调用的内容
* *
* @param callable $callback 然后调用一个什么东西 * @param callable $callback 然后调用一个什么东西
* @throws InvalidArgumentException
* @return null|mixed 返回调用结果或null * @return null|mixed 返回调用结果或null
* @throws InvalidArgumentException
*/ */
public function then(callable $callback) public function then(callable $callback)
{ {

View File

@@ -65,8 +65,8 @@ class ProcessStateManager
* 用于框架内部获取多进程运行状态的函数 * 用于框架内部获取多进程运行状态的函数
* *
* @param mixed $id_or_name * @param mixed $id_or_name
* @throws ZMKnownException
* @return false|int|mixed * @return false|int|mixed
* @throws ZMKnownException
* @internal * @internal
*/ */
public static function getProcessState(int $type, $id_or_name = null) public static function getProcessState(int $type, $id_or_name = null)

View File

@@ -18,8 +18,8 @@ class DBQueryBuilder extends QueryBuilder
} }
/** /**
* @throws DbException
* @return DBStatementWrapper|int * @return DBStatementWrapper|int
* @throws DbException
*/ */
public function execute() public function execute()
{ {

View File

@@ -45,8 +45,8 @@ class DBStatementWrapper
/** /**
* wrapper method * wrapper method
*@throws DBException
* @return array|false|mixed * @return array|false|mixed
*@throws DBException
*/ */
public function fetchNumeric() public function fetchNumeric()
{ {
@@ -59,8 +59,8 @@ class DBStatementWrapper
/** /**
* wrapper method * wrapper method
*@throws DBException
* @return array|false|mixed * @return array|false|mixed
*@throws DBException
*/ */
public function fetchAssociative() public function fetchAssociative()
{ {
@@ -73,8 +73,8 @@ class DBStatementWrapper
/** /**
* wrapper method * wrapper method
*@throws DBException
* @return false|mixed * @return false|mixed
*@throws DBException
*/ */
public function fetchOne() public function fetchOne()
{ {
@@ -217,8 +217,8 @@ class DBStatementWrapper
/** /**
* wrapper method * wrapper method
* @throws DBException
* @return int * @return int
* @throws DBException
*/ */
public function rowCount() public function rowCount()
{ {

View File

@@ -69,8 +69,8 @@ class DBWrapper
/** /**
* wrapper method * wrapper method
* @throws DBException
* @return array|false * @return array|false
* @throws DBException
*/ */
public function fetchAssociative(string $query, array $params = [], array $types = []) public function fetchAssociative(string $query, array $params = [], array $types = [])
{ {
@@ -83,8 +83,8 @@ class DBWrapper
/** /**
* wrapper method * wrapper method
* @throws DBException
* @return array|false * @return array|false
* @throws DBException
*/ */
public function fetchNumeric(string $query, array $params = [], array $types = []) public function fetchNumeric(string $query, array $params = [], array $types = [])
{ {
@@ -96,8 +96,8 @@ class DBWrapper
} }
/** /**
* @throws DBException
* @return false|mixed * @return false|mixed
* @throws DBException
*/ */
public function fetchOne(string $query, array $params = [], array $types = []) public function fetchOne(string $query, array $params = [], array $types = [])
{ {
@@ -199,8 +199,8 @@ class DBWrapper
* @param array<int, mixed>|array<string, mixed> $params Query parameters * @param array<int, mixed>|array<string, mixed> $params Query parameters
* @param array<int, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types * @param array<int, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types
* *
* @throws DBException
* @return array<int,array<int,mixed>> * @return array<int,array<int,mixed>>
* @throws DBException
*/ */
public function fetchAllNumeric(string $query, array $params = [], array $types = []): array public function fetchAllNumeric(string $query, array $params = [], array $types = []): array
{ {
@@ -217,8 +217,8 @@ class DBWrapper
* @param array<int, mixed>|array<string, mixed> $params Query parameters * @param array<int, mixed>|array<string, mixed> $params Query parameters
* @param array<int, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types * @param array<int, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types
* *
* @throws DBException
* @return array<int,array<string,mixed>> * @return array<int,array<string,mixed>>
* @throws DBException
*/ */
public function fetchAllAssociative(string $query, array $params = [], array $types = []): array public function fetchAllAssociative(string $query, array $params = [], array $types = []): array
{ {
@@ -252,8 +252,8 @@ class DBWrapper
* @param array<int, mixed>|array<string, mixed> $params Query parameters * @param array<int, mixed>|array<string, mixed> $params Query parameters
* @param array<int, int|string>|array<string, int|string> $types Parameter types * @param array<int, int|string>|array<string, int|string> $types Parameter types
* *
* @throws DBException
* @return array<mixed,array<string,mixed>> * @return array<mixed,array<string,mixed>>
* @throws DBException
*/ */
public function fetchAllAssociativeIndexed(string $query, array $params = [], array $types = []): array public function fetchAllAssociativeIndexed(string $query, array $params = [], array $types = []): array
{ {
@@ -270,8 +270,8 @@ class DBWrapper
* @param array<int, mixed>|array<string, mixed> $params Query parameters * @param array<int, mixed>|array<string, mixed> $params Query parameters
* @param array<int, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types * @param array<int, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types
* *
* @throws DBException
* @return array<int,mixed> * @return array<int,mixed>
* @throws DBException
*/ */
public function fetchFirstColumn(string $query, array $params = [], array $types = []): array public function fetchFirstColumn(string $query, array $params = [], array $types = []): array
{ {
@@ -288,8 +288,8 @@ class DBWrapper
* @param array<int, mixed>|array<string, mixed> $params Query parameters * @param array<int, mixed>|array<string, mixed> $params Query parameters
* @param array<int, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types * @param array<int, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types
* *
* @throws DBException
* @return Traversable<int,array<int,mixed>> * @return Traversable<int,array<int,mixed>>
* @throws DBException
*/ */
public function iterateNumeric(string $query, array $params = [], array $types = []): Traversable public function iterateNumeric(string $query, array $params = [], array $types = []): Traversable
{ {
@@ -306,8 +306,8 @@ class DBWrapper
* @param array<int, mixed>|array<string, mixed> $params Query parameters * @param array<int, mixed>|array<string, mixed> $params Query parameters
* @param array<int, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types * @param array<int, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types
* *
* @throws DBException
* @return Traversable<int,array<string,mixed>> * @return Traversable<int,array<string,mixed>>
* @throws DBException
*/ */
public function iterateAssociative(string $query, array $params = [], array $types = []): Traversable public function iterateAssociative(string $query, array $params = [], array $types = []): Traversable
{ {
@@ -324,8 +324,8 @@ class DBWrapper
* @param array<int, mixed>|array<string, mixed> $params Query parameters * @param array<int, mixed>|array<string, mixed> $params Query parameters
* @param array<int, int|string>|array<string, int|string> $types Parameter types * @param array<int, int|string>|array<string, int|string> $types Parameter types
* *
* @throws DBException
* @return Traversable<mixed,mixed> * @return Traversable<mixed,mixed>
* @throws DBException
*/ */
public function iterateKeyValue(string $query, array $params = [], array $types = []): Traversable public function iterateKeyValue(string $query, array $params = [], array $types = []): Traversable
{ {
@@ -342,8 +342,8 @@ class DBWrapper
* @param array<int, mixed>|array<string, mixed> $params Query parameters * @param array<int, mixed>|array<string, mixed> $params Query parameters
* @param array<int, int|string>|array<string, int|string> $types Parameter types * @param array<int, int|string>|array<string, int|string> $types Parameter types
* *
* @throws DBException
* @return Traversable<mixed,array<string,mixed>> * @return Traversable<mixed,array<string,mixed>>
* @throws DBException
*/ */
public function iterateAssociativeIndexed(string $query, array $params = [], array $types = []): Traversable public function iterateAssociativeIndexed(string $query, array $params = [], array $types = []): Traversable
{ {
@@ -360,8 +360,8 @@ class DBWrapper
* @param array<int, mixed>|array<string, mixed> $params Query parameters * @param array<int, mixed>|array<string, mixed> $params Query parameters
* @param array<int, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types * @param array<int, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types
* *
* @throws DBException
* @return Traversable<int,mixed> * @return Traversable<int,mixed>
* @throws DBException
*/ */
public function iterateColumn(string $query, array $params = [], array $types = []): Traversable public function iterateColumn(string $query, array $params = [], array $types = []): Traversable
{ {
@@ -414,8 +414,8 @@ class DBWrapper
* @param array<int, mixed>|array<string, mixed> $params Statement parameters * @param array<int, mixed>|array<string, mixed> $params Statement parameters
* @param array<int, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types * @param array<int, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types
* *
* @throws DBException
* @return int|string the number of affected rows * @return int|string the number of affected rows
* @throws DBException
*/ */
public function executeStatement(string $sql, array $params = [], array $types = []) public function executeStatement(string $sql, array $params = [], array $types = [])
{ {
@@ -446,8 +446,8 @@ class DBWrapper
/** /**
* overwrite method to $this->connection->transactional() * overwrite method to $this->connection->transactional()
* @throws DBException
* @return mixed * @return mixed
* @throws DBException
*/ */
public function transactional(Closure $func) public function transactional(Closure $func)
{ {