Conditions | 6 |
Paths | 18 |
Total Lines | 24 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 6.0106 |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
12 | 6 | public function run(Client $client, Filesystem $fs) |
|
13 | { |
||
14 | 6 | $space = $client->getSpace('_vspace'); |
|
15 | 6 | $response = $space->select([], Index::SPACE_NAME); |
|
16 | 6 | $data = $response->getData(); |
|
17 | 6 | foreach ($data as $row) { |
|
18 | 6 | if ($row[1] == 0) { |
|
19 | // user space |
||
20 | 6 | $client->evaluate('box.space.'.$row[2].':drop{}'); |
|
21 | } |
||
22 | } |
||
23 | |||
24 | 6 | $schema = $client->getSpace('_schema')->select([], 0)->getData(); |
|
25 | 6 | foreach ($schema as $tuple) { |
|
26 | 6 | if (strpos($tuple[0], 'mapper-once') === 0) { |
|
27 | 6 | $client->getSpace('_schema')->delete([$tuple[0]]); |
|
28 | } |
||
29 | } |
||
30 | |||
31 | 6 | $filename = $fs->getPath('.cache/mapper-meta.php'); |
|
32 | 6 | if (file_exists($filename)) { |
|
33 | unlink($filename); |
||
34 | } |
||
35 | 6 | } |
|
36 | } |
||
37 |