UsersAssociatedCompanies   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 57
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 57
ccs 0
cts 14
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSource() 0 3 1
A initialize() 0 12 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Canvas\Models;
5
6
class UsersAssociatedCompanies extends \Baka\Auth\Models\UsersAssociatedCompany
0 ignored issues
show
Bug introduced by
The type Baka\Auth\Models\UsersAssociatedCompany 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 $users_id;
13
14
    /**
15
     *
16
     * @var integer
17
     */
18
    public $companies_id;
19
20
    /**
21
     *
22
     * @var string
23
     */
24
    public $identify_id;
25
26
    /**
27
     *
28
     * @var integer
29
     */
30
    public $user_active;
31
32
    /**
33
     *
34
     * @var string
35
     */
36
    public $user_role;
37
38
    /**
39
     * Initialize method for model.
40
     */
41
    public function initialize()
42
    {
43
        parent::initialize();
44
45
        $this->belongsTo(
46
            'companies_id',
47
            'Canvas\Models\Companies',
48
            'id',
49
            ['alias' => 'company']
50
        );
51
52
        $this->setSource('users_associated_company');
53
    }
54
55
    /**
56
     * Returns table name mapped in the model.
57
     *
58
     * @return string
59
     */
60
    public function getSource(): string
61
    {
62
        return 'users_associated_company';
63
    }
64
}
65