Passed
Push — master ( 4b954d...b01812 )
by Gabor
03:38
created

ApplicationEntity::getApplicationId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 4
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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;
13
14
use DateTime;
15
16
/**
17
 * Class ApplicationEntity.
18
 */
19 View Code Duplication
class ApplicationEntity 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...
20
{
21
    /** @var int */
22
    private $applicationId;
23
    /** @var string */
24
    private $name;
25
    /** @var string */
26
    private $title;
27
    /** @var string */
28
    private $description;
29
    /** @var bool */
30
    private $isReadOnly;
31
    /** @var DateTime */
32
    private $dateCreated;
33
    /** @var DateTime */
34
    private $dateModified;
35
36
    /**
37
     * Sets the value of the entity identifier.
38
     *
39
     * @param int $entityId
40
     * @return ApplicationEntity
41
     */
42 1
    public function setKeyData($entityId)
43
    {
44 1
        $this->applicationId = $entityId;
45
46 1
        return $this;
47
    }
48
49
    /**
50
     * Gets the value of the entity identifier.
51
     *
52
     * @return int
53
     */
54 2
    public function getKeyData()
55
    {
56 2
        return $this->applicationId;
57
    }
58
59
    /**
60
     * @param int $applicationId
61
     *
62
     * @return ApplicationEntity
63
     */
64 6
    public function setApplicationId($applicationId)
65
    {
66 6
        $this->applicationId = $applicationId;
67
68 6
        return $this;
69
    }
70
71
    /**
72
     * @return int
73
     */
74 3
    public function getApplicationId()
75
    {
76 3
        return $this->applicationId;
77
    }
78
79
    /**
80
     * @param string $name
81
     *
82
     * @return ApplicationEntity
83
     */
84 3
    public function setName($name)
85
    {
86 3
        $this->name = $name;
87
88 3
        return $this;
89
    }
90
91
    /**
92
     * @return string
93
     */
94 2
    public function getName()
95
    {
96 2
        return $this->name;
97
    }
98
99
    /**
100
     * @param string $title
101
     *
102
     * @return ApplicationEntity
103
     */
104 3
    public function setTitle($title)
105
    {
106 3
        $this->title = $title;
107
108 3
        return $this;
109
    }
110
111
    /**
112
     * @return string
113
     */
114 2
    public function getTitle()
115
    {
116 2
        return $this->title;
117
    }
118
119
    /**
120
     * @param string $description
121
     *
122
     * @return ApplicationEntity
123
     */
124 3
    public function setDescription($description)
125
    {
126 3
        $this->description = $description;
127
128 3
        return $this;
129
    }
130
131
    /**
132
     * @return string
133
     */
134 2
    public function getDescription()
135
    {
136 2
        return $this->description;
137
    }
138
139
    /**
140
     * @param bool $state
141
     *
142
     * @return ApplicationEntity
143
     */
144 3
    public function setReadOnly($state)
145
    {
146 3
        $this->isReadOnly = (bool) $state;
147
148 3
        return $this;
149
    }
150
151
    /**
152
     * @return bool
153
     */
154 2
    public function getReadOnly()
155
    {
156 2
        return $this->isReadOnly;
157
    }
158
159
    /**
160
     * @param DateTime $dateCreated
161
     *
162
     * @return ApplicationEntity
163
     */
164 3
    public function setDateCreated(DateTime $dateCreated)
165
    {
166 3
        $this->dateCreated = $dateCreated;
167
168 3
        return $this;
169
    }
170
171
    /**
172
     * @return DateTime
173
     */
174 2
    public function getDateCreated()
175
    {
176 2
        return $this->dateCreated;
177
    }
178
179
    /**
180
     * @param DateTime $dateModified
181
     *
182
     * @return ApplicationEntity
183
     */
184 3
    public function setDateModified(DateTime $dateModified)
185
    {
186 3
        $this->dateModified = $dateModified;
187
188 3
        return $this;
189
    }
190
191
    /**
192
     * @return DateTime
193
     */
194 2
    public function getDateModified()
195
    {
196 2
        return $this->dateModified;
197
    }
198
}
199