Passed
Pull Request — master (#372)
by Wilmer
02:53
created

ColumnSchemaBuilderProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A types() 0 17 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yiisoft\Db\Tests\Provider;
6
7
use Yiisoft\Db\Expression\Expression;
8
use Yiisoft\Db\Mssql\Schema;
0 ignored issues
show
Bug introduced by
The type Yiisoft\Db\Mssql\Schema was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
10
final class ColumnSchemaBuilderProvider
11
{
12
    public function types(): array
13
    {
14
        return [
15
            ['integer NULL DEFAULT NULL', Schema::TYPE_INTEGER, null, [
16
                ['unsigned'], ['null'],
17
            ]],
18
            ['integer(10)', Schema::TYPE_INTEGER, 10, [
19
                ['unsigned'],
20
            ]],
21
            ['timestamp() WITH TIME ZONE NOT NULL', 'timestamp() WITH TIME ZONE', null, [
22
                ['notNull'],
23
            ]],
24
            ['timestamp() WITH TIME ZONE DEFAULT NOW()', 'timestamp() WITH TIME ZONE', null, [
25
                ['defaultValue', new Expression('NOW()')],
26
            ]],
27
            ['integer(10)', Schema::TYPE_INTEGER, 10, [
28
                ['comment', 'test'],
29
            ]],
30
        ];
31
    }
32
}
33