From 723dfd30a26ade2f1182d7c9711da3345c214586 Mon Sep 17 00:00:00 2001 From: sunxyw Date: Tue, 8 Nov 2022 17:33:25 +0800 Subject: [PATCH] fix styles --- src/Globals/global_functions.php | 8 ++++---- src/ZM/Bootstrap/HandleExceptions.php | 2 ++ src/ZM/Bootstrap/LoadConfiguration.php | 6 ++++-- src/ZM/Bootstrap/LoadGlobalDefines.php | 2 ++ src/ZM/Bootstrap/RegisterEventProvider.php | 2 ++ src/ZM/Bootstrap/RegisterLogger.php | 2 ++ src/ZM/Bootstrap/SetInternalTimezone.php | 2 ++ src/ZM/Exception/Handler.php | 5 +++-- src/ZM/Framework.php | 5 +---- 9 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/Globals/global_functions.php b/src/Globals/global_functions.php index 1d5555ec..c6554ae3 100644 --- a/src/Globals/global_functions.php +++ b/src/Globals/global_functions.php @@ -143,7 +143,7 @@ function container(): ContainerInterface * 解析类实例(使用容器) * * @template T - * @param class-string $abstract + * @param class-string $abstract * @return Closure|mixed|T * @noinspection PhpDocMissingThrowsInspection */ @@ -157,7 +157,7 @@ function resolve(string $abstract, array $parameters = []) * 获取容器实例 * * @template T - * @param null|class-string $abstract + * @param null|class-string $abstract * @return Closure|ContainerInterface|mixed|T */ function app(string $abstract = null, array $parameters = []) @@ -196,8 +196,8 @@ function sql_builder(string $name = '') * 传入数组,设置配置项 * 不传参数,返回配置容器 * - * @param array|string|null $key 键名 - * @param mixed|null $default 默认值 + * @param null|array|string $key 键名 + * @param null|mixed $default 默认值 * @return mixed|void|ZMConfig */ function config(array|string $key = null, mixed $default = null) diff --git a/src/ZM/Bootstrap/HandleExceptions.php b/src/ZM/Bootstrap/HandleExceptions.php index 99bc4571..709552d3 100644 --- a/src/ZM/Bootstrap/HandleExceptions.php +++ b/src/ZM/Bootstrap/HandleExceptions.php @@ -1,5 +1,7 @@ set('global.driver', $y); break; case 'worker-num': // 动态设置 Worker 数量 - $config->set('global.swoole_options.swoole_set.worker_num', (int)$y); - $config->set('global.workerman_options.workerman_worker_num', (int)$y); + $config->set('global.swoole_options.swoole_set.worker_num', (int) $y); + $config->set('global.workerman_options.workerman_worker_num', (int) $y); break; case 'daemon': // 启动为守护进程 $config->set('global.swoole_options.swoole_set.daemonize', 1); diff --git a/src/ZM/Bootstrap/LoadGlobalDefines.php b/src/ZM/Bootstrap/LoadGlobalDefines.php index 36cc47c1..1c1b45ea 100644 --- a/src/ZM/Bootstrap/LoadGlobalDefines.php +++ b/src/ZM/Bootstrap/LoadGlobalDefines.php @@ -1,5 +1,7 @@ $argv 传入的参数(见 ServerStartCommand) + * @param array $argv 传入的参数(见 ServerStartCommand) * @throws InitException * @throws \Exception */