Conditions | 3 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function execute(Arguments $args, ConsoleIo $io): ?int |
||
31 | { |
||
32 | $twigCachePath = CACHE . 'twigView'; |
||
33 | $folder = new Folder($twigCachePath); |
||
34 | if (file_exists($twigCachePath) && !$folder->delete()) { |
||
35 | $io->error("Error removing Twig cache files in {$twigCachePath}"); |
||
36 | $this->abort(); |
||
37 | } |
||
38 | $io->out("<success>Cleared twig cache</success>"); |
||
39 | |||
40 | return parent::execute($args, $io); |
||
41 | } |
||
43 |