Passed
Push — master ( 64ab61...b96172 )
by Gabor
09:36
created

ResourceEntity::getTitle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * WebHemi.
4
 *
5
 * PHP version 5.6
6
 *
7
 * @copyright 2012 - 2016 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
namespace WebHemi\Data\Entity\AccessManagement;
13
14
use DateTime;
15
use WebHemi\Data\Entity\DataEntityInterface;
16
17
/**
18
 * Class ResourceEntity.
19
 */
20 View Code Duplication
class ResourceEntity implements DataEntityInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
21
{
22
    /** @var int */
23
    private $resourceId;
24
    /** @var string */
25
    private $name;
26
    /** @var string */
27
    private $title;
28
    /** @var string */
29
    private $description;
30
    /** @var bool */
31
    private $isReadOnly;
32
    /** @var DateTime */
33
    private $dateCreated;
34
    /** @var DateTime */
35
    private $dateModified;
36
37
    /**
38
     * Gets the value of the entity identifier.
39
     *
40
     * @return int
41
     */
42
    public function getKeyData()
43
    {
44
        return $this->resourceId;
45
    }
46
47
    /**
48
     * @param int $resourceId
49
     *
50
     * @return ResourceEntity
51
     */
52
    public function setResourceId($resourceId)
53
    {
54
        $this->resourceId = $resourceId;
55
56
        return $this;
57
    }
58
59
    /**
60
     * @return int
61
     */
62
    public function getResourceId()
63
    {
64
        return $this->resourceId;
65
    }
66
67
    /**
68
     * @param string $name
69
     *
70
     * @return ResourceEntity
71
     */
72
    public function setName($name)
73
    {
74
        $this->name = $name;
75
76
        return $this;
77
    }
78
79
    /**
80
     * @return string
81
     */
82
    public function getName()
83
    {
84
        return $this->name;
85
    }
86
87
    /**
88
     * @param string $title
89
     *
90
     * @return ResourceEntity
91
     */
92
    public function setTitle($title)
93
    {
94
        $this->title = $title;
95
96
        return $this;
97
    }
98
99
    /**
100
     * @return string
101
     */
102
    public function getTitle()
103
    {
104
        return $this->title;
105
    }
106
107
    /**
108
     * @param string $description
109
     *
110
     * @return ResourceEntity
111
     */
112
    public function setDescription($description)
113
    {
114
        $this->description = $description;
115
116
        return $this;
117
    }
118
119
    /**
120
     * @return string
121
     */
122
    public function getDescription()
123
    {
124
        return $this->description;
125
    }
126
127
    /**
128
     * @param bool $state
129
     *
130
     * @return ResourceEntity
131
     */
132
    public function setReadOnly($state)
133
    {
134
        $this->isReadOnly = (bool) $state;
135
136
        return $this;
137
    }
138
139
    /**
140
     * @return bool
141
     */
142
    public function getReadOnly()
143
    {
144
        return $this->isReadOnly;
145
    }
146
147
    /**
148
     * @param DateTime $dateCreated
149
     *
150
     * @return ResourceEntity
151
     */
152
    public function setDateCreated(DateTime $dateCreated)
153
    {
154
        $this->dateCreated = $dateCreated;
155
156
        return $this;
157
    }
158
159
    /**
160
     * @return DateTime
161
     */
162
    public function getDateCreated()
163
    {
164
        return $this->dateCreated;
165
    }
166
167
    /**
168
     * @param DateTime $dateModified
169
     *
170
     * @return ResourceEntity
171
     */
172
    public function setDateModified(DateTime $dateModified)
173
    {
174
        $this->dateModified = $dateModified;
175
176
        return $this;
177
    }
178
179
    /**
180
     * @return DateTime
181
     */
182
    public function getDateModified()
183
    {
184
        return $this->dateModified;
185
    }
186
}
187