Failed Conditions
Pull Request — master (#36)
by Rafael
04:02
created

CustomFieldsValues   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 73
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 16
dl 0
loc 73
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 9 1
A getSource() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Gewaer\Models;
5
6
class CustomFieldsValues extends AbstractModel
7
{
8
    /**
9
     *
10
     * @var integer
11
     */
12
    public $id;
13
14
    /**
15
     *
16
     * @var integer
17
     */
18
    public $custom_fields_id;
19
20
    /**
21
     *
22
     * @var string
23
     */
24
    public $label;
25
26
    /**
27
     *
28
     * @var string
29
     */
30
    public $value;
31
32
    /**
33
     *
34
     * @var integer
35
     */
36
    public $is_default;
37
38
    /**
39
     *
40
     * @var integer
41
     */
42
    public $is_deleted;
43
44
    /**
45
     *
46
     * @var string
47
     */
48
    public $created_at;
49
50
    /**
51
     *
52
     * @var string
53
     */
54
    public $updated_at;
55
56
    /**
57
     * Initialize method for model.
58
     */
59
    public function initialize()
60
    {
61
        $this->setSource('custom_fields_values');
62
63
        $this->belongsTo(
64
            'custom_fields_id',
65
            'Gewaer\Models\CustomFields',
66
            'id',
67
            ['alias' => 'fields']
68
        );
69
    }
70
71
    /**
72
     * Returns table name mapped in the model.
73
     *
74
     * @return string
75
     */
76
    public function getSource(): string
77
    {
78
        return 'custom_fields_values';
79
    }
80
}
81