diff --git a/src/ZM/Annotation/OneBot/BotCommand.php b/src/ZM/Annotation/OneBot/BotCommand.php index 49448200..7ece0f37 100644 --- a/src/ZM/Annotation/OneBot/BotCommand.php +++ b/src/ZM/Annotation/OneBot/BotCommand.php @@ -108,9 +108,9 @@ class BotCommand extends AnnotationBase implements Level } /** + * @return $this * @throws InvalidArgumentException * @throws ZMKnownException - * @return $this */ public function withArgument( string $name, diff --git a/src/ZM/Config/ZMConfig.php b/src/ZM/Config/ZMConfig.php index 70016028..bb425323 100644 --- a/src/ZM/Config/ZMConfig.php +++ b/src/ZM/Config/ZMConfig.php @@ -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; diff --git a/src/ZM/Container/BoundMethod.php b/src/ZM/Container/BoundMethod.php index 017d0082..301aa0b5 100644 --- a/src/ZM/Container/BoundMethod.php +++ b/src/ZM/Container/BoundMethod.php @@ -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) { diff --git a/src/ZM/Container/Container.php b/src/ZM/Container/Container.php index 8dcbcf44..7d22faff 100644 --- a/src/ZM/Container/Container.php +++ b/src/ZM/Container/Container.php @@ -41,8 +41,8 @@ class Container implements ContainerInterface * @template T * @param class-string $abstract 类或接口名 * @param array $parameters 参数 - * @throws EntryResolutionException * @return Closure|mixed|T 实例 + * @throws EntryResolutionException */ public function make(string $abstract, array $parameters = []) { diff --git a/src/ZM/Container/ContainerTrait.php b/src/ZM/Container/ContainerTrait.php index a79eef7d..a5562ed7 100644 --- a/src/ZM/Container/ContainerTrait.php +++ b/src/ZM/Container/ContainerTrait.php @@ -247,8 +247,8 @@ trait ContainerTrait * @template T * @param class-string $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) { diff --git a/src/ZM/Middleware/Pipeline.php b/src/ZM/Middleware/Pipeline.php index 728315c0..9054e0ce 100644 --- a/src/ZM/Middleware/Pipeline.php +++ b/src/ZM/Middleware/Pipeline.php @@ -45,8 +45,8 @@ class Pipeline * 接下来要调用的内容 * * @param callable $callback 然后调用一个什么东西 - * @throws InvalidArgumentException * @return null|mixed 返回调用结果或null + * @throws InvalidArgumentException */ public function then(callable $callback) { diff --git a/src/ZM/Process/ProcessStateManager.php b/src/ZM/Process/ProcessStateManager.php index b8c81a4c..3dd69727 100644 --- a/src/ZM/Process/ProcessStateManager.php +++ b/src/ZM/Process/ProcessStateManager.php @@ -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) diff --git a/src/ZM/Store/Database/DBQueryBuilder.php b/src/ZM/Store/Database/DBQueryBuilder.php index ac6383ac..a5570f77 100644 --- a/src/ZM/Store/Database/DBQueryBuilder.php +++ b/src/ZM/Store/Database/DBQueryBuilder.php @@ -18,8 +18,8 @@ class DBQueryBuilder extends QueryBuilder } /** - * @throws DbException * @return DBStatementWrapper|int + * @throws DbException */ public function execute() { diff --git a/src/ZM/Store/Database/DBStatementWrapper.php b/src/ZM/Store/Database/DBStatementWrapper.php index dd6774f1..4aa9c421 100644 --- a/src/ZM/Store/Database/DBStatementWrapper.php +++ b/src/ZM/Store/Database/DBStatementWrapper.php @@ -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() { diff --git a/src/ZM/Store/Database/DBWrapper.php b/src/ZM/Store/Database/DBWrapper.php index e4d53fdc..f134416f 100644 --- a/src/ZM/Store/Database/DBWrapper.php +++ b/src/ZM/Store/Database/DBWrapper.php @@ -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|array $params Query parameters * @param array|array $types Parameter types * - * @throws DBException * @return array> + * @throws DBException */ public function fetchAllNumeric(string $query, array $params = [], array $types = []): array { @@ -217,8 +217,8 @@ class DBWrapper * @param array|array $params Query parameters * @param array|array $types Parameter types * - * @throws DBException * @return array> + * @throws DBException */ public function fetchAllAssociative(string $query, array $params = [], array $types = []): array { @@ -252,8 +252,8 @@ class DBWrapper * @param array|array $params Query parameters * @param array|array $types Parameter types * - * @throws DBException * @return array> + * @throws DBException */ public function fetchAllAssociativeIndexed(string $query, array $params = [], array $types = []): array { @@ -270,8 +270,8 @@ class DBWrapper * @param array|array $params Query parameters * @param array|array $types Parameter types * - * @throws DBException * @return array + * @throws DBException */ public function fetchFirstColumn(string $query, array $params = [], array $types = []): array { @@ -288,8 +288,8 @@ class DBWrapper * @param array|array $params Query parameters * @param array|array $types Parameter types * - * @throws DBException * @return Traversable> + * @throws DBException */ public function iterateNumeric(string $query, array $params = [], array $types = []): Traversable { @@ -306,8 +306,8 @@ class DBWrapper * @param array|array $params Query parameters * @param array|array $types Parameter types * - * @throws DBException * @return Traversable> + * @throws DBException */ public function iterateAssociative(string $query, array $params = [], array $types = []): Traversable { @@ -324,8 +324,8 @@ class DBWrapper * @param array|array $params Query parameters * @param array|array $types Parameter types * - * @throws DBException * @return Traversable + * @throws DBException */ public function iterateKeyValue(string $query, array $params = [], array $types = []): Traversable { @@ -342,8 +342,8 @@ class DBWrapper * @param array|array $params Query parameters * @param array|array $types Parameter types * - * @throws DBException * @return Traversable> + * @throws DBException */ public function iterateAssociativeIndexed(string $query, array $params = [], array $types = []): Traversable { @@ -360,8 +360,8 @@ class DBWrapper * @param array|array $params Query parameters * @param array|array $types Parameter types * - * @throws DBException * @return Traversable + * @throws DBException */ public function iterateColumn(string $query, array $params = [], array $types = []): Traversable { @@ -414,8 +414,8 @@ class DBWrapper * @param array|array $params Statement parameters * @param array|array $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) {