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

CompaniesSettings   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 63
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 15
c 1
b 0
f 0
dl 0
loc 63
ccs 11
cts 11
cp 1
rs 10
wmc 2

2 Methods

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