Skip to content

Commit

Permalink
Merge pull request #11 from teamleadercrm/fix/command-return
Browse files Browse the repository at this point in the history
Fix encode/decode commands
  • Loading branch information
rainbow-alex authored Oct 12, 2020
2 parents 8339b02 + 29c857f commit 2ecfeba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Command/Decode.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

class Decode extends Command
{
const SUCCESS = 0;

protected function configure()
{
$this->setName('uuidifier:decode');
Expand All @@ -28,5 +30,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$uuid = $input->getArgument('uuid');
$int = $uuidifier->decode(Uuid::fromString($uuid));
$output->writeln($int);

return self::SUCCESS;
}
}
4 changes: 4 additions & 0 deletions src/Command/Encode.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

class Encode extends Command
{
const SUCCESS = 0;

protected function configure()
{
$this->setName('uuidifier:encode');
Expand All @@ -36,5 +38,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$id
);
$output->writeln((string) $uuid);

return self::SUCCESS;
}
}

0 comments on commit 2ecfeba

Please sign in to comment.