Aggiornato Composer
This commit is contained in:
@@ -85,7 +85,7 @@ abstract class AnnotationClassLoader implements LoaderInterface
|
||||
*/
|
||||
protected $defaultRouteIndex = 0;
|
||||
|
||||
public function __construct(Reader $reader = null, string $env = null)
|
||||
public function __construct(?Reader $reader = null, ?string $env = null)
|
||||
{
|
||||
$this->reader = $reader;
|
||||
$this->env = $env;
|
||||
@@ -108,7 +108,7 @@ abstract class AnnotationClassLoader implements LoaderInterface
|
||||
*
|
||||
* @throws \InvalidArgumentException When route can't be parsed
|
||||
*/
|
||||
public function load($class, string $type = null)
|
||||
public function load($class, ?string $type = null)
|
||||
{
|
||||
if (!class_exists($class)) {
|
||||
throw new \InvalidArgumentException(sprintf('Class "%s" does not exist.', $class));
|
||||
@@ -239,7 +239,7 @@ abstract class AnnotationClassLoader implements LoaderInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supports($resource, string $type = null)
|
||||
public function supports($resource, ?string $type = null)
|
||||
{
|
||||
return \is_string($resource) && preg_match('/^(?:\\\\?[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)+$/', $resource) && (!$type || 'annotation' === $type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user