Upgrade framework

This commit is contained in:
mischa.spelt committed 2023-11-14 16:54:35 +01:00
1 parent 1648a5cd42
commit 4fcf6fffcc
10548 files changed
+693131 -466691

No files matched your search

+3 -8
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);
}