Update BaseConsole.php

This commit is contained in:
Carsten Brandt
2017-01-07 21:13:02 +01:00
committed by GitHub
parent 92270bcd24
commit 3050dedded

View File

@ -805,6 +805,16 @@ class BaseConsole
/**
* Asks user to confirm by typing y or n.
*
* A typical usage looks like the following:
*
* ```php
* if (Console::confirm("Are you sure?")) {
* echo "user typed yes\n";
* } else {
* echo "user typed no\n";
* }
* ```
*
* @param string $message to print out before waiting for user input
* @param bool $default this value is returned if no selection is made.
* @return bool whether user confirmed