ColumnSchemaBuilder   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 18
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 11 2
1
<?php
2
3
/**
4
 * @link http://www.yiiframework.com/
5
 * @copyright Copyright (c) 2008 Yii Software LLC
6
 * @license http://www.yiiframework.com/license/
7
 */
8
9
namespace edgardmessias\db\firebird;
10
11
/**
12
 *
13
 * @author Edgard Lorraine Messias <[email protected]>
14
 * @since 2.0
15
 */
16
class ColumnSchemaBuilder extends \yii\db\ColumnSchemaBuilder
17
{
18
19
    /**
20
     * @inheritdoc
21
     */
22 6
    public function __toString()
23
    {
24 6
        switch ($this->getTypeCategory()) {
25 6
            case self::CATEGORY_PK:
26 1
                $format = '{type}{length}{check}';
27 1
                break;
28
            default:
29 6
                $format = '{type}{length}{default}{notnull}{unique}{check}';
30
        }
31 6
        return $this->buildCompleteString($format);
32
    }
33
}
34