From f255c2dcac6fa69b6226f9827099d2a869ef4d23 Mon Sep 17 00:00:00 2001 From: kdapk01 Date: Mon, 30 Mar 2026 21:26:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Denv=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=80=BC=E6=8E=A5=E5=8F=97=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/helper.php | 4 ++-- src/think/Env.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/helper.php b/src/helper.php index dfeb099c09..198680f491 100644 --- a/src/helper.php +++ b/src/helper.php @@ -208,8 +208,8 @@ function dump(...$vars) /** * 获取环境变量值 * @access public - * @param string $name 环境变量名(支持二级 .号分割) - * @param string $default 默认值 + * @param ?string $name 环境变量名(支持二级 .号分割) + * @param mixed $default 默认值 * @return mixed */ function env(?string $name = null, $default = null) diff --git a/src/think/Env.php b/src/think/Env.php index 91e54a531e..5b53036208 100644 --- a/src/think/Env.php +++ b/src/think/Env.php @@ -57,11 +57,11 @@ public function load(string $file): void /** * 获取环境变量值 * @access public - * @param string $name 环境变量名 - * @param mixed $default 默认值 + * @param ?string $name 环境变量名 + * @param mixed $default 默认值 * @return mixed */ - public function get(?string $name = null, $default = null) + public function get(?string $name = null, mixed $default = null) { if (is_null($name)) { return $this->data;