Skip to content

Commit 1e47294

Browse files
authored
Switch to modern syntax for arrays in readme (#139)
1 parent 8ae4914 commit 1e47294

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ class MyExtensionTest extends AbstractExtensionTestCase
3535
{
3636
protected function getContainerExtensions(): array
3737
{
38-
return array(
38+
return [
3939
new MyExtension()
40-
);
40+
];
4141
}
4242
}
4343
```
@@ -92,7 +92,7 @@ class MyExtensionTest extends AbstractExtensionTestCase
9292
*/
9393
public function after_loading_the_correct_parameter_has_been_set()
9494
{
95-
$this->load(array('my' => array('enabled' => 'false')));
95+
$this->load(['my' => ['enabled' => 'false']);
9696

9797
...
9898
}
@@ -149,9 +149,9 @@ class MyCompilerPassTest extends AbstractCompilerPassTestCase
149149
$this->assertContainerBuilderHasServiceDefinitionWithMethodCall(
150150
'collecting_service_id',
151151
'add',
152-
array(
152+
[
153153
new Reference('collected_service')
154-
)
154+
]
155155
);
156156
}
157157
}
@@ -270,14 +270,14 @@ class ConfigurationTest extends AbstractExtensionConfigurationTestCase
270270
*/
271271
public function it_converts_extension_elements_to_extensions()
272272
{
273-
$expectedConfiguration = array(
274-
'extensions' => array('twig.extension.foo', 'twig.extension.bar')
275-
);
273+
$expectedConfiguration = [
274+
'extensions' => ['twig.extension.foo', 'twig.extension.bar']
275+
];
276276

277-
$sources = array(
277+
$sources = [
278278
__DIR__ . '/Fixtures/config.yml',
279279
__DIR__ . '/Fixtures/config.xml',
280-
);
280+
];
281281

282282
$this->assertProcessedConfigurationEquals($expectedConfiguration, $sources);
283283
}
@@ -314,10 +314,10 @@ the given index, and its value is the given value.</dd>
314314
<dt><code>assertContainerBuilderHasServiceDefinitionWithServiceLocatorArgument($serviceId, $argumentIndex, $expectedValue)</code></dt>
315315
<dd>Assert that the <code>ContainerBuilder</code> for this test has a service definition with the given id, which has an argument
316316
at the given index, and its value is a ServiceLocator with a reference-map equal to the given value.</dd>
317-
<dt><code>assertContainerBuilderHasServiceDefinitionWithMethodCall($serviceId, $method, array $arguments = array(), $index = null)</code></dt>
317+
<dt><code>assertContainerBuilderHasServiceDefinitionWithMethodCall($serviceId, $method, array $arguments = [], $index = null)</code></dt>
318318
<dd>Assert that the <code>ContainerBuilder</code> for this test has a service definition with the given id, which has a method call to
319319
the given method with the given arguments. If index is provided, invocation index order of method call is asserted as well.</dd>
320-
<dt><code>assertContainerBuilderHasServiceDefinitionWithTag($serviceId, $tag, array $attributes = array())</code></dt>
320+
<dt><code>assertContainerBuilderHasServiceDefinitionWithTag($serviceId, $tag, array $attributes = [])</code></dt>
321321
<dd>Assert that the <code>ContainerBuilder</code> for this test has a service definition with the given id, which has the given tag with the given arguments.</dd>
322322
<dt><code>assertContainerBuilderHasServiceDefinitionWithParent($serviceId, $parentServiceId)</code></dt>
323323
<dd>Assert that the <code>ContainerBuilder</code> for this test has a service definition with the given id which is a decorated service and it has the given parent service.</dd>

0 commit comments

Comments
 (0)