We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fc00cc commit c01a4afCopy full SHA for c01a4af
1 file changed
src/CLI/CLI.php
@@ -300,7 +300,18 @@ protected function getParams(Hook $hook): array
300
$params = [];
301
302
foreach ($hook->getParams() as $key => $param) {
303
- $value = (isset($this->args[$key])) ? $this->args[$key] : $param['default'];
+ $value = $param['default'];
304
+
305
+ if (isset($this->args[$key])) {
306
+ $value = $this->args[$key];
307
+ } else {
308
+ foreach ($param['aliases'] ?? [] as $alias) {
309
+ if (isset($this->args[$alias])) {
310
+ $value = $this->args[$alias];
311
+ break;
312
+ }
313
314
315
316
$this->validate($key, $param, $value);
317
0 commit comments