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

CompaniesAssociations::initialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 18
rs 9.6666
c 0
b 0
f 0
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 CompaniesAssociations extends AbstractModel
16
{
17
    /**
18
     *
19
     * @var integer
20
     */
21
    public $companies_groups_id;
0 ignored issues
show
Coding Style introduced by
$companies_groups_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...
22
23
    /**
24
     *
25
     * @var integer
26
     */
27
    public $companies_id;
0 ignored issues
show
Coding Style introduced by
$companies_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...
28
29
    /**
30
     *
31
     * @var string
32
     */
33
    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...
34
35
    /**
36
     *
37
     * @var string
38
     */
39
    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...
40
41
    /**
42
     *
43
     * @var integer
44
     */
45
    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...
46
47
    /**
48
     * Initialize method for model.
49
     */
50
    public function initialize()
51
    {
52
        $this->setSource('companies_associations');
53
54
        $this->belongsTo(
55
            'companies_id',
56
            Companies::class,
57
            'id',
58
            ['alias' => 'companies']
59
        );
60
61
        $this->belongsTo(
62
            'companies_groups_id',
63
            CompaniesGroups::class,
64
            'id',
65
            ['alias' => 'companiesGroups']
66
        );
67
    }
68
69
    /**
70
     * Returns table name mapped in the model.
71
     *
72
     * @return string
73
     */
74
    public function getSource() : string
75
    {
76
        return 'companies_associations';
77
    }
78
}
79