8000 Some cleanups · seqally/symfony@6b46d10 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b46d10

Browse files
lmcdfabpot
authored andcommitted
Some cleanups
1 parent 837c906 commit 6b46d10

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ class DialogHelper extends Helper
2727
* Asks a question to the user.
2828
*
2929
* @param OutputInterface $output
30-
* @param string|array $question The question to ask
31-
* @param string $default The default answer if none is given by the user
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
*/
@@ -62,8 +63,8 @@ public function ask(OutputInterface $output, $question, $default = null, $autoco
6263
}
6364

6465
// Backspace Character
65-
if (ord($c) == 127) {
66-
if ($i == 0) {
66+
if (ord($c) === 127) {
67+
if ($i === 0) {
6768
continue;
6869
}
6970

@@ -96,8 +97,6 @@ public function ask(OutputInterface $output, $question, $default = null, $autoco
9697
$ret .= $c;
9798
$i++;
9899

99-
$lastMatch = $currentMatched;
100-
101100
// Erase characters from cursor to end of line
102101
$output->write("\033[K");
103102

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

0 commit comments

Comments
 (0)
0