From a125fd5e209fac4645537985711653e1c51094c1 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 4 Oct 2022 12:07:16 +0800 Subject: [PATCH] fixed --- src/Reseed/AutoReseed.php | 4 ++-- src/Reseed/MoveTorrent.php | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Reseed/AutoReseed.php b/src/Reseed/AutoReseed.php index 1f0452d..0b9bd1b 100644 --- a/src/Reseed/AutoReseed.php +++ b/src/Reseed/AutoReseed.php @@ -757,14 +757,14 @@ class AutoReseed /** * 辅种前置检查 - * @param int $k 客户端key + * @param int|string $k 客户端key * @param array $torrent 可辅的种子 * @param array $infohash_Dir 当前客户端hash目录对应字典 * @param string $downloadDir 辅种目录 * @param string $_url 种子临时连接 * @return bool true 可辅种 | false 不可辅种 */ - private static function reseedCheck(int $k, array $torrent, array $infohash_Dir, string $downloadDir, string $_url): bool + private static function reseedCheck(string $k, array $torrent, array $infohash_Dir, string $downloadDir, string $_url): bool { self::checkPid() or die('检测到当前任务被外部主动停止,进程退出!' . PHP_EOL); $sid = $torrent['sid']; diff --git a/src/Reseed/MoveTorrent.php b/src/Reseed/MoveTorrent.php index 20a59e0..bf90663 100644 --- a/src/Reseed/MoveTorrent.php +++ b/src/Reseed/MoveTorrent.php @@ -50,7 +50,7 @@ class MoveTorrent extends AutoReseed protected static function getCliInput() { global $argv; - $cron_name = isset($argv[1]) ? $argv[1] : null; + $cron_name = $argv[1] ?? null; is_null($cron_name) and die('缺少命令行参数。'); self::$conf = domainMove::parser($cron_name); // 用户选择的下载器 @@ -60,6 +60,8 @@ class MoveTorrent extends AutoReseed /** * 转移,总入口 + * @return void + * @throws ClientException */ public static function call() {