Passed
Push — master ( fb230b...cd53a6 )
by M. Mikkel
06:13
created

m200720_180000_craft3   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 10
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A safeUp() 0 8 2
1
<?php
2
3
namespace mmikkel\cacheflag\migrations;
4
5
use yii\db\Migration;
6
7
class m200720_180000_craft3 extends Migration
8
{
9
    public function safeUp()
10
    {
11
        $tableSchema = \Craft::$app->db->schema->getTableSchema('{{%cacheflag_flags}}');
12
        if ($tableSchema === null) {
13
            $installMigration = new Install();
14
            return $installMigration->safeUp();
15
        }
16
        return true;
17
    }
18
}
19