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 38bcfcb commit 9bb23e1Copy full SHA for 9bb23e1
console/style.rst
@@ -238,11 +238,11 @@ User Input Methods
238
the third argument::
239
240
$io->ask('Number of workers to start', 1, function ($number) {
241
- if (!ctype_digit($number)) {
242
- throw new \RuntimeException('You must type an integer.');
+ if (!is_numeric($number)) {
+ throw new \RuntimeException('You must type a number.');
243
}
244
245
- return $number;
+ return (int) $number;
246
});
247
248
:method:`Symfony\\Component\\Console\\Style\\SymfonyStyle::askHidden`
0 commit comments