Skip to content

Commit 44e3330

Browse files
authored
Fix Oct and RSA Key Generator Commands (#183)
* Update OctKeyGeneratorCommand.php * Update RsaKeyGeneratorCommand.php
1 parent 8f8eb44 commit 44e3330

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Component/Console/OctKeyGeneratorCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ protected function configure(): void
3333

3434
protected function execute(InputInterface $input, OutputInterface $output)
3535
{
36-
$size = $input->getArgument('size');
37-
if (!\is_int($size)) {
36+
$size = (int) $input->getArgument('size');
37+
if ($size < 1) {
3838
throw new InvalidArgumentException('Invalid size');
3939
}
4040
$args = $this->getOptions($input);

src/Component/Console/RsaKeyGeneratorCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ protected function configure(): void
3333

3434
protected function execute(InputInterface $input, OutputInterface $output)
3535
{
36-
$size = $input->getArgument('size');
36+
$size = (int) $input->getArgument('size');
3737
$args = $this->getOptions($input);
38-
if (!\is_int($size)) {
38+
if ($size < 1) {
3939
throw new InvalidArgumentException('Invalid size');
4040
}
4141

0 commit comments

Comments
 (0)