Quellcode durchsuchen

refactor(LCache): 将 CacheItem 类中的 isHit 属性类型改为 bool

- 将 CacheItem 类中的 isHit 属性从无类型改为 bool 类型
-此修改提高了代码的类型安全性和
notfff vor 7 Monaten
Ursprung
Commit
b3bbea6d4e
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      app/Module/LCache/CacheItem.php

+ 1 - 1
app/Module/LCache/CacheItem.php

@@ -17,7 +17,7 @@ class CacheItem implements CacheItemInterface
 
     public mixed $value;
 
-    public $isHit = true;
+    public bool $isHit;
 
 
     public function __construct(string $key, mixed $value = null, int $create_ts = 0, int $ttl = 0)