We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b6da0e commit 05b956cCopy full SHA for 05b956c
src/Console.php
@@ -208,15 +208,15 @@ public function flags(): array
208
return $this->flags;
209
}
210
211
- public function ask(string $question)
+ public function ask(string $question): string
212
{
213
$this->message( \PHP_EOL . $question . \PHP_EOL);
214
$handle = fopen("php://stdin", "r");
215
do {
216
$line = fgets($handle);
217
} while ($line == '');
218
fclose($handle);
219
- return $line;
+ return trim((string)$line);
220
221
222
/**
0 commit comments