Conditions | 5 |
Paths | 6 |
Total Lines | 22 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 30 |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
11 | public function run(Filesystem $fs) |
||
12 | { |
||
13 | $result = []; |
||
14 | $cache = $fs->getPath('.cache'); |
||
15 | if (is_dir($cache)) { |
||
16 | foreach ($fs->listFiles('.cache') as $file) { |
||
17 | unlink($fs->getPath('.cache/'.$file)); |
||
18 | } |
||
19 | rmdir($cache); |
||
20 | } |
||
21 | |||
22 | $jobs = ['tarantool.migrate', 'tarantool.cache', 'module.defaults', 'module.register']; |
||
23 | foreach ($jobs as $job) { |
||
24 | try { |
||
25 | $result[$job] = $this->dispatch($job); |
||
26 | } catch (Exception $e) { |
||
27 | $result[$job] = $e->getMessage(); |
||
28 | } |
||
29 | } |
||
30 | |||
31 | return $result; |
||
32 | } |
||
33 | } |
||
34 |