Skip to content

Commit f50fe0c

Browse files
committed
Merge branch '4.1' into 4.2
* 4.1: fixed tests fixed CS fixed CS fixed CS fixed short array CS in comments fixed CS in ExpressionLanguage fixtures fixed CS in generated files fixed CS on generated container files fixed CS on Form PHP templates fixed CS on YAML fixtures fixed fixtures switched array() to []
2 parents be5cf5e + 29b2b8e commit f50fe0c

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

Command/ServerDumpPlaceholderCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ServerDumpPlaceholderCommand extends Command
2929
{
3030
private $replacedCommand;
3131

32-
public function __construct(DumpServer $server = null, array $descriptors = array())
32+
public function __construct(DumpServer $server = null, array $descriptors = [])
3333
{
3434
$this->replacedCommand = new ServerDumpCommand((new \ReflectionClass(DumpServer::class))->newInstanceWithoutConstructor(), $descriptors);
3535

DependencyInjection/DebugExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ public function load(array $configs, ContainerBuilder $container)
3737
$loader->load('services.xml');
3838

3939
$container->getDefinition('var_dumper.cloner')
40-
->addMethodCall('setMaxItems', array($config['max_items']))
41-
->addMethodCall('setMinDepth', array($config['min_depth']))
42-
->addMethodCall('setMaxString', array($config['max_string_length']));
40+
->addMethodCall('setMaxItems', [$config['max_items']])
41+
->addMethodCall('setMinDepth', [$config['min_depth']])
42+
->addMethodCall('setMaxString', [$config['max_string_length']]);
4343

4444
if (null === $config['dump_destination']) {
4545
$container->getDefinition('var_dumper.command.server_dump')

Tests/DependencyInjection/Compiler/DumpDataCollectorPassTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function testProcessWithoutFileLinkFormatParameter()
2525
$container = new ContainerBuilder();
2626
$container->addCompilerPass(new DumpDataCollectorPass());
2727

28-
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null, null, null));
28+
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', [null, null, null, null]);
2929
$container->setDefinition('data_collector.dump', $definition);
3030

3131
$container->compile();
@@ -39,7 +39,7 @@ public function testProcessWithToolbarEnabled()
3939
$container->addCompilerPass(new DumpDataCollectorPass());
4040
$requestStack = new RequestStack();
4141

42-
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null, null, $requestStack));
42+
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', [null, null, null, $requestStack]);
4343
$container->setDefinition('data_collector.dump', $definition);
4444
$container->setParameter('web_profiler.debug_toolbar.mode', WebDebugToolbarListener::ENABLED);
4545

@@ -53,7 +53,7 @@ public function testProcessWithToolbarDisabled()
5353
$container = new ContainerBuilder();
5454
$container->addCompilerPass(new DumpDataCollectorPass());
5555

56-
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null, null, new RequestStack()));
56+
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', [null, null, null, new RequestStack()]);
5757
$container->setDefinition('data_collector.dump', $definition);
5858
$container->setParameter('web_profiler.debug_toolbar.mode', WebDebugToolbarListener::DISABLED);
5959

@@ -67,7 +67,7 @@ public function testProcessWithoutToolbar()
6767
$container = new ContainerBuilder();
6868
$container->addCompilerPass(new DumpDataCollectorPass());
6969

70-
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', array(null, null, null, new RequestStack()));
70+
$definition = new Definition('Symfony\Component\HttpKernel\DataCollector\DumpDataCollector', [null, null, null, new RequestStack()]);
7171
$container->setDefinition('data_collector.dump', $definition);
7272

7373
$container->compile();

Tests/DependencyInjection/DebugExtensionTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,36 +22,36 @@ public function testLoadWithoutConfiguration()
2222
{
2323
$container = $this->createContainer();
2424
$container->registerExtension(new DebugExtension());
25-
$container->loadFromExtension('debug', array());
25+
$container->loadFromExtension('debug', []);
2626
$this->compileContainer($container);
2727

28-
$expectedTags = array(
29-
array(
28+
$expectedTags = [
29+
[
3030
'id' => 'dump',
3131
'template' => '@Debug/Profiler/dump.html.twig',
3232
'priority' => 240,
33-
),
34-
);
33+
],
34+
];
3535

3636
$this->assertSame($expectedTags, $container->getDefinition('data_collector.dump')->getTag('data_collector'));
3737
}
3838

3939
private function createContainer()
4040
{
41-
$container = new ContainerBuilder(new ParameterBag(array(
41+
$container = new ContainerBuilder(new ParameterBag([
4242
'kernel.cache_dir' => __DIR__,
4343
'kernel.charset' => 'UTF-8',
4444
'kernel.debug' => true,
45-
'kernel.bundles' => array('DebugBundle' => 'Symfony\\Bundle\\DebugBundle\\DebugBundle'),
46-
)));
45+
'kernel.bundles' => ['DebugBundle' => 'Symfony\\Bundle\\DebugBundle\\DebugBundle'],
46+
]));
4747

4848
return $container;
4949
}
5050

5151
private function compileContainer(ContainerBuilder $container)
5252
{
53-
$container->getCompilerPassConfig()->setOptimizationPasses(array());
54-
$container->getCompilerPassConfig()->setRemovingPasses(array());
53+
$container->getCompilerPassConfig()->setOptimizationPasses([]);
54+
$container->getCompilerPassConfig()->setRemovingPasses([]);
5555
$container->compile();
5656
}
5757
}

0 commit comments

Comments
 (0)