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