We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b24c8a4 commit a4dd8e2Copy full SHA for a4dd8e2
components/console/helpers/questionhelper.rst
@@ -385,10 +385,10 @@ You can also use a validator with a hidden question::
385
386
$question = new Question('Please enter your password');
387
$question->setNormalizer(function ($value) {
388
- return null === $value ? '' : $value;
+ return $value ?? '';
389
});
390
$question->setValidator(function ($value) {
391
- if (trim($value) == '') {
+ if ('' === trim($value)) {
392
throw new \Exception('The password cannot be empty');
393
}
394
0 commit comments