Passed
Branch master (ecb7f7)
by Andrey
17:46
created

m190220_013101_create_qualities_table   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A safeUp() 0 9 1
A safeDown() 0 3 1
1
<?php
2
3
use Itstructure\AdminModule\components\MultilanguageMigration;
4
5
/**
6
 * Handles the creation of table `qualities`.
7
 */
8
class m190220_013101_create_qualities_table extends MultilanguageMigration
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function safeUp()
14
    {
15
        $this->createMultiLanguageTable('qualities',
16
            [
17
                'title' => $this->string(128)->notNull(),
18
                'description' => $this->text()->notNull(),
19
            ],
20
            [
21
                'icon' => $this->string(128)->notNull(),
22
            ]
23
        );
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function safeDown()
30
    {
31
        $this->dropMultiLanguageTable('qualities');
32
    }
33
}
34