mirror of
https://github.com/netcccyun/dnsmgr.git
synced 2026-02-21 15:31:12 +08:00
refactor(app): 优化 clearDirectory 方法,添加返回类型声明
- 为 clearDirectory 方法添加了 bool 类型的返回类型声明 - 这个改动提高了代码的可读性和类型安全性
This commit is contained in:
parent
1e37e3ef71
commit
6944bfa1d9
@ -138,7 +138,7 @@ class Index extends BaseController
|
||||
{
|
||||
|
||||
}
|
||||
private function clearDirectory($dir)
|
||||
private function clearDirectory($dir): bool
|
||||
{
|
||||
// 确保路径是目录
|
||||
if (!is_dir($dir)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user