Completed
Branch master (f58c14)
by Andrey
07:50
created

m180603_123208_create_home_table   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 27
c 0
b 0
f 0
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A safeUp() 15 15 1
1
<?php
2
3
use Itstructure\AdminModule\components\MultilanguageMigration;
4
5
/**
6
 * Handles the creation of table `home`.
7
 */
8 View Code Duplication
class m180603_123208_create_home_table extends MultilanguageMigration
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
{
10
    /**
11
     * {@inheritdoc}
12
     */
13
    public function safeUp()
14
    {
15
        $this->createMultiLanguageTable('home',
16
            [
17
                'title' => $this->string(128),
18
                'description' => $this->text(),
19
                'content' => $this->text(),
20
                'metaKeys' => $this->string(128),
21
                'metaDescription' => $this->string(),
22
            ],
23
            [
24
                'default' => $this->tinyInteger()->defaultValue(0),
25
            ]
26
        );
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function safeDown()
33
    {
34
        $this->dropMultiLanguageTable('home');
35
    }
36
}
37