Aggiornato Composer
This commit is contained in:
@@ -45,7 +45,7 @@ class XmlFileLoader extends FileLoader
|
||||
* @throws \InvalidArgumentException when the file cannot be loaded or when the XML cannot be
|
||||
* parsed because it does not validate against the scheme
|
||||
*/
|
||||
public function load($file, string $type = null)
|
||||
public function load($file, ?string $type = null)
|
||||
{
|
||||
$path = $this->locator->locate($file);
|
||||
|
||||
@@ -102,7 +102,7 @@ class XmlFileLoader extends FileLoader
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supports($resource, string $type = null)
|
||||
public function supports($resource, ?string $type = null)
|
||||
{
|
||||
return \is_string($resource) && 'xml' === pathinfo($resource, \PATHINFO_EXTENSION) && (!$type || 'xml' === $type);
|
||||
}
|
||||
@@ -195,7 +195,7 @@ class XmlFileLoader extends FileLoader
|
||||
$this->setCurrentDir(\dirname($path));
|
||||
|
||||
/** @var RouteCollection[] $imported */
|
||||
$imported = $this->import($resource, ('' !== $type ? $type : null), false, $file, $exclude) ?: [];
|
||||
$imported = $this->import($resource, '' !== $type ? $type : null, false, $file, $exclude) ?: [];
|
||||
|
||||
if (!\is_array($imported)) {
|
||||
$imported = [$imported];
|
||||
|
||||
Reference in New Issue
Block a user