8000 minor #43606 [Console] Remove unused private elements (derrabus) · symfony/symfony@fe48ba6 · GitHub
[go: up one dir, main page]

Skip to content
< 8000 /react-partial>

Commit fe48ba6

Browse files
committed
minor #43606 [Console] Remove unused private elements (derrabus)
This PR was merged into the 5.4 branch. Discussion ---------- [Console] Remove unused private elements | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | N/A | License | MIT | Doc PR | N/A Commits ------- ca9ae81 [Console] Remove unused elements
2 parents 6a6bc7d + ca9ae81 commit fe48ba6

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/Symfony/Component/Console/Completion/CompletionInput.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ final class CompletionInput extends ArgvInput
3333

3434
private $tokens;
3535
private $currentIndex;
36-
private $indexToArgumentIndex = [];
3736
private $completionType;
3837
private $completionName = null;
3938
private $completionValue = '';
@@ -58,7 +57,7 @@ public static function fromString(string $inputStr, int $currentIndex): self
5857
*/
5958
public static function fromTokens(array $tokens, int $currentIndex): self
6059
{
61-
$input = new static($tokens);
60+
$input = new self($tokens);
6261
$input->tokens = $tokens;
6362
$input->currentIndex = $currentIndex;
6463

@@ -191,17 +190,6 @@ protected function parseToken(string $token, bool $parseOptions): bool
191190
return $parseOptions;
192191
}
193192

194-
private function getOptionValueFromToken(string $optionToken): string
195-
{
196-
if (str_starts_with($optionToken, '--')) {
197-
// long option name
198-
return $this->getParameterOption($optionToken) ?: '';
199-
}
200-
201-
// short option name (might include value already if it directly followed the name)
202-
return $this->getParameterOption(substr($optionToken, 0, 2)) ?: '';
203-
}
204-
205193
private function getOptionFromToken(string $optionToken): ?InputOption
206194
{
207195
$optionName = ltrim($optionToken, '-');

0 commit comments

Comments
 (0)
0