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