Passed
Pull Request — master (#408)
by Wilmer
02:37
created

AbstractColumnSchemaBuilderProvider::types()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 9
nc 1
nop 0
dl 0
loc 12
rs 9.9666
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Tests\Provider;
6
7
use Yiisoft\Db\Schema\Schema;
8
use Yiisoft\Db\Expression\Expression;
9
10
abstract class AbstractColumnSchemaBuilderProvider
11
{
12
    public function types(): array
13
    {
14
        return [
15
            ['integer NULL DEFAULT NULL', Schema::TYPE_INTEGER, null, [['unsigned'], ['null']]],
16
            ['integer(10)', Schema::TYPE_INTEGER, 10, [['unsigned']]],
17
            ['integer(10)', Schema::TYPE_INTEGER, 10, [['comment', 'test']]],
18
            ['timestamp() WITH TIME ZONE NOT NULL', 'timestamp() WITH TIME ZONE', null, [['notNull']]],
19
            [
20
                'timestamp() WITH TIME ZONE DEFAULT NOW()',
21
                'timestamp() WITH TIME ZONE',
22
                null,
23
                [['defaultValue', new Expression('NOW()')]],
24
            ],
25
        ];
26
    }
27
}
28