Migration   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 8 2
1
<?php
2
3
namespace app\migrations;
4
5
class Migration extends \yii\db\Migration
6
{
7
    /**
8
     * @var string
9
     */
10
    protected $tableOptions = null;
11
12
    public function init()
13
    {
14
        parent::init();
15
16
        if ($this->db->driverName === 'mysql') {
17
            $this->tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';
18
        }
19
    }
20
}
21