Skip to content

Commit 7d024e7

Browse files
committed
Cache: used typehint 'callable' (suppresses lazyloading of classes)
1 parent df86851 commit 7d024e7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Caching/Cache.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,10 +260,9 @@ public function clean(array $conditions = null): void
260260

261261
/**
262262
* Caches results of function/method calls.
263-
* @param mixed
264263
* @return mixed
265264
*/
266-
public function call($function)
265+
public function call(callable $function)
267266
{
268267
$key = func_get_args();
269268
if (is_array($function) && is_object($function[0])) {
@@ -277,9 +276,8 @@ public function call($function)
277276

278277
/**
279278
* Caches results of function/method calls.
280-
* @param mixed
281279
*/
282-
public function wrap($function, array $dependencies = null): \Closure
280+
public function wrap(callable $function, array $dependencies = null): \Closure
283281
{
284282
return function () use ($function, $dependencies) {
285283
$key = [$function, func_get_args()];

0 commit comments

Comments
 (0)