Test Failed
Pull Request — master (#38)
by Maximo
04:24
created

FileSystem::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 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Gewaer\Models;
5
6
class FileSystem extends AbstractModel
7
{
8
    /**
9
     *
10
     * @var integer
11
     */
12
    public $id;
13
14
    /**
15
     *
16
     * @var integer
17
     */
18
    public $companies_id;
19
20
    /**
21
     *
22
     * @var integer
23
     */
24
    public $apps_id;
25
26
    /**
27
     *
28
     * @var integer
29
     */
30
    public $users_id;
31
32
    /**
33
     *
34
     * @var integer
35
     */
36
    public $system_modules_id;
37
38
    /**
39
     *
40
     * @var integer
41
     */
42
    public $entity_id;
43
44
    /**
45
     *
46
     * @var string
47
     */
48
    public $name;
49
50
    /**
51
     *
52
     * @var string
53
     */
54
    public $path;
55
56
    /**
57
     *
58
     * @var string
59
     */
60
    public $url;
61
62
    /**
63
     *
64
     * @var string
65
     */
66
    public $size;
67
68
    /**
69
     *
70
     * @var string
71
     */
72
    public $created_at;
73
74
    /**
75
     *
76
     * @var string
77
     */
78
    public $updated_at;
79
80
    /**
81
     *
82
     * @var int
83
     */
84
    public $is_deleted;
85
86
    /**
87
     * Initialize method for model.
88
     */
89 1
    public function initialize()
90
    {
91 1
        $this->setSource('filesystem');
92
93 1
        $this->belongsTo(
94 1
            'apps_id',
95 1
            'Gewaer\Models\Apps',
96 1
            'id',
97 1
            ['alias' => 'app']
98
        );
99
100 1
        $this->belongsTo(
101 1
            'users_id',
102 1
            'Gewaer\Models\Users',
103 1
            'id',
104 1
            ['alias' => 'user']
105
        );
106
107 1
        $this->belongsTo(
108 1
            'companies_id',
109 1
            'Gewaer\Models\Companies',
110 1
            'id',
111 1
            ['alias' => 'company']
112
        );
113
114 1
        $this->belongsTo(
115 1
            'system_modules_id',
116 1
            'Gewaer\Models\SystemModules',
117 1
            'id',
118 1
            ['alias' => 'systemModules']
119
        );
120 1
    }
121
122
    /**
123
     * Returns table name mapped in the model.
124
     *
125
     * @return string
126
     */
127 1
    public function getSource() : string
128
    {
129 1
        return 'filesystem';
130
    }
131
}
132