Passed
Push — master ( c12552...22ad80 )
by Gabor
04:56
created

FilesystemDirectoryEntity   A

Complexity

Total Complexity 16

Size/Duplication

Total Lines 173
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 16
lcom 1
cbo 0
dl 0
loc 173
ccs 0
cts 72
cp 0
rs 10
c 0
b 0
f 0

16 Methods

Rating   Name   Duplication   Size   Complexity  
A setKeyData() 0 6 1
A getKeyData() 0 4 1
A setFilesystemDirectoryId() 0 6 1
A getFilesystemDirectoryId() 0 4 1
A setDescription() 0 6 1
A getDescription() 0 4 1
A setDirectoryType() 0 6 1
A getDirectoryType() 0 4 1
A setProxy() 0 6 1
A getProxy() 0 4 1
A setAutoIndex() 0 6 1
A getAutoIndex() 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 FilesystemDirectoryEntity.
21
 */
22
class FilesystemDirectoryEntity implements EntityInterface
23
{
24
    /** @var int */
25
    private $filesystemDirectoryId;
26
    /** @var string */
27
    private $description;
28
    /** @var string */
29
    private $directoryType;
30
    /** @var string */
31
    private $proxy;
32
    /** @var bool */
33
    private $isAutoIndex;
34
    /** @var DateTime */
35
    private $dateCreated;
36
    /** @var DateTime */
37
    private $dateModified;
38
39
    /**
40
     * Sets the value of the entity identifier.
41
     *
42
     * @param int $entityId
43
     * @return FilesystemDirectoryEntity
44
     */
45
    public function setKeyData(int $entityId) : FilesystemDirectoryEntity
46
    {
47
        $this->filesystemDirectoryId = $entityId;
48
49
        return $this;
50
    }
51
52
    /**
53
     * Gets the value of the entity identifier.
54
     *
55
     * @return null|int
56
     */
57
    public function getKeyData() : ? int
58
    {
59
        return $this->filesystemDirectoryId;
60
    }
61
62
    /**
63
     * @param int $filesystemDirectoryId
64
     * @return FilesystemDirectoryEntity
65
     */
66
    public function setFilesystemDirectoryId(int $filesystemDirectoryId) : FilesystemDirectoryEntity
67
    {
68
        $this->filesystemDirectoryId = $filesystemDirectoryId;
69
70
        return $this;
71
    }
72
73
    /**
74
     * @return null|int
75
     */
76
    public function getFilesystemDirectoryId() : ? int
77
    {
78
        return $this->filesystemDirectoryId;
79
    }
80
81
    /**
82
     * @param string $description
83
     * @return FilesystemDirectoryEntity
84
     */
85
    public function setDescription(string $description) : FilesystemDirectoryEntity
86
    {
87
        $this->description = $description;
88
89
        return $this;
90
    }
91
92
    /**
93
     * @return null|string
94
     */
95
    public function getDescription() : ? string
96
    {
97
        return $this->description;
98
    }
99
100
    /**
101
     * @param string $directoryType
102
     * @return FilesystemDirectoryEntity
103
     */
104
    public function setDirectoryType(string $directoryType) : FilesystemDirectoryEntity
105
    {
106
        $this->directoryType = $directoryType;
107
108
        return $this;
109
    }
110
111
    /**
112
     * @return null|string
113
     */
114
    public function getDirectoryType() : ? string
115
    {
116
        return $this->directoryType;
117
    }
118
119
    /**
120
     * @param string $proxy
121
     * @return FilesystemDirectoryEntity
122
     */
123
    public function setProxy(? string $proxy) : FilesystemDirectoryEntity
124
    {
125
        $this->proxy = $proxy;
126
127
        return $this;
128
    }
129
130
    /**
131
     * @return null|string
132
     */
133
    public function getProxy() : ? string
134
    {
135
        return $this->proxy;
136
    }
137
138
    /**
139
     * @param bool $state
140
     * @return FilesystemDirectoryEntity
141
     */
142
    public function setAutoIndex(bool $state) : FilesystemDirectoryEntity
143
    {
144
        $this->isAutoIndex = $state;
145
146
        return $this;
147
    }
148
149
    /**
150
     * @return bool
151
     */
152
    public function getAutoIndex() : bool
153
    {
154
        return $this->isAutoIndex ?? false;
155
    }
156
157
    /**
158
     * @param DateTime $dateCreated
159
     * @return FilesystemDirectoryEntity
160
     */
161
    public function setDateCreated(DateTime $dateCreated) : FilesystemDirectoryEntity
162
    {
163
        $this->dateCreated = $dateCreated;
164
165
        return $this;
166
    }
167
168
    /**
169
     * @return null|DateTime
170
     */
171
    public function getDateCreated() : ? DateTime
172
    {
173
        return $this->dateCreated;
174
    }
175
176
    /**
177
     * @param DateTime $dateModified
178
     * @return FilesystemDirectoryEntity
179
     */
180
    public function setDateModified(DateTime $dateModified) : FilesystemDirectoryEntity
181
    {
182
        $this->dateModified = $dateModified;
183
184
        return $this;
185
    }
186
187
    /**
188
     * @return null|DateTime
189
     */
190
    public function getDateModified() : ? DateTime
191
    {
192
        return $this->dateModified;
193
    }
194
}
195