Skip to content

Commit 7834a80

Browse files
Fix type hinting for prompt function
1 parent 27f2a3b commit 7834a80

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/cli/Streams.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public static function input( $format = null, $hide = false ) {
156156
* @return string The users input.
157157
* @see cli\input()
158158
*/
159-
public static function prompt( $question, $default = null, $marker = ': ', $hide = false ) {
159+
public static function prompt( $question, $default = false, $marker = ': ', $hide = false ) {
160160
if( $default && strpos( $question, '[' ) === false ) {
161161
$question .= ' [' . $default . ']';
162162
}

lib/cli/cli.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ function input( $format = null ) {
9494
* continue displaying until input is received.
9595
*
9696
* @param string $question The question to ask the user.
97-
* @param string $default A default value if the user provides no input.
97+
* @param bool|string $default A default value if the user provides no input.
9898
* @param string $marker A string to append to the question and default value on display.
9999
* @param boolean $hide If the user input should be hidden
100100
* @return string The users input.

0 commit comments

Comments
 (0)