m171130_000002_credit   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 7
c 2
b 0
f 0
dl 0
loc 19
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A foreignKeys() 0 4 1
A getTableName() 0 3 1
A columns() 0 5 1
1
<?php
2
3
use roaresearch\yii2\rmdb\migrations\CreatePersistentEntity;
4
5
class m171130_000002_credit extends CreatePersistentEntity
6
{
7
    public function getTableName(): string
8
    {
9
        return 'credit';
10
    }
11
12
    public function columns(): array
13
    {
14
        return [
15
            'id' => $this->primaryKey(),
16
            'workflow_id' => $this->normalKey(),
17
        ];
18
    }
19
20
    public function foreignKeys(): array
21
    {
22
        return [
23
            'workflow_id' => ['table' => 'workflow']
24
        ];
25
    }
26
}
27