| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 32 | { |
||
| 33 | $purpose = $input->getOption('purpose'); |
||
| 34 | |||
| 35 | if ($input->getOption('before')) { |
||
| 36 | @trigger_error( |
||
| 37 | 'The "before" option is deprecated since version 2.2 and will be removed in 3.0.', |
||
| 38 | E_USER_DEPRECATED |
||
| 39 | ); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** @var $archivist ArchivistInterface */ |
||
| 43 | $archivist = $this->getContainer()->get('yokai_security_token.archivist'); |
||
| 44 | |||
| 45 | $count = $archivist->archive($purpose); |
||
| 46 | |||
| 47 | $output->writeln( |
||
| 48 | sprintf('<info>Successfully archived <comment>%d</comment> security token(s).</info>', $count) |
||
| 49 | ); |
||
| 50 | } |
||
| 51 | } |
||
| 52 |