Passed
Push — master ( 65ec1f...e13926 )
by Gabor
03:10
created

FilesystemCategoryEntity   A

Complexity

Total Complexity 18

Size/Duplication

Total Lines 194
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 88.89%

Importance

Changes 0
Metric Value
wmc 18
lcom 0
cbo 0
dl 0
loc 194
ccs 40
cts 45
cp 0.8889
rs 10
c 0
b 0
f 0

18 Methods

Rating   Name   Duplication   Size   Complexity  
A setKeyData() 0 6 1
A getKeyData() 0 4 1
A setFilesystemCategoryId() 0 6 1
A getFilesystemCategoryId() 0 4 1
A setApplicationId() 0 6 1
A getApplicationId() 0 4 1
A setName() 0 6 1
A getName() 0 4 1
A setTitle() 0 6 1
A getTitle() 0 4 1
A setDescription() 0 6 1
A getDescription() 0 4 1
A setItemOrder() 0 6 1
A getItemOrder() 0 4 1
A setDateCreated() 0 6 1
A getDateCreated() 0 4 1
A setDateModified() 0 6 1
A getDateModified() 0 4 1
1
<?php
2
/**
3
 * WebHemi.
4
 *
5
 * PHP version 7.1
6
 *
7
 * @copyright 2012 - 2017 Gixx-web (http://www.gixx-web.com)
8
 * @license   https://opensource.org/licenses/MIT The MIT License (MIT)
9
 *
10
 * @link      http://www.gixx-web.com
11
 */
12
declare(strict_types = 1);
13
14
namespace WebHemi\Data\Entity\Filesystem;
15
16
use WebHemi\Data\EntityInterface;
17
use WebHemi\DateTime;
18
19
/**
20
 * Class FilesystemCategoryEntity.
21
 */
22
class FilesystemCategoryEntity implements EntityInterface
23
{
24
    /** @var int */
25
    private $filesystemCategoryId;
26
    /** @var int */
27
    private $applicationId;
28
    /** @var string */
29
    private $name;
30
    /** @var string */
31
    private $title;
32
    /** @var string */
33
    private $description;
34
    /** @var string */
35
    private $itemOrder;
36
    /** @var DateTime */
37
    private $dateCreated;
38
    /** @var DateTime */
39
    private $dateModified;
40
41
    /**
42
     * Sets the value of the entity identifier.
43
     *
44
     * @param int $entityId
45
     * @return FilesystemCategoryEntity
46
     */
47 1
    public function setKeyData(int $entityId) : FilesystemCategoryEntity
48
    {
49 1
        $this->filesystemCategoryId = $entityId;
50
51 1
        return $this;
52
    }
53
54
    /**
55
     * Gets the value of the entity identifier.
56
     *
57
     * @return null|int
58
     */
59 1
    public function getKeyData() : ? int
60
    {
61 1
        return $this->filesystemCategoryId;
62
    }
63
64
    /**
65
     * @param int $filesystemCategoryId
66
     * @return FilesystemCategoryEntity
67
     */
68 3
    public function setFilesystemCategoryId(int $filesystemCategoryId) : FilesystemCategoryEntity
69
    {
70 3
        $this->filesystemCategoryId = $filesystemCategoryId;
71
72 3
        return $this;
73
    }
74
75
    /**
76
     * @return null|int
77
     */
78 2
    public function getFilesystemCategoryId() : ? int
79
    {
80 2
        return $this->filesystemCategoryId;
81
    }
82
83
    /**
84
     * @param null|int $applicationId
85
     * @return FilesystemCategoryEntity
86
     */
87 4
    public function setApplicationId(? int $applicationId) : FilesystemCategoryEntity
88
    {
89 4
        $this->applicationId = $applicationId;
90
91 4
        return $this;
92
    }
93
94
    /**
95
     * @return null|int
96
     */
97 2
    public function getApplicationId() : ? int
98
    {
99 2
        return $this->applicationId;
100
    }
101
102
    /**
103
     * @param null|string $name
104
     * @return FilesystemCategoryEntity
105
     */
106 2
    public function setName(? string $name) : FilesystemCategoryEntity
107
    {
108 2
        $this->name = $name;
109
110 2
        return $this;
111
    }
112
113
    /**
114
     * @return null|string
115
     */
116 1
    public function getName() : ? string
117
    {
118 1
        return $this->name;
119
    }
120
121
    /**
122
     * @param null|string $title
123
     * @return FilesystemCategoryEntity
124
     */
125 2
    public function setTitle(? string $title) : FilesystemCategoryEntity
126
    {
127 2
        $this->title = $title;
128
129 2
        return $this;
130
    }
131
132
    /**
133
     * @return null|string
134
     */
135 1
    public function getTitle() : ? string
136
    {
137 1
        return $this->title;
138
    }
139
140
    /**
141
     * @param string $description
142
     * @return FilesystemCategoryEntity
143
     */
144 2
    public function setDescription(string $description) : FilesystemCategoryEntity
145
    {
146 2
        $this->description = $description;
147
148 2
        return $this;
149
    }
150
151
    /**
152
     * @return null|string
153
     */
154 1
    public function getDescription() : ? string
155
    {
156 1
        return $this->description;
157
    }
158
159
    /**
160
     * @param string $itemOrder
161
     * @return FilesystemCategoryEntity
162
     */
163
    public function setItemOrder(string $itemOrder) : FilesystemCategoryEntity
164
    {
165
        $this->itemOrder = $itemOrder;
166
167
        return $this;
168
    }
169
170
    /**
171
     * @return null|string
172
     */
173
    public function getItemOrder() : ? string
174
    {
175
        return $this->itemOrder;
176
    }
177
178
    /**
179
     * @param DateTime $dateCreated
180
     * @return FilesystemCategoryEntity
181
     */
182 2
    public function setDateCreated(DateTime $dateCreated) : FilesystemCategoryEntity
183
    {
184 2
        $this->dateCreated = $dateCreated;
185
186 2
        return $this;
187
    }
188
189
    /**
190
     * @return null|DateTime
191
     */
192 1
    public function getDateCreated() : ? DateTime
193
    {
194 1
        return $this->dateCreated;
195
    }
196
197
    /**
198
     * @param null|DateTime $dateModified
199
     * @return FilesystemCategoryEntity
200
     */
201 2
    public function setDateModified(? DateTime $dateModified) : FilesystemCategoryEntity
202
    {
203 2
        $this->dateModified = $dateModified;
204
205 2
        return $this;
206
    }
207
208
    /**
209
     * @return null|DateTime
210
     */
211 1
    public function getDateModified() : ? DateTime
212
    {
213 1
        return $this->dateModified;
214
    }
215
}
216