Update ClassLoader.php

Fix 'must be an instance of Closure, array given' error when $closure is a object method.
This commit is contained in:
Juan Antonio Tubio
2019-02-08 21:36:58 +01:00
committed by GitHub
parent 153f8630f2
commit 2a3238f30a

View File

@@ -53,7 +53,7 @@ class ClassLoader implements IClassLoader
* @return mixed
* @throws NotFoundHttpException
*/
public function loadClosure(\Closure $closure, array $parameters)
public function loadClosure(Callable $closure, array $parameters)
{
if ($this->useDependencyInjection === true) {
$container = $this->getContainer();
@@ -115,4 +115,4 @@ class ClassLoader implements IClassLoader
return $this->useDependencyInjection;
}
}
}