You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewLogicException(sprintf('Closure for "%s" "%s" must return an array or null. Got "%s".', $input->getCompletionType(), $input->getCompletionName(), get_debug_type($values)));
338
-
}
339
-
}
340
-
341
-
$suggestions->suggestValues($values);
342
328
}
343
329
344
330
/**
@@ -449,30 +435,16 @@ public function getNativeDefinition(): InputDefinition
449
435
*
450
436
* @param int|null $mode The argument mode: InputArgument::REQUIRED or InputArgument::OPTIONAL
451
437
* @param mixed $default The default value (for InputArgument::OPTIONAL mode only)
438
+
* @param array|Closure(CompletionInput):array $suggestedValues The values used for input completion
452
439
*
453
440
* @throws InvalidArgumentException When argument mode is not valid
->addArgument('shell', InputArgument::OPTIONAL, 'The shell type (e.g. "bash"), the value of the "$SHELL" env var will be used if this is not given', null, $this->getSupportedShells())
80
79
->addOption('debug', null, InputOption::VALUE_NONE, 'Tail the completion debug log')
if ($valuesinstanceof \Closure && !\is_array($values = $values($input))) {
125
+
thrownewLogicException(sprintf('Closure for "%s" "%s" must return an array. Got "%s".', $input->getCompletionType(), $input->getCompletionName(), get_debug_type($values)));
if ($valuesinstanceof \Closure && \is_array($values = $values($input))) {
211
+
thrownewLogicException(sprintf('Closure for "%s" "%s" must return an array. Got "%s".', $input->getCompletionType(), $input->getCompletionName(), get_debug_type($values)));
0 commit comments