Test Failed
Branch lab/data (a414ec)
by Gabor
07:41
created

FilesystemCategoryEntity   A

Complexity

Total Complexity 20

Size/Duplication

Total Lines 176
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 20
lcom 0
cbo 2
dl 0
loc 176
rs 10
c 0
b 0
f 0

16 Methods

Rating   Name   Duplication   Size   Complexity  
A setFilesystemCategoryId() 0 6 1
A getFilesystemCategoryId() 0 6 2
A setApplicationId() 0 6 1
A getApplicationId() 0 6 2
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 6 2
A setDateModified() 0 6 1
A getDateModified() 0 6 2
1
<?php
2
/**
3
 * WebHemi.
4
 *
5
 * PHP version 7.1
6
 *
7
 * @copyright 2012 - 2018 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;
15
16
use WebHemi\DateTime;
17
18
/**
19
 * Class FilesystemCategoryEntity
20
 */
21
class FilesystemCategoryEntity extends AbstractEntity
22
{
23
    /**
24
     * @var array
25
     */
26
    protected $container = [
27
        'id_filesystem_category' => null,
28
        'fk_application' => null,
29
        'name' => null,
30
        'title' => null,
31
        'description' => null,
32
        'item_order' => null,
33
        'date_created' => null,
34
        'date_modified' => null,
35
    ];
36
37
    /**
38
     * @param int $identifier
39
     * @return FilesystemCategoryEntity
40
     */
41
    public function setFilesystemCategoryId(int $identifier) : FilesystemCategoryEntity
42
    {
43
        $this->container['id_filesystem_category'] = $identifier;
44
45
        return $this;
46
    }
47
48
    /**
49
     * @return int|null
50
     */
51
    public function getFilesystemCategoryId() : ? int
52
    {
53
        return !is_null($this->container['id_filesystem_category'])
54
            ? (int) $this->container['id_filesystem_category']
55
            : null;
56
    }
57
58
    /**
59
     * @param int $applicationIdentifier
60
     * @return FilesystemCategoryEntity
61
     */
62
    public function setApplicationId(int $applicationIdentifier) : FilesystemCategoryEntity
63
    {
64
        $this->container['fk_application'] = $applicationIdentifier;
65
66
        return $this;
67
    }
68
69
    /**
70
     * @return int|null
71
     */
72
    public function getApplicationId() : ? int
73
    {
74
        return !is_null($this->container['fk_application'])
75
            ? (int) $this->container['fk_application']
76
            : null;
77
    }
78
79
    /**
80
     * @param string $name
81
     * @return FilesystemCategoryEntity
82
     */
83
    public function setName(string $name) : FilesystemCategoryEntity
84
    {
85
        $this->container['name'] = $name;
86
87
        return $this;
88
    }
89
90
    /**
91
     * @return null|string
92
     */
93
    public function getName() : ? string
94
    {
95
        return $this->container['name'];
96
    }
97
98
    /**
99
     * @param string $title
100
     * @return FilesystemCategoryEntity
101
     */
102
    public function setTitle(string $title) : FilesystemCategoryEntity
103
    {
104
        $this->container['title'] = $title;
105
106
        return $this;
107
    }
108
109
    /**
110
     * @return null|string
111
     */
112
    public function getTitle() : ? string
113
    {
114
        return $this->container['title'];
115
    }
116
117
    /**
118
     * @param string $description
119
     * @return FilesystemCategoryEntity
120
     */
121
    public function setDescription(string $description) : FilesystemCategoryEntity
122
    {
123
        $this->container['description'] = $description;
124
125
        return $this;
126
    }
127
128
    /**
129
     * @return null|string
130
     */
131
    public function getDescription() : ? string
132
    {
133
        return $this->container['description'];
134
    }
135
136
    /**
137
     * @param string $itemOrder
138
     * @return FilesystemCategoryEntity
139
     */
140
    public function setItemOrder(string $itemOrder) : FilesystemCategoryEntity
141
    {
142
        $this->container['item_order'] = $itemOrder;
143
144
        return $this;
145
    }
146
147
    /**
148
     * @return null|string
149
     */
150
    public function getItemOrder() : ? string
151
    {
152
        return $this->container['item_order'];
153
    }
154
155
    /**
156
     * @param DateTime $dateTime
157
     * @return FilesystemCategoryEntity
158
     */
159
    public function setDateCreated(DateTime $dateTime) : FilesystemCategoryEntity
160
    {
161
        $this->container['date_created'] = $dateTime->format('Y-m-d H:i:s');
162
163
        return $this;
164
    }
165
166
    /**
167
     * @return null|DateTime
168
     */
169
    public function getDateCreated() : ? DateTime
170
    {
171
        return !empty($this->container['date_created'])
172
            ? new DateTime($this->container['date_created'])
173
            : null;
174
    }
175
176
    /**
177
     * @param DateTime $dateTime
178
     * @return FilesystemCategoryEntity
179
     */
180
    public function setDateModified(DateTime $dateTime) : FilesystemCategoryEntity
181
    {
182
        $this->container['date_modified'] = $dateTime->format('Y-m-d H:i:s');
183
184
        return $this;
185
    }
186
187
    /**
188
     * @return null|DateTime
189
     */
190
    public function getDateModified() : ? DateTime
191
    {
192
        return !empty($this->container['date_modified'])
193
            ? new DateTime($this->container['date_modified'])
194
            : null;
195
    }
196
}
197