diff vendor/symfony/routing/Router.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children af1871eacc83
line wrap: on
line diff
--- a/vendor/symfony/routing/Router.php	Tue Jul 10 15:07:59 2018 +0100
+++ b/vendor/symfony/routing/Router.php	Thu Feb 28 13:21:36 2019 +0000
@@ -11,19 +11,19 @@
 
 namespace Symfony\Component\Routing;
 
+use Psr\Log\LoggerInterface;
+use Symfony\Component\Config\ConfigCacheFactory;
+use Symfony\Component\Config\ConfigCacheFactoryInterface;
+use Symfony\Component\Config\ConfigCacheInterface;
 use Symfony\Component\Config\Loader\LoaderInterface;
-use Symfony\Component\Config\ConfigCacheInterface;
-use Symfony\Component\Config\ConfigCacheFactoryInterface;
-use Symfony\Component\Config\ConfigCacheFactory;
-use Psr\Log\LoggerInterface;
+use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
+use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\Routing\Generator\ConfigurableRequirementsInterface;
+use Symfony\Component\Routing\Generator\Dumper\GeneratorDumperInterface;
 use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
-use Symfony\Component\Routing\Generator\Dumper\GeneratorDumperInterface;
+use Symfony\Component\Routing\Matcher\Dumper\MatcherDumperInterface;
 use Symfony\Component\Routing\Matcher\RequestMatcherInterface;
 use Symfony\Component\Routing\Matcher\UrlMatcherInterface;
-use Symfony\Component\Routing\Matcher\Dumper\MatcherDumperInterface;
-use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
 
 /**
  * The Router class is an example of the integration of all pieces of the
@@ -66,7 +66,7 @@
     /**
      * @var array
      */
-    protected $options = array();
+    protected $options = [];
 
     /**
      * @var LoggerInterface|null
@@ -81,7 +81,7 @@
     /**
      * @var ExpressionFunctionProviderInterface[]
      */
-    private $expressionLanguageProviders = array();
+    private $expressionLanguageProviders = [];
 
     /**
      * @param LoaderInterface $loader   A LoaderInterface instance
@@ -90,7 +90,7 @@
      * @param RequestContext  $context  The context
      * @param LoggerInterface $logger   A logger instance
      */
-    public function __construct(LoaderInterface $loader, $resource, array $options = array(), RequestContext $context = null, LoggerInterface $logger = null)
+    public function __construct(LoaderInterface $loader, $resource, array $options = [], RequestContext $context = null, LoggerInterface $logger = null)
     {
         $this->loader = $loader;
         $this->resource = $resource;
@@ -124,7 +124,7 @@
      */
     public function setOptions(array $options)
     {
-        $this->options = array(
+        $this->options = [
             'cache_dir' => null,
             'debug' => false,
             'generator_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator',
@@ -137,10 +137,10 @@
             'matcher_cache_class' => 'ProjectUrlMatcher',
             'resource_type' => null,
             'strict_requirements' => true,
-        );
+        ];
 
         // check option names and live merge, if errors are encountered Exception will be thrown
-        $invalid = array();
+        $invalid = [];
         foreach ($options as $key => $value) {
             if (array_key_exists($key, $this->options)) {
                 $this->options[$key] = $value;
@@ -235,7 +235,7 @@
     /**
      * {@inheritdoc}
      */
-    public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)
+    public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH)
     {
         return $this->getGenerator()->generate($name, $parameters, $referenceType);
     }
@@ -293,10 +293,10 @@
                     }
                 }
 
-                $options = array(
+                $options = [
                     'class' => $this->options['matcher_cache_class'],
                     'base_class' => $this->options['matcher_base_class'],
-                );
+                ];
 
                 $cache->write($dumper->dump($options), $this->getRouteCollection()->getResources());
             }
@@ -327,10 +327,10 @@
                 function (ConfigCacheInterface $cache) {
                     $dumper = $this->getGeneratorDumperInstance();
 
-                    $options = array(
+                    $options = [
                         'class' => $this->options['generator_cache_class'],
                         'base_class' => $this->options['generator_base_class'],
-                    );
+                    ];
 
                     $cache->write($dumper->dump($options), $this->getRouteCollection()->getResources());
                 }
@@ -375,7 +375,7 @@
      * Provides the ConfigCache factory implementation, falling back to a
      * default implementation if necessary.
      *
-     * @return ConfigCacheFactoryInterface $configCacheFactory
+     * @return ConfigCacheFactoryInterface
      */
     private function getConfigCacheFactory()
     {