Failed Conditions
Push — master ( a46e0a...45361b )
by Maximo
03:09 queued 11s
created

CompaniesGroups   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 79
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 79
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 21 1
A getSource() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Canvas\Models;
5
6
use Phalcon\Validation;
7
use Phalcon\Validation\Validator\PresenceOf;
8
9
/**
10
 * Class CompanyBranches.
11
 *
12
 * @package Canvas\Models
13
 *
14
 */
15
class CompaniesGroups extends AbstractModel
16
{
17
    /**
18
     *
19
     * @var integer
20
     */
21
    public $id;
22
23
    /**
24
     *
25
     * @var string
26
     */
27
    public $name;
28
29
    /**
30
     *
31
     * @var integer
32
     */
33
    public $apps_id;
0 ignored issues
show
Coding Style introduced by
$apps_id does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
34
35
    /**
36
     *
37
     * @var integer
38
     */
39
    public $users_id;
0 ignored issues
show
Coding Style introduced by
$users_id does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
40
41
    /**
42
     *
43
     * @var string
44
     */
45
    public $created_at;
0 ignored issues
show
Coding Style introduced by
$created_at does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
46
47
    /**
48
     *
49
     * @var string
50
     */
51
    public $updated_at;
0 ignored issues
show
Coding Style introduced by
$updated_at does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
52
53
    /**
54
     *
55
     * @var integer
56
     */
57
    public $is_deleted;
0 ignored issues
show
Coding Style introduced by
$is_deleted does not seem to conform to the naming convention (^[a-z][a-zA-Z0-9]*$).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
58
59
    /**
60
     * Initialize method for model.
61
     */
62
    public function initialize()
63
    {
64
        $this->setSource('companies_groups');
65
66
        $this->hasMany(
67
            'id',
68
            CompaniesAssociations::class,
69
            'companies_groups_id',
70
            ['alias' => 'companiesAssoc']
71
        );
72
73
        $this->hasManyToMany(
74
            'id',
75
            CompaniesAssociations::class,
76
            'companies_groups_id',
77
            'companies_id',
78
            Companies::class,
79
            'id',
80
            ['alias' => 'companies']
81
        );
82
    }
83
84
    /**
85
     * Returns table name mapped in the model.
86
     *
87
     * @return string
88
     */
89
    public function getSource() : string
90
    {
91
        return 'companies_groups';
92
    }
93
}
94