mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-03-17 20:54:52 +08:00
fix styles
This commit is contained in:
parent
8f7fd97ebe
commit
9d77d60887
@ -108,9 +108,9 @@ class BotCommand extends AnnotationBase implements Level
|
||||
}
|
||||
|
||||
/**
|
||||
* @return $this
|
||||
* @throws InvalidArgumentException
|
||||
* @throws ZMKnownException
|
||||
* @return $this
|
||||
*/
|
||||
public function withArgument(
|
||||
string $name,
|
||||
|
||||
@ -102,7 +102,7 @@ class ZMConfig
|
||||
foreach ($this->config_paths as $config_path) {
|
||||
$files = scandir($config_path);
|
||||
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)) {
|
||||
continue;
|
||||
|
||||
@ -16,9 +16,9 @@ class BoundMethod
|
||||
*
|
||||
* @param Container $container
|
||||
* @param callable|string $callback
|
||||
* @return mixed
|
||||
* @throws EntryResolutionException|ReflectionException
|
||||
* @throws InvalidArgumentException
|
||||
* @return mixed
|
||||
*/
|
||||
public static function call(ContainerInterface $container, $callback, array $parameters = [], string $default_method = null)
|
||||
{
|
||||
|
||||
@ -41,8 +41,8 @@ class Container implements ContainerInterface
|
||||
* @template T
|
||||
* @param class-string<T> $abstract 类或接口名
|
||||
* @param array $parameters 参数
|
||||
* @throws EntryResolutionException
|
||||
* @return Closure|mixed|T 实例
|
||||
* @throws EntryResolutionException
|
||||
*/
|
||||
public function make(string $abstract, array $parameters = [])
|
||||
{
|
||||
|
||||
@ -247,8 +247,8 @@ trait ContainerTrait
|
||||
* @template T
|
||||
* @param class-string<T> $abstract 类或接口名
|
||||
* @param array $parameters 参数
|
||||
* @throws EntryResolutionException
|
||||
* @return Closure|mixed|T 实例
|
||||
* @throws EntryResolutionException
|
||||
*/
|
||||
public function make(string $abstract, array $parameters = [])
|
||||
{
|
||||
@ -317,8 +317,8 @@ trait ContainerTrait
|
||||
* 实例化具体的类实例
|
||||
*
|
||||
* @param Closure|string $concrete 类名或对应的闭包
|
||||
* @throws EntryResolutionException
|
||||
* @return mixed
|
||||
* @throws EntryResolutionException
|
||||
*/
|
||||
public function build($concrete)
|
||||
{
|
||||
@ -394,10 +394,9 @@ trait ContainerTrait
|
||||
*
|
||||
* @param string $id identifier of the entry to look for
|
||||
*
|
||||
* @return mixed entry
|
||||
* @throws NotFoundExceptionInterface no entry was found for **this** identifier
|
||||
* @throws ContainerExceptionInterface error while retrieving the entry
|
||||
*
|
||||
* @return mixed entry
|
||||
*/
|
||||
public function get(string $id)
|
||||
{
|
||||
@ -640,8 +639,8 @@ trait ContainerTrait
|
||||
/**
|
||||
* 解析基本类型
|
||||
*
|
||||
* @throws EntryResolutionException 如参数不存在默认值,则抛出异常
|
||||
* @return mixed 对应类型的默认值
|
||||
* @throws EntryResolutionException 如参数不存在默认值,则抛出异常
|
||||
*/
|
||||
protected function resolvePrimitive(ReflectionParameter $parameter)
|
||||
{
|
||||
@ -655,8 +654,8 @@ trait ContainerTrait
|
||||
/**
|
||||
* 解析类
|
||||
*
|
||||
* @throws EntryResolutionException 如果无法解析类,则抛出异常
|
||||
* @return mixed
|
||||
* @throws EntryResolutionException 如果无法解析类,则抛出异常
|
||||
*/
|
||||
protected function resolveClass(ReflectionParameter $parameter)
|
||||
{
|
||||
|
||||
@ -45,8 +45,8 @@ class Pipeline
|
||||
* 接下来要调用的内容
|
||||
*
|
||||
* @param callable $callback 然后调用一个什么东西
|
||||
* @throws InvalidArgumentException
|
||||
* @return null|mixed 返回调用结果或null
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function then(callable $callback)
|
||||
{
|
||||
|
||||
@ -65,8 +65,8 @@ class ProcessStateManager
|
||||
* 用于框架内部获取多进程运行状态的函数
|
||||
*
|
||||
* @param mixed $id_or_name
|
||||
* @throws ZMKnownException
|
||||
* @return false|int|mixed
|
||||
* @throws ZMKnownException
|
||||
* @internal
|
||||
*/
|
||||
public static function getProcessState(int $type, $id_or_name = null)
|
||||
|
||||
@ -18,8 +18,8 @@ class DBQueryBuilder extends QueryBuilder
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws DbException
|
||||
* @return DBStatementWrapper|int
|
||||
* @throws DbException
|
||||
*/
|
||||
public function execute()
|
||||
{
|
||||
|
||||
@ -45,8 +45,8 @@ class DBStatementWrapper
|
||||
|
||||
/**
|
||||
* wrapper method
|
||||
*@throws DBException
|
||||
* @return array|false|mixed
|
||||
*@throws DBException
|
||||
*/
|
||||
public function fetchNumeric()
|
||||
{
|
||||
@ -59,8 +59,8 @@ class DBStatementWrapper
|
||||
|
||||
/**
|
||||
* wrapper method
|
||||
*@throws DBException
|
||||
* @return array|false|mixed
|
||||
*@throws DBException
|
||||
*/
|
||||
public function fetchAssociative()
|
||||
{
|
||||
@ -73,8 +73,8 @@ class DBStatementWrapper
|
||||
|
||||
/**
|
||||
* wrapper method
|
||||
*@throws DBException
|
||||
* @return false|mixed
|
||||
*@throws DBException
|
||||
*/
|
||||
public function fetchOne()
|
||||
{
|
||||
@ -217,8 +217,8 @@ class DBStatementWrapper
|
||||
|
||||
/**
|
||||
* wrapper method
|
||||
* @throws DBException
|
||||
* @return int
|
||||
* @throws DBException
|
||||
*/
|
||||
public function rowCount()
|
||||
{
|
||||
|
||||
@ -69,8 +69,8 @@ class DBWrapper
|
||||
|
||||
/**
|
||||
* wrapper method
|
||||
* @throws DBException
|
||||
* @return array|false
|
||||
* @throws DBException
|
||||
*/
|
||||
public function fetchAssociative(string $query, array $params = [], array $types = [])
|
||||
{
|
||||
@ -83,8 +83,8 @@ class DBWrapper
|
||||
|
||||
/**
|
||||
* wrapper method
|
||||
* @throws DBException
|
||||
* @return array|false
|
||||
* @throws DBException
|
||||
*/
|
||||
public function fetchNumeric(string $query, array $params = [], array $types = [])
|
||||
{
|
||||
@ -96,8 +96,8 @@ class DBWrapper
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws DBException
|
||||
* @return false|mixed
|
||||
* @throws DBException
|
||||
*/
|
||||
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, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types
|
||||
*
|
||||
* @throws DBException
|
||||
* @return array<int,array<int,mixed>>
|
||||
* @throws DBException
|
||||
*/
|
||||
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, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types
|
||||
*
|
||||
* @throws DBException
|
||||
* @return array<int,array<string,mixed>>
|
||||
* @throws DBException
|
||||
*/
|
||||
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, int|string>|array<string, int|string> $types Parameter types
|
||||
*
|
||||
* @throws DBException
|
||||
* @return array<mixed,array<string,mixed>>
|
||||
* @throws DBException
|
||||
*/
|
||||
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, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types
|
||||
*
|
||||
* @throws DBException
|
||||
* @return array<int,mixed>
|
||||
* @throws DBException
|
||||
*/
|
||||
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, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types
|
||||
*
|
||||
* @throws DBException
|
||||
* @return Traversable<int,array<int,mixed>>
|
||||
* @throws DBException
|
||||
*/
|
||||
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, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types
|
||||
*
|
||||
* @throws DBException
|
||||
* @return Traversable<int,array<string,mixed>>
|
||||
* @throws DBException
|
||||
*/
|
||||
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, int|string>|array<string, int|string> $types Parameter types
|
||||
*
|
||||
* @throws DBException
|
||||
* @return Traversable<mixed,mixed>
|
||||
* @throws DBException
|
||||
*/
|
||||
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, int|string>|array<string, int|string> $types Parameter types
|
||||
*
|
||||
* @throws DBException
|
||||
* @return Traversable<mixed,array<string,mixed>>
|
||||
* @throws DBException
|
||||
*/
|
||||
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, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types
|
||||
*
|
||||
* @throws DBException
|
||||
* @return Traversable<int,mixed>
|
||||
* @throws DBException
|
||||
*/
|
||||
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, null|int|string|Type>|array<string, null|int|string|Type> $types Parameter types
|
||||
*
|
||||
* @throws DBException
|
||||
* @return int|string the number of affected rows
|
||||
* @throws DBException
|
||||
*/
|
||||
public function executeStatement(string $sql, array $params = [], array $types = [])
|
||||
{
|
||||
@ -446,8 +446,8 @@ class DBWrapper
|
||||
|
||||
/**
|
||||
* overwrite method to $this->connection->transactional()
|
||||
* @throws DBException
|
||||
* @return mixed
|
||||
* @throws DBException
|
||||
*/
|
||||
public function transactional(Closure $func)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user