Conditions | 3 |
Paths | 2 |
Total Lines | 21 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | protected function execute(InputInterface $input, OutputInterface $output) |
||
36 | { |
||
37 | $output->writeln([ |
||
38 | '<info>Cleaning server resources</info>', |
||
39 | '<info>=========================</info>', |
||
40 | '', |
||
41 | ]); |
||
42 | |||
43 | $this->server = new TusServer($input->getArgument('cache-adapter') ?? 'file'); |
||
44 | |||
45 | $deleted = $this->server->handleExpiration(); |
||
46 | |||
47 | if (empty($deleted)) { |
||
48 | $output->writeln('<comment>Nothing to delete.</comment>'); |
||
49 | } else { |
||
50 | foreach ($deleted as $key => $item) { |
||
51 | $output->writeln('<comment>' . ($key + 1) . ". Deleted {$item['name']} from {$item['file_path']}</comment>"); |
||
52 | } |
||
53 | } |
||
54 | |||
55 | $output->writeln(''); |
||
56 | } |
||
58 |