Skip to content

Commit ae04e46

Browse files
committed
Updated CacheContract::__invoke() signature
1 parent 1f2a942 commit ae04e46

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

lib/Phpfastcache/CacheContract.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,6 @@ public function __construct(CacheItemPoolInterface $cacheInstance)
2929
}
3030

3131
/**
32-
* @param string $cacheKey
33-
* @param callable $callback
34-
* @param DateInterval|integer|null $expiresAfter
35-
* @return mixed
3632
* @throws InvalidArgumentException
3733
*/
3834
public function get(string $cacheKey, callable $callback, DateInterval|int $expiresAfter = null): mixed
@@ -54,8 +50,11 @@ public function get(string $cacheKey, callable $callback, DateInterval|int $expi
5450
return $cacheItem->get();
5551
}
5652

57-
public function __invoke(...$args): mixed
53+
/**
54+
* @throws InvalidArgumentException
55+
*/
56+
public function __invoke(string $cacheKey, callable $callback, DateInterval|int $expiresAfter = null): mixed
5857
{
59-
return $this->get(...$args);
58+
return $this->get($cacheKey, $callback, $expiresAfter);
6059
}
6160
}

lib/Phpfastcache/EventManager.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
namespace Phpfastcache;
1717

18-
use BadMethodCallException;
1918
use Phpfastcache\Event\EventManagerInterface;
2019
use Phpfastcache\Exceptions\PhpfastcacheEventManagerException;
2120
use Phpfastcache\Exceptions\PhpfastcacheInvalidArgumentException;

0 commit comments

Comments
 (0)