Passed
Pull Request — master (#380)
by Wilmer
06:00 queued 02:33
created

AbstractColumnSchemaBuilderProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
dl 0
loc 14
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A types() 0 12 1
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-1' => ['integer NULL DEFAULT NULL', Schema::TYPE_INTEGER, null, [['unsigned'], ['null']]],
16
            'integer-2' => ['integer(10)', Schema::TYPE_INTEGER, 10, [['unsigned']]],
17
            'integer-3' => ['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