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

RolesInherits::getSource()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
declare(strict_types=1);
3
4
namespace Canvas\Models;
5
6
class RolesInherits extends AbstractModel
7
{
8
    /**
9
     *
10
     * @var integer
11
     */
12
    public $roles_id;
13
14
    /**
15
     *
16
     * @var integer
17
     */
18
    public $roles_inherit;
19
20
    /**
21
     * Initialize method for model.
22
     */
23 1
    public function initialize()
24
    {
25 1
        $this->setSource('roles_inherits');
26
27 1
        $this->belongsTo(
28 1
            'roles_id',
29 1
            'Canvas\Models\Roles',
30 1
            'id',
31 1
            ['alias' => 'role']
32
        );
33 1
    }
34
35
    /**
36
     * Returns table name mapped in the model.
37
     *
38
     * @return string
39
     */
40 1
    public function getSource(): string
41
    {
42 1
        return 'roles_inherits';
43
    }
44
}
45