| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2.0811 |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | 2 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 32 | { |
||
| 33 | 2 | $purpose = $input->getOption('purpose'); |
|
| 34 | |||
| 35 | 2 | 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 | 2 | $archivist = $this->getContainer()->get('yokai_security_token.archivist'); |
|
| 44 | |||
| 45 | 2 | $count = $archivist->archive($purpose); |
|
| 46 | |||
| 47 | 2 | $output->writeln( |
|
| 48 | 2 | sprintf('<info>Successfully archived <comment>%d</comment> security token(s).</info>', $count) |
|
| 49 | ); |
||
| 50 | 2 | } |
|
| 51 | } |
||
| 52 |