refactor(app): 优化 clearDirectory 方法,添加返回类型声明

- 为 clearDirectory 方法添加了 bool 类型的返回类型声明
- 这个改动提高了代码的可读性和类型安全性
This commit is contained in:
coolxitech 2024-11-09 13:25:15 +08:00
parent 1e37e3ef71
commit 6944bfa1d9

View File

@ -138,7 +138,7 @@ class Index extends BaseController
{
}
private function clearDirectory($dir)
private function clearDirectory($dir): bool
{
// 确保路径是目录
if (!is_dir($dir)) {