| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 5 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 35 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 36 | { |
||
| 37 | $this->ensureExtensionLoaded('apc'); |
||
| 38 | |||
| 39 | $file = $input->getOption('file'); |
||
| 40 | $dump = $this->getCacheTool()->apc_bin_dump(null, null); |
||
| 41 | |||
| 42 | if ($file) { |
||
| 43 | $result = @file_put_contents($file, $dump); |
||
| 44 | |||
| 45 | if ($result === false) { |
||
| 46 | throw new \RuntimeException(sprintf("Could not write to file: %s", $file)); |
||
| 47 | } |
||
| 48 | } else { |
||
| 49 | echo $dump; |
||
| 50 | } |
||
| 51 | } |
||
| 52 | } |
||
| 53 |