Skip to content

Commit 352f737

Browse files
committed
Update readme to use short array syntax in all examples
There was a mix of the old and new array syntaxes
1 parent f801127 commit 352f737

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ class MyCompletionCommand extends CompletionCommand
9696
{
9797
protected function configureCompletion(CompletionHandler $handler)
9898
{
99-
$handler->addHandlers(array(
99+
$handler->addHandlers([
100100
// Instances of Completion go here.
101101
// See below for examples.
102-
));
102+
]);
103103
}
104104
}
105105
```
@@ -119,12 +119,12 @@ $handler->addHandler(
119119
'walk', // match command name
120120
'direction', // match argument/option name
121121
Completion::TYPE_ARGUMENT, // match definition type (option/argument)
122-
array( // array or callback for results
122+
[ // array or callback for results
123123
'north',
124124
'east',
125125
'south',
126126
'west'
127-
)
127+
]
128128
)
129129
);
130130
```
@@ -173,11 +173,11 @@ $handler->addHandler(
173173
Completion::ALL_COMMANDS,
174174
'weather',
175175
Completion::TYPE_OPTION,
176-
array(
176+
[
177177
'raining',
178178
'sunny',
179179
'everything is on fire!'
180-
)
180+
]
181181
)
182182
);
183183
```

0 commit comments

Comments
 (0)