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

m140501_075311_oauth_clients   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTableName() 0 3 1
A columns() 0 9 1
1
<?php
2
3
use roaresearch\yii2\oauth2server\migrations\tables\CreateTable;
4
5
class m140501_075311_oauth_clients extends CreateTable
6
{
7
    /**
8
     * @inheritdoc
9
     */
10
    public function getTableName(): string
11
    {
12
        return 'oauth_clients';
13
    }
14
15
    /**
16
     * @inheritdoc
17
     */
18
    public function columns(): array
19
    {
20
        return [
21
            'client_id' => $this->primaryKey(32),
22
            'client_secret' => $this->string(32)->notNull(),
23
            'redirect_uri' => $this->string(1000)->notNull(),
24
            'grant_types' => $this->string(100)->notNull(),
25
            'scope' => $this->string(2000)->notNull()->defaultValue(null),
26
            'user_id' => $this->integer()->defaultValue(null),
27
        ];
28
    }
29
}
30