Upgrade framework

This commit is contained in:
2023-11-14 16:54:35 +01:00
parent 1648a5cd42
commit 4fcf6fffcc
10548 changed files with 693138 additions and 466698 deletions

View File

@@ -25,21 +25,16 @@ class ClosureLoader extends Loader
{
/**
* Loads a Closure.
*
* @param \Closure $closure A Closure
* @param string|null $type The resource type
*
* @return RouteCollection A RouteCollection instance
*/
public function load($closure, $type = null)
public function load(mixed $closure, string $type = null): RouteCollection
{
return $closure();
return $closure($this->env);
}
/**
* {@inheritdoc}
*/
public function supports($resource, $type = null)
public function supports(mixed $resource, string $type = null): bool
{
return $resource instanceof \Closure && (!$type || 'closure' === $type);
}