Skip to content

Commit 38bcfcb

Browse files
authored
[Console] Fix SymfonyStyle::ask usage
Use function "ctype_digit" instead of "is_integer" because "$number" is not an integer value, but a string
1 parent 9dbd4f5 commit 38bcfcb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

console/style.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ User Input Methods
238238
the third argument::
239239

240240
$io->ask('Number of workers to start', 1, function ($number) {
241-
if (!is_integer($number)) {
241+
if (!ctype_digit($number)) {
242242
throw new \RuntimeException('You must type an integer.');
243243
}
244244

0 commit comments

Comments
 (0)