Install::safeUp()   A
last analyzed

Complexity

Conditions 4
Paths 4

Size

Total Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 16
rs 9.7333
c 0
b 0
f 0
cc 4
nc 4
nop 0
1
<?php
2
3
/**
4
 * @copyright  Copyright (c) Flipbox Digital Limited
5
 * @license    https://flipboxfactory.com/software/hubspot/license
6
 * @link       https://www.flipboxfactory.com/software/hubspot/
7
 */
8
9
namespace flipbox\craft\hubspot\migrations;
10
11
use craft\db\Migration;
12
13
/**
14
 * @author Flipbox Factory <[email protected]>
15
 * @since 1.0.0
16
 */
17
class Install extends Migration
18
{
19
    /**
20
     * @inheritdoc
21
     */
22
    public function safeUp()
23
    {
24
        if (false === (new ObjectAssociations())->safeUp()) {
25
            return false;
26
        };
27
28
        if (false === (new m190222_101208_connections())->safeUp()) {
29
            return false;
30
        };
31
32
        if (false === (new m190818_122247_visitor())->safeUp()) {
33
            return false;
34
        };
35
36
        return true;
37
    }
38
39
    /**
40
     * @inheritdoc
41
     */
42
    public function safeDown()
43
    {
44
        if (false === (new ObjectAssociations())->safeDown()) {
45
            return false;
46
        };
47
48
        if (false === (new m190222_101208_connections())->safeDown()) {
49
            return false;
50
        };
51
52
        if (false === (new m190818_122247_visitor())->safeDown()) {
53
            return false;
54
        };
55
56
        return true;
57
    }
58
}
59