@@ -26,9 +26,10 @@ class DialogHelper extends Helper
26
26
/**
27
27
* Asks a question to the user.
28
28
*
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
32
33
*
33
34
* @return string The user answer
34
35
*
@@ -64,8 +65,8 @@ public function ask(OutputInterface $output, $question, $default = null, $autoco
64
65
}
65
66
66
67
// Backspace Character
67
- if (ord ($ c ) == 127 ) {
68
- if ($ i == 0 ) {
68
+ if (ord ($ c ) === 127 ) {
69
+ if ($ i === 0 ) {
69
70
continue ;
70
71
}
71
72
@@ -98,8 +99,6 @@ public function ask(OutputInterface $output, $question, $default = null, $autoco
98
99
$ ret .= $ c ;
99
100
$ i ++;
100
101
101
- $ lastMatch = $ currentMatched ;
102
-
103
102
// Erase characters from cursor to end of line
104
103
$ output ->write ("\033[K " );
105
104
@@ -171,7 +170,7 @@ public function askConfirmation(OutputInterface $output, $question, $default = t
171
170
* @param callback $validator A PHP callback
172
171
* @param integer $attempts Max number of times to ask before giving up (false by default, which means infinite)
173
172
* @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
175
174
*
176
175
* @return mixed
177
176
*
0 commit comments