Completed
Push — master ( c1fc0d...a7d98d )
by Dmitry
28:31 queued 26:01
created

Tracker   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 100%

Importance

Changes 5
Bugs 0 Features 1
Metric Value
wmc 2
c 5
b 0
f 1
lcom 0
cbo 5
dl 0
loc 16
ccs 10
cts 10
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A migrate() 0 13 2
1
<?php
2
3
namespace Tarantool\Mapper\Migrations;
4
5
use Tarantool\Mapper\Contracts;
6
7
class Tracker implements Contracts\Migration
8
{
9 62
    public function migrate(Contracts\Manager $manager)
10
    {
11 62
        if (!$manager->getSchema()->hasSpace('meta')) {
12 62
            $migration = new Bootstrap();
13 62
            $migration->migrate($manager);
14 62
        }
15
16 62
        $migration = $manager->getMeta()->create('migrations', ['name']);
17 62
        $migration->addIndex('name');
18
19 62
        $manager->create('migrations', Bootstrap::class);
20 62
        $manager->create('migrations', self::class);
21 62
    }
22
}
23