Conditions | 2 |
Paths | 2 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2.0438 |
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 | $value = $this->getCacheTool()->apcu_exists($key); |
|
41 | |||
42 | 1 | if ($value) { |
|
43 | $output->writeln("<comment>APCu key=<info>{$key}</info> exists</comment>"); |
||
44 | } else { |
||
45 | 1 | $output->writeln("<comment>APCu key=<info>{$key}</info> does not exist.</comment>"); |
|
46 | 1 | return 1; |
|
47 | } |
||
48 | |||
49 | return 0; |
||
50 | } |
||
52 |