Skip to content
Closed
Changes from all commits
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
4 changes: 3 additions & 1 deletion components/console/helpers/dialoghelper.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,11 @@ You can also ask and validate a hidden response::
$dialog = $this->getHelperSet()->get('dialog');

$validator = function ($value) {
if (trim($value) == '') {
if ('' === trim($value)) {
throw new \Exception('The password can not be empty');
}

return $value;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there should be a new line before the return statement

};

$password = $dialog->askHiddenResponseAndValidate(
Expand Down