AppsRoles::initialize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 11
ccs 0
cts 9
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Canvas\Models;
5
6
class AppsRoles extends \Baka\Auth\Models\AppsRoles
0 ignored issues
show
Bug introduced by
The type Baka\Auth\Models\AppsRoles was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
7
{
8
    /**
9
     *
10
     * @var integer
11
     */
12
    public $apps_id;
13
14
    /**
15
     *
16
     * @var string
17
     */
18
    public $roles_name;
19
20
    /**
21
     * Initialize method for model.
22
     */
23
    public function initialize()
24
    {
25
        parent::initialize();
26
27
        $this->setSource('apps_roles');
28
29
        $this->belongsTo(
30
            'apps_id',
31
            'Canvas\Models\Apps',
32
            'id',
33
            ['alias' => 'app']
34
        );
35
    }
36
37
    /**
38
     * Returns table name mapped in the model.
39
     *
40
     * @return string
41
     */
42
    public function getSource() : string
43
    {
44
        return 'apps_roles';
45
    }
46
}
47