Passed
Push — master ( e14a05...ed0db1 )
by Gabor
05:13
created

FilesystemCategoryEntity   A

Complexity

Total Complexity 20

Size/Duplication

Total Lines 174
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 174
ccs 48
cts 48
cp 1
rs 10
c 0
b 0
f 0
wmc 20

16 Methods

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