Mercurial > hg > isophonics-drupal-site
diff vendor/symfony/routing/RouteCollectionBuilder.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | c2387f117808 |
children |
line wrap: on
line diff
--- a/vendor/symfony/routing/RouteCollectionBuilder.php Tue Jul 10 15:07:59 2018 +0100 +++ b/vendor/symfony/routing/RouteCollectionBuilder.php Thu Feb 28 13:21:36 2019 +0000 @@ -25,18 +25,18 @@ /** * @var Route[]|RouteCollectionBuilder[] */ - private $routes = array(); + private $routes = []; private $loader; - private $defaults = array(); + private $defaults = []; private $prefix; private $host; private $condition; - private $requirements = array(); - private $options = array(); + private $requirements = []; + private $options = []; private $schemes; private $methods; - private $resources = array(); + private $resources = []; public function __construct(LoaderInterface $loader = null) { @@ -46,7 +46,7 @@ /** * Import an external routing resource and returns the RouteCollectionBuilder. * - * $routes->import('blog.yml', '/blog'); + * $routes->import('blog.yml', '/blog'); * * @param mixed $resource * @param string|null $prefix @@ -332,7 +332,7 @@ $methods = implode('_', $route->getMethods()).'_'; $routeName = $methods.$route->getPath(); - $routeName = str_replace(array('/', ':', '|', '-'), '_', $routeName); + $routeName = str_replace(['/', ':', '|', '-'], '_', $routeName); $routeName = preg_replace('/[^a-z0-9A-Z_.]+/', '', $routeName); // Collapse consecutive underscores down into a single underscore. @@ -360,7 +360,7 @@ if ($this->loader->supports($resource, $type)) { $collections = $this->loader->load($resource, $type); - return is_array($collections) ? $collections : array($collections); + return \is_array($collections) ? $collections : [$collections]; } if (null === $resolver = $this->loader->getResolver()) { @@ -373,6 +373,6 @@ $collections = $loader->load($resource, $type); - return is_array($collections) ? $collections : array($collections); + return \is_array($collections) ? $collections : [$collections]; } }