Passed
Push — master ( 36be2d...32b990 )
by Carlos
02:58
created

m130101_000001_user   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 3
Bugs 1 Features 0
Metric Value
eloc 8
dl 0
loc 15
rs 10
c 3
b 1
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A columns() 0 8 1
A getTableName() 0 3 1
1
<?php
2
3
class m130101_000001_user extends \roaresearch\yii2\migrate\CreateTableMigration
4
{
5
    public function getTableName(): string
6
    {
7
        return 'user';
8
    }
9
10
    public function columns(): array
11
    {
12
        return [
13
            'id' => $this->primaryKey(),
14
            'username' => $this->string()->notNull()->unique(),
15
            'auth_key' => $this->string(32)->notNull(),
16
            'password_hash' => $this->string()->notNull(),
17
            'password_reset_token' => $this->string()->unique(),
18
        ];
19
    }
20
}
21