Test Failed
Branch add-core-tests (a060d8)
by Rafael
05:48
created

AppsPlansSettings::initialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 6
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 9
ccs 7
cts 7
cp 1
crap 1
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace Canvas\Models;
5
6
class AppsPlansSettings extends AbstractModel
7
{
8
    /**
9
     *
10
     * @var integer
11
     */
12
    public $apps_plans_id;
13
14
    /**
15
     *
16
     * @var integer
17
     */
18
    public $apps_id;
19
20
    /**
21
     *
22
     * @var string
23
     */
24
    public $key;
25
26
    /**
27
     *
28
     * @var string
29
     */
30
    public $value;
31
32
    /**
33
     *
34
     * @var string
35
     */
36
    public $created_at;
37
38
    /**
39
     *
40
     * @var string
41
     */
42
    public $updated_at;
43
44
    /**
45
     *
46
     * @var integer
47
     */
48
    public $is_deleted;
49
50
    /**
51
     * Initialize method for model.
52
     */
53 2
    public function initialize()
54
    {
55 2
        $this->setSource('apps_plans_settings');
56
57 2
        $this->belongsTo(
58 2
            'apps_id',
59 2
            'Canvas\Models\Apps',
60 2
            'id',
61 2
            ['alias' => 'app']
62
        );
63 2
    }
64
65
    /**
66
     * Returns table name mapped in the model.
67
     *
68
     * @return string
69
     */
70 2
    public function getSource() : string
71
    {
72 2
        return 'apps_plans_settings';
73
    }
74
}
75