Skip to content

Commit d2e78f1

Browse files
authored
Corrected return type of anonymous functions
1 parent 7d49f56 commit d2e78f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/console/helpers/questionhelper.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ provide a callback function to dynamically generate suggestions::
217217
// where files and dirs can be found
218218
$foundFilesAndDirs = @scandir($inputPath) ?: [];
219219

220-
return array_map(function (string $dirOrFile) use ($inputPath): void {
220+
return array_map(function (string $dirOrFile) use ($inputPath): string {
221221
return $inputPath.$dirOrFile;
222222
}, $foundFilesAndDirs);
223223
};
@@ -462,7 +462,7 @@ You can also use a validator with a hidden question::
462462
$question->setNormalizer(function (?string $value): string {
463463
return $value ?? '';
464464
});
465-
$question->setValidator(function (string $value): void {
465+
$question->setValidator(function (string $value): string {
466466
if ('' === trim($value)) {
467467
throw new \Exception('The password cannot be empty');
468468
}

0 commit comments

Comments
 (0)