updated packages

This commit is contained in:
2019-05-18 09:06:43 +00:00
parent 901d16349e
commit e9487fa58a
2025 changed files with 30366 additions and 49653 deletions

View File

@@ -33,12 +33,12 @@ class PhpGeneratorDumper extends GeneratorDumper
*
* @return string A PHP class representing the generator class
*/
public function dump(array $options = array())
public function dump(array $options = [])
{
$options = array_merge(array(
$options = array_merge([
'class' => 'ProjectUrlGenerator',
'base_class' => 'Symfony\\Component\\Routing\\Generator\\UrlGenerator',
), $options);
], $options);
return <<<EOF
<?php
@@ -80,11 +80,11 @@ EOF;
*/
private function generateDeclaredRoutes()
{
$routes = "array(\n";
$routes = "[\n";
foreach ($this->getRoutes()->all() as $name => $route) {
$compiledRoute = $route->compile();
$properties = array();
$properties = [];
$properties[] = $compiledRoute->getVariables();
$properties[] = $route->getDefaults();
$properties[] = $route->getRequirements();
@@ -94,7 +94,7 @@ EOF;
$routes .= sprintf(" '%s' => %s,\n", $name, PhpMatcherDumper::export($properties));
}
$routes .= ' )';
$routes .= ' ]';
return $routes;
}
@@ -107,7 +107,7 @@ EOF;
private function generateGenerateMethod()
{
return <<<'EOF'
public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)
public function generate($name, $parameters = [], $referenceType = self::ABSOLUTE_PATH)
{
$locale = $parameters['_locale']
?? $this->context->getParameter('_locale')