mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-21 06:07:50 +09:00
Update dependencies
This commit is contained in:
@@ -31,11 +31,11 @@ final class CompletionInput extends ArgvInput
|
||||
public const TYPE_OPTION_NAME = 'option_name';
|
||||
public const TYPE_NONE = 'none';
|
||||
|
||||
private $tokens;
|
||||
private $currentIndex;
|
||||
private $completionType;
|
||||
private $completionName = null;
|
||||
private $completionValue = '';
|
||||
private array $tokens;
|
||||
private int $currentIndex;
|
||||
private string $completionType;
|
||||
private ?string $completionName = null;
|
||||
private string $completionValue = '';
|
||||
|
||||
/**
|
||||
* Converts a terminal string into tokens.
|
||||
@@ -64,9 +64,6 @@ final class CompletionInput extends ArgvInput
|
||||
return $input;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function bind(InputDefinition $definition): void
|
||||
{
|
||||
parent::bind($definition);
|
||||
@@ -84,7 +81,7 @@ final class CompletionInput extends ArgvInput
|
||||
return;
|
||||
}
|
||||
|
||||
if (null !== $option && $option->acceptValue()) {
|
||||
if ($option?->acceptValue()) {
|
||||
$this->completionType = self::TYPE_OPTION_VALUE;
|
||||
$this->completionName = $option->getName();
|
||||
$this->completionValue = $optionValue ?: (!str_starts_with($optionToken, '--') ? substr($optionToken, 2) : '');
|
||||
@@ -97,7 +94,7 @@ final class CompletionInput extends ArgvInput
|
||||
if ('-' === $previousToken[0] && '' !== trim($previousToken, '-')) {
|
||||
// check if previous option accepted a value
|
||||
$previousOption = $this->getOptionFromToken($previousToken);
|
||||
if (null !== $previousOption && $previousOption->acceptValue()) {
|
||||
if ($previousOption?->acceptValue()) {
|
||||
$this->completionType = self::TYPE_OPTION_VALUE;
|
||||
$this->completionName = $previousOption->getName();
|
||||
$this->completionValue = $relevantToken;
|
||||
@@ -144,7 +141,9 @@ final class CompletionInput extends ArgvInput
|
||||
* TYPE_OPTION_NAME when completing the name of an input option
|
||||
* TYPE_NONE when nothing should be completed
|
||||
*
|
||||
* @return string One of self::TYPE_* constants. TYPE_OPTION_NAME and TYPE_NONE are already implemented by the Console component
|
||||
* TYPE_OPTION_NAME and TYPE_NONE are already implemented by the Console component.
|
||||
*
|
||||
* @return self::TYPE_*
|
||||
*/
|
||||
public function getCompletionType(): string
|
||||
{
|
||||
@@ -183,7 +182,7 @@ final class CompletionInput extends ArgvInput
|
||||
{
|
||||
try {
|
||||
return parent::parseToken($token, $parseOptions);
|
||||
} catch (RuntimeException $e) {
|
||||
} catch (RuntimeException) {
|
||||
// suppress errors, completed input is almost never valid
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user