Completed
Push — master ( 762e93...98e9e2 )
by Dmitry
32:47 queued 02:55
created

Tracker   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 0%

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 0
cts 11
cp 0
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
    public function migrate(Contracts\Manager $manager)
10
    {
11
        if (!$manager->getSchema()->hasSpace('meta')) {
12
            $migration = new Bootstrap();
13
            $migration->migrate($manager);
14
        }
15
16
        $migration = $manager->getMeta()->create('migrations', ['name']);
17
        $migration->addIndex('name');
18
19
        $manager->create('migrations', Bootstrap::class);
20
        $manager->create('migrations', self::class);
21
    }
22
}
23