diff --git a/install.php b/install.php index 9e36312d..bc0142f2 100644 --- a/install.php +++ b/install.php @@ -744,7 +744,6 @@ function install_step_1_perform() { $errors = []; $checks = [ - 'curl', 'mbstring', 'json', 'Reflection', diff --git a/var/Typecho/Common.php b/var/Typecho/Common.php index 1071939e..633fd9ec 100644 --- a/var/Typecho/Common.php +++ b/var/Typecho/Common.php @@ -312,7 +312,7 @@ EOF; * 使用方法: * * $input = '这是一段被截断的html文本 * @@ -378,7 +378,7 @@ EOF; * 使用方法: * * $input = 'hello'; - * $output = Typecho_Common::stripTags($input, ); + * $output = Common::stripTags($input, ); * echo $output; * //display: 'hello' * diff --git a/var/Typecho/Feed.php b/var/Typecho/Feed.php index bc362225..a6198356 100644 --- a/var/Typecho/Feed.php +++ b/var/Typecho/Feed.php @@ -3,7 +3,7 @@ namespace Typecho; /** - * Typecho_Feed + * Feed * * @package Feed */ diff --git a/var/Typecho/Http/Client.php b/var/Typecho/Http/Client.php index 19c331bd..53eb484f 100644 --- a/var/Typecho/Http/Client.php +++ b/var/Typecho/Http/Client.php @@ -22,24 +22,18 @@ class Client /** 定义行结束符 */ public const EOL = "\r\n"; - private const ADAPTERS = ['Curl', 'Socket']; + private const ADAPTERS = [Adapter\Curl::class, Adapter\Socket::class]; /** * 获取可用的连接 * - * @param string ...$adapters * @return ?Adapter */ - public static function get(string ...$adapters): ?Adapter + public static function get(): ?Adapter { - if (empty($adapters)) { - $adapters = self::ADAPTERS; - } - - foreach ($adapters as $adapter) { - $adapterName = 'Typecho_Http_Client_Adapter_' . $adapter; - if (call_user_func([$adapterName, 'isAvailable'])) { - return new $adapterName(); + foreach (self::ADAPTERS as $adapter) { + if (call_user_func([$adapter, 'isAvailable'])) { + return new $adapter(); } } diff --git a/var/Utils/Helper.php b/var/Utils/Helper.php index 6c25df5b..1558d033 100644 --- a/var/Utils/Helper.php +++ b/var/Utils/Helper.php @@ -195,7 +195,7 @@ class Helper } /** - * 获取Widget_Options对象 + * 获取Options对象 * * @return Options */