@@ -24,41 +24,41 @@ $array = [
2424 ],
2525];
2626
27- $array = array(
27+ $array = [
2828 'data' => 'my-data',
2929 'animal' => 'squirrel',
30- 'inline' => array() ,
31- 'inline3' => array( 'one', 'two', 'three') ,
32- 'inline_long_ok' => array( 'one', 'two', 'three', 'four', 'five') ,
33- 'inline_long_nok' => array( 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve') ,
34- 'nested' => array() ,
35- 'nested2' => array(
30+ 'inline' => [] ,
31+ 'inline3' => [ 'one', 'two', 'three'] ,
32+ 'inline_long_ok' => [ 'one', 'two', 'three', 'four', 'five'] ,
33+ 'inline_long_nok' => [ 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve'] ,
34+ 'nested' => [] ,
35+ 'nested2' => [
3636 'a',
37- ) ,
38- 'nested3' => array(
37+ ] ,
38+ 'nested3' => [
3939 'a' => 'a',
40- 'b' => array(
40+ 'b' => [
4141 'c',
42- ) ,
43- ) ,
44- ) ;
42+ ] ,
43+ ] ,
44+ ] ;
4545
46- $derivatives["entity:$entity_type_id"] = array(
47- 'label' => t('Create @entity_type path alias', array( '@entity_type' => $entity_type->getLowercaseLabel()) ),
46+ $derivatives["entity:$entity_type_id"] = [
47+ 'label' => t('Create @entity_type path alias', [ '@entity_type' => $entity_type->getLowercaseLabel()] ),
4848 'category' => t('Path'),
4949 'entity_type_id' => $entity_type_id,
50- 'context' => array(
50+ 'context' => [
5151 'entity' => ContextDefinition::create("entity:$entity_type_id")
5252 ->setLabel($entity_type->getLabel())
5353 ->setRequired(TRUE)
54- ->setDescription(t('The @entity_type for which to create a path alias.', array( '@entity_type' => $entity_type->getLowercaseLabel()) )),
54+ ->setDescription(t('The @entity_type for which to create a path alias.', [ '@entity_type' => $entity_type->getLowercaseLabel()] )),
5555 'alias' => ContextDefinition::create('string')
5656 ->setLabel(t('Path alias'))
5757 ->setRequired(TRUE)
5858 ->setDescription(t("Specify an alternative path by which the content can be accessed. For example, 'about' for an about page. Use a relative path and do not add a trailing slash.")),
59- ) ,
60- 'provides' => array() ,
61- ) + $base_plugin_definition;
59+ ] ,
60+ 'provides' => [] ,
61+ ] + $base_plugin_definition;
6262
6363$derivatives["entity:$entity_type_id"] = [
6464 'label' => t('Create @entity_type path alias', ['@entity_type' => $entity_type->getLowercaseLabel()]),
@@ -77,31 +77,31 @@ $derivatives["entity:$entity_type_id"] = [
7777 'provides' => [],
7878] + $base_plugin_definition;
7979
80- $a = array( '1', '2', array(
80+ $a = [ '1', '2', [
8181 '3',
82- ) ,
83- ) ;
82+ ] ,
83+ ] ;
8484
8585$a = ['1', '2', [
8686 '3',
8787],
8888];
8989
90- $a = array(
90+ $a = [
9191 'x' => 'y',
92- ) ;
92+ ] ;
9393
9494$backend->expects($this->exactly(1))
9595 ->method('get')
9696 ->will($this->onConsecutiveCalls(
97- (object) array(
98- 'data' => array(
99- 'hook' => array(
100- 'module_handler_test' => array() ,
101- 'module_handler_test_missing' => array() ,
102- ) ,
103- ) ,
104- )
97+ (object) [
98+ 'data' => [
99+ 'hook' => [
100+ 'module_handler_test' => [] ,
101+ 'module_handler_test_missing' => [] ,
102+ ] ,
103+ ] ,
104+ ]
105105 ));
106106
107107$backend->expects($this->exactly(1))
@@ -121,14 +121,14 @@ $backend->expects($this->exactly(1))
121121 * Nested closure in an array should not throw errors.
122122 */
123123function mymodule_libraries_info() {
124- $libraries['some-library'] = array(
124+ $libraries['some-library'] = [
125125 'xautoload' => function ($adapter) {
126126 /** @var \Drupal\xautoload\Adapter\LocalDirectoryAdapter $adapter */
127127 // Scan sites/all/libraries/some-library/composer.json to look for
128128 // autoload information.
129129 $adapter->composerJson('composer.json');
130130 },
131- ) ;
131+ ] ;
132132 return $libraries;
133133}
134134
0 commit comments