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

UserGroupEntity::setDateModified()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
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\User;
13
14
use DateTime;
15
use WebHemi\Data\Entity\DataEntityInterface;
16
17
/**
18
 * Class UserGroupEntity.
19
 */
20
class UserGroupEntity implements DataEntityInterface
21
{
22
    /** @var int */
23
    private $userGroupId;
24
    /** @var string */
25
    private $title;
26
    /** @var string */
27
    private $description;
28
    /** @var bool */
29
    private $isReadOnly;
30
    /** @var DateTime */
31
    private $dateCreated;
32
    /** @var DateTime */
33
    private $dateModified;
34
35
    /**
36
     * Gets the value of the entity identifier.
37
     *
38
     * @return int
39
     */
40 1
    public function getKeyData()
41
    {
42 1
        return $this->userGroupId;
43
    }
44
45
    /**
46
     * @param int $userGroupId
47
     *
48
     * @return UserGroupEntity
49
     */
50 5
    public function setUserGroupId($userGroupId)
51
    {
52 5
        $this->userGroupId = $userGroupId;
53
54 5
        return $this;
55
    }
56
57
    /**
58
     * @return int
59
     */
60 3
    public function getUserGroupId()
61
    {
62 3
        return $this->userGroupId;
63
    }
64
65
    /**
66
     * @param string $title
67
     *
68
     * @return UserGroupEntity
69
     */
70 2
    public function setTitle($title)
71
    {
72 2
        $this->title = $title;
73
74 2
        return $this;
75
    }
76
77
    /**
78
     * @return string
79
     */
80 1
    public function getTitle()
81
    {
82 1
        return $this->title;
83
    }
84
85
    /**
86
     * @param string $description
87
     *
88
     * @return UserGroupEntity
89
     */
90 2
    public function setDescription($description)
91
    {
92 2
        $this->description = $description;
93
94 2
        return $this;
95
    }
96
97
    /**
98
     * @return string
99
     */
100 1
    public function getDescription()
101
    {
102 1
        return $this->description;
103
    }
104
105
    /**
106
     * @param bool $state
107
     *
108
     * @return UserGroupEntity
109
     */
110 2
    public function setReadOnly($state)
111
    {
112 2
        $this->isReadOnly = (bool) $state;
113
114 2
        return $this;
115
    }
116
117
    /**
118
     * @return bool
119
     */
120 1
    public function getReadOnly()
121
    {
122 1
        return $this->isReadOnly;
123
    }
124
125
    /**
126
     * @param DateTime $dateCreated
127
     *
128
     * @return UserGroupEntity
129
     */
130 2
    public function setDateCreated(DateTime $dateCreated)
131
    {
132 2
        $this->dateCreated = $dateCreated;
133
134 2
        return $this;
135
    }
136
137
    /**
138
     * @return DateTime
139
     */
140 1
    public function getDateCreated()
141
    {
142 1
        return $this->dateCreated;
143
    }
144
145
    /**
146
     * @param DateTime $dateModified
147
     *
148
     * @return UserGroupEntity
149
     */
150 2
    public function setDateModified(DateTime $dateModified)
151
    {
152 2
        $this->dateModified = $dateModified;
153
154 2
        return $this;
155
    }
156
157
    /**
158
     * @return DateTime
159
     */
160 1
    public function getDateModified()
161
    {
162 1
        return $this->dateModified;
163
    }
164
}
165