8000 Some cleanups · s7ntech/symfony@1fbd176 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1fbd176

Browse files
lmcdstof
authored andcommitted
Some cleanups
1 parent 64e2c92 commit 1fbd176

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/Symfony/Component/Console/Helper/DialogHelper.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ class DialogHelper extends Helper
2626
/**
2727
* Asks a question to the user.
2828
*
29-
* @param OutputInterface $output An Output instance
30-
* @param string|array $question The question to ask
31-
* @param string $default The default answer if none is given by the user
29+
* @param OutputInterface $output An Output instance
30+
* @param string|array $question The question to ask
31+
* @param string $default The default answer if none is given by the user
32+
* @param array $autocomplete List of values to autocomplete
3233
*
3334
* @return string The user answer
3435
*
@@ -64,8 +65,8 @@ public function ask(OutputInterface $output, $question, $default = null, $autoco
6465
}
6566

6667
// Backspace Character
67-
if (ord($c) == 127) {
68-
if ($i == 0) {
68+
if (ord($c) === 127) {
69+
if ($i === 0) {
6970
continue;
7071
}
7172

@@ -98,8 +99,6 @@ public function ask(OutputInterface $output, $question, $default = null, $autoco
9899
$ret .= $c;
99100
$i++;
100101

101-
$lastMatch = $currentMatched;
102-
103102
// Erase characters from cursor to end of line
104103
$output->write("\033[K");
105104

@@ -171,7 +170,7 @@ public function askConfirmation(OutputInterface $output, $question, $default = t
171170
* @param callback $validator A PHP callback
172171
* @param integer $attempts Max number of times to ask before giving up (false by default, which means infinite)
173172
* @param string $default The default answer if none is given by the user
174-
* @param array $autoComplete
173+
* @param array $autocomplete List of values to autocomplete
175174
*
176175
* @return mixed
177176
*

0 commit comments

Comments
 (0)
0