| Conditions | 4 |
| Paths | 6 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 4.0218 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | 1 | protected function execute(InputInterface $input, OutputInterface $output): int |
|
| 36 | { |
||
| 37 | 1 | $this->ensureExtensionLoaded('apcu'); |
|
| 38 | |||
| 39 | 1 | $key = $input->getArgument('key'); |
|
| 40 | 1 | $success = $this->getCacheTool()->apcu_delete($key); |
|
| 41 | |||
| 42 | 1 | if ($output->isVerbose()) { |
|
| 43 | 1 | if ($success) { |
|
| 44 | $output->writeln("<comment>APCu key <info>{$key}</info> was deleted</comment>"); |
||
| 45 | } else { |
||
| 46 | 1 | $output->writeln("<comment>APCu key <info>{$key}</info> could not be deleted.</comment>"); |
|
| 47 | } |
||
| 48 | } |
||
| 49 | |||
| 50 | 1 | return $success ? 0 : 1; |
|
| 51 | } |
||
| 53 |