🔧
This commit is contained in:
@@ -26,7 +26,7 @@ class AttributeDirectoryLoader extends AttributeFileLoader
|
||||
/**
|
||||
* @throws \InvalidArgumentException When the directory does not exist or its routes cannot be parsed
|
||||
*/
|
||||
public function load(mixed $path, string $type = null): ?RouteCollection
|
||||
public function load(mixed $path, ?string $type = null): ?RouteCollection
|
||||
{
|
||||
if (!is_dir($dir = $this->locator->locate($path))) {
|
||||
return parent::supports($path, $type) ? parent::load($path, $type) : new RouteCollection();
|
||||
@@ -61,7 +61,7 @@ class AttributeDirectoryLoader extends AttributeFileLoader
|
||||
return $collection;
|
||||
}
|
||||
|
||||
public function supports(mixed $resource, string $type = null): bool
|
||||
public function supports(mixed $resource, ?string $type = null): bool
|
||||
{
|
||||
if (!\is_string($resource)) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user