Passed
Push — master ( 662d52...2a8232 )
by eXeCUT
03:58
created

m161220_070554_addMimeTypeToFiles   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A initInverter() 0 9 1
1
<?php
2
namespace execut\import\migrations;
3
class m161220_070554_addMimeTypeToFiles extends \execut\yii\migration\Migration
4
{
5
    public function initInverter(\execut\yii\migration\Inverter $i)
6
    {
7
        $types = $i->table('import_settings')
0 ignored issues
show
Unused Code introduced by
The assignment to $types is dead and can be removed.
Loading history...
8
            ->addColumn('is_check_mime_type', $this->boolean())
9
            ->alterColumnSetDefault('is_check_mime_type', 'true')
10
            ->update([
11
                'is_check_mime_type' => true,
12
            ])
13
            ->alterColumnSetNotNull('is_check_mime_type');
14
    }
15
}
16