@@ -317,7 +317,7 @@ public function getId(): string
317317 * @param \DateTimeImmutable $expires The timestamp the data expires.
318318 * @param string|null $tag An extra tag that can be used to verify the validity of the cached data.
319319 */
320- public function addCacheItem (string $ id , string $ data , DateTimeImmutable $ expires , string $ tag = null ): void
320+ public function addCacheItem (string $ id , string $ data , DateTimeImmutable $ expires , ? string $ tag = null ): void
321321 {
322322 $ sysUtils = new Utils \System ();
323323 $ cacheFile = strval ($ this ->cacheDirectory ) . '/ ' . $ id ;
@@ -349,7 +349,7 @@ public function addCacheItem(string $id, string $data, DateTimeImmutable $expire
349349 * @param string|null $tag The tag that was passed to addCacheItem.
350350 * @return bool TRUE if the data is valid, FALSE if not.
351351 */
352- public function isCacheValid (string $ id , string $ tag = null ): bool
352+ public function isCacheValid (string $ id , ? string $ tag = null ): bool
353353 {
354354 $ cacheFile = strval ($ this ->cacheDirectory ) . '/ ' . $ id ;
355355 if (!file_exists ($ cacheFile )) {
@@ -393,7 +393,7 @@ public function isCacheValid(string $id, string $tag = null): bool
393393 * @param string|null $tag The tag that was passed to addCacheItem.
394394 * @return string|null The cache item, or NULL if it isn't cached or if it is expired.
395395 */
396- public function getCacheItem (string $ id , string $ tag = null ): ?string
396+ public function getCacheItem (string $ id , ? string $ tag = null ): ?string
397397 {
398398 if (!$ this ->isCacheValid ($ id , $ tag )) {
399399 return null ;
0 commit comments