diff --git a/src/DoctrineAuditBundle/Command/CleanAuditLogsCommand.php b/src/DoctrineAuditBundle/Command/CleanAuditLogsCommand.php index 857954df..44fdfb17 100644 --- a/src/DoctrineAuditBundle/Command/CleanAuditLogsCommand.php +++ b/src/DoctrineAuditBundle/Command/CleanAuditLogsCommand.php @@ -32,7 +32,7 @@ protected function configure() ->setDescription('Cleans audit tables') ->setName(self::$defaultName) ->addOption('no-confirm', null, InputOption::VALUE_NONE, 'No interaction mode') - ->addArgument('keep', InputArgument::OPTIONAL, 'Keep last N months of audit.', 12) + ->addArgument('keep', InputArgument::OPTIONAL, 'Keep last N months of audit.', '12') ; } @@ -80,7 +80,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $message = sprintf( "You are about to clean audits older than %d months (up to %s): %d entities involved.\n Do you want to proceed?", - $input->getArgument('keep'), + $keep, $until->format('Y-m-d'), \count($entities) );