Use short array syntax (#135)
This commit is contained in:
committed by
Kevin Papst
parent
4c6158c1ea
commit
5527f29caf
@@ -114,13 +114,13 @@ class DoctrineCompilerPass implements CompilerPassInterface
|
||||
$ormConfig = $container->getDefinition('doctrine.orm.default_configuration');
|
||||
|
||||
foreach ($sql['string_functions'] as $name => $function) {
|
||||
$ormConfig->addMethodCall('addCustomStringFunction', array($name, $function));
|
||||
$ormConfig->addMethodCall('addCustomStringFunction', [$name, $function]);
|
||||
}
|
||||
foreach ($sql['numeric_functions'] as $name => $function) {
|
||||
$ormConfig->addMethodCall('addCustomNumericFunction', array($name, $function));
|
||||
$ormConfig->addMethodCall('addCustomNumericFunction', [$name, $function]);
|
||||
}
|
||||
foreach ($sql['datetime_functions'] as $name => $function) {
|
||||
$ormConfig->addMethodCall('addCustomDatetimeFunction', array($name, $function));
|
||||
$ormConfig->addMethodCall('addCustomDatetimeFunction', [$name, $function]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class Configuration implements ConfigurationInterface
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
->defaultValue(array())
|
||||
->defaultValue([])
|
||||
->end()
|
||||
|
||||
->arrayNode('rates')
|
||||
@@ -84,27 +84,27 @@ class Configuration implements ConfigurationInterface
|
||||
->useAttributeAsKey('key')
|
||||
->isRequired()
|
||||
->prototype('scalar')->end()
|
||||
->defaultValue(array(
|
||||
->defaultValue([
|
||||
'default' => 'App\Controller\InvoiceController::invoiceAction',
|
||||
))
|
||||
])
|
||||
->end()
|
||||
->arrayNode('calculator')
|
||||
->requiresAtLeastOneElement()
|
||||
->useAttributeAsKey('key')
|
||||
->isRequired()
|
||||
->prototype('scalar')->end()
|
||||
->defaultValue(array(
|
||||
->defaultValue([
|
||||
'default' => 'App\Invoice\DefaultCalculator',
|
||||
))
|
||||
])
|
||||
->end()
|
||||
->arrayNode('number_generator')
|
||||
->requiresAtLeastOneElement()
|
||||
->useAttributeAsKey('key')
|
||||
->isRequired()
|
||||
->prototype('scalar')->end()
|
||||
->defaultValue(array(
|
||||
->defaultValue([
|
||||
'default' => 'App\Invoice\DateNumberGenerator',
|
||||
))
|
||||
])
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
|
||||
Reference in New Issue
Block a user