m151005_165040_comment_from   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 3
Bugs 0 Features 1
Metric Value
wmc 2
c 3
b 0
f 1
lcom 0
cbo 2
dl 0
loc 13
ccs 0
cts 8
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A up() 0 4 1
A down() 0 4 1
1
<?php
2
3
use yii\db\Migration;
4
5
class m151005_165040_comment_from extends Migration
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
6
{
7
8
    public function up()
9
    {
10
        $this->addColumn('{{%comment}}', 'from', $this->string()->after('entity'));
11
    }
12
13
    public function down()
14
    {
15
        $this->dropColumn('{{%comment}}', 'from');
16
    }
17
}
18