refacor: improve cache interface (#3492)

* fix: proper typehint on setScope

* refactor: type hint setKey()

* typehint
This commit is contained in:
Dag 2023-07-06 15:10:30 +02:00 committed by GitHub
parent f8801d8cb3
commit caac7f572c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 56 additions and 220 deletions

View file

@ -4,11 +4,11 @@ declare(strict_types=1);
class NullCache implements CacheInterface
{
public function setScope($scope)
public function setScope(string $scope): void
{
}
public function setKey($key)
public function setKey(array $key): void
{
}
@ -16,7 +16,7 @@ class NullCache implements CacheInterface
{
}
public function saveData($data)
public function saveData($data): void
{
}
@ -25,7 +25,7 @@ class NullCache implements CacheInterface
return null;
}
public function purgeCache($seconds)
public function purgeCache(int $seconds): void
{
}
}