From 6944bfa1d9e89c53e76040de7c0bc09084a343c4 Mon Sep 17 00:00:00 2001 From: coolxitech Date: Sat, 9 Nov 2024 13:25:15 +0800 Subject: [PATCH] =?UTF-8?q?refactor(app):=20=E4=BC=98=E5=8C=96=20clearDire?= =?UTF-8?q?ctory=20=E6=96=B9=E6=B3=95=EF=BC=8C=E6=B7=BB=E5=8A=A0=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=B1=BB=E5=9E=8B=E5=A3=B0=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为 clearDirectory 方法添加了 bool 类型的返回类型声明 - 这个改动提高了代码的可读性和类型安全性 --- app/controller/Index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controller/Index.php b/app/controller/Index.php index a31c7eb..36988e2 100644 --- a/app/controller/Index.php +++ b/app/controller/Index.php @@ -138,7 +138,7 @@ class Index extends BaseController { } - private function clearDirectory($dir) + private function clearDirectory($dir): bool { // 确保路径是目录 if (!is_dir($dir)) {