Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix type hinting for prompt function
  • Loading branch information
valera-seregin committed Jan 12, 2021
commit 7834a80390aa317a8aaa53699ecfb91de3c8ea64
2 changes: 1 addition & 1 deletion lib/cli/Streams.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public static function input( $format = null, $hide = false ) {
* @return string The users input.
* @see cli\input()
*/
public static function prompt( $question, $default = null, $marker = ': ', $hide = false ) {
public static function prompt( $question, $default = false, $marker = ': ', $hide = false ) {
if( $default && strpos( $question, '[' ) === false ) {
$question .= ' [' . $default . ']';
}
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function input( $format = null ) {
* continue displaying until input is received.
*
* @param string $question The question to ask the user.
* @param string $default A default value if the user provides no input.
* @param bool|string $default A default value if the user provides no input.
* @param string $marker A string to append to the question and default value on display.
* @param boolean $hide If the user input should be hidden
* @return string The users input.
Expand Down