TimelogResourceModel::setHours()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

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 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of the zibios/wrike-php-jmsserializer package.
5
 *
6
 * (c) Zbigniew Ślązak
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Zibios\WrikePhpJmsserializer\Model\Timelog;
13
14
use JMS\Serializer\Annotation as SA;
15
use Zibios\WrikePhpJmsserializer\Model\AbstractModel;
16
use Zibios\WrikePhpJmsserializer\Model\ResourceModelInterface;
17
18
/**
19
 * Timelog Resource Model.
20
 */
21
class TimelogResourceModel extends AbstractModel implements ResourceModelInterface
22
{
23
    /**
24
     * Timelog Entry ID.
25
     *
26
     * Timelog: Timelog Entry ID
27
     *
28
     * @SA\Type("string")
29
     * @SA\SerializedName("id")
30
     *
31
     * @var string|null
32
     */
33
    protected $id;
34
35
    /**
36
     * Task to which timelog record is tracked.
37
     *
38
     * Timelog: Task ID
39
     *
40
     * @SA\Type("string")
41
     * @SA\SerializedName("taskId")
42
     *
43
     * @var string|null
44
     */
45
    protected $taskId;
46
47
    /**
48
     * User who tracked the timelog record.
49
     *
50
     * Timelog: Contact ID
51
     *
52
     * @SA\Type("string")
53
     * @SA\SerializedName("userId")
54
     *
55
     * @var string|null
56
     */
57
    protected $userId;
58
59
    /**
60
     * Hours tracked in timelog record, must be in [0..24] hours range.
61
     *
62
     * @SA\Type("float")
63
     * @SA\SerializedName("hours")
64
     *
65
     * @var float|null
66
     */
67
    protected $hours;
68
69
    /**
70
     * Date of timelog was created in user's timezone.
71
     *
72
     * Format: yyyy-MM-dd'T'HH:mm:ss'Z'
73
     *
74
     * @SA\Type("string")
75
     * @SA\SerializedName("createdDate")
76
     *
77
     * @var string|null
78
     */
79
    protected $createdDate;
80
81
    /**
82
     * Date for which timelog was recorded.
83
     *
84
     * Format: yyyy-MM-dd
85
     *
86
     * @SA\Type("string")
87
     * @SA\SerializedName("trackedDate")
88
     *
89
     * @var string|null
90
     */
91
    protected $trackedDate;
92
93
    /**
94
     * Timelog record comment.
95
     *
96
     * @SA\Type("string")
97
     * @SA\SerializedName("comment")
98
     *
99
     * @var string|null
100
     */
101
    protected $comment;
102
103
    /**
104
     * @return null|string
105
     */
106 1
    public function getId()
107
    {
108 1
        return $this->id;
109
    }
110
111
    /**
112
     * @param null|string $id
113
     *
114
     * @return $this
115
     */
116 1
    public function setId($id)
117
    {
118 1
        $this->id = $id;
119
120 1
        return $this;
121
    }
122
123
    /**
124
     * @return null|string
125
     */
126 1
    public function getTaskId()
127
    {
128 1
        return $this->taskId;
129
    }
130
131
    /**
132
     * @param null|string $taskId
133
     *
134
     * @return $this
135
     */
136 1
    public function setTaskId($taskId)
137
    {
138 1
        $this->taskId = $taskId;
139
140 1
        return $this;
141
    }
142
143
    /**
144
     * @return null|string
145
     */
146 1
    public function getUserId()
147
    {
148 1
        return $this->userId;
149
    }
150
151
    /**
152
     * @param null|string $userId
153
     *
154
     * @return $this
155
     */
156 1
    public function setUserId($userId)
157
    {
158 1
        $this->userId = $userId;
159
160 1
        return $this;
161
    }
162
163
    /**
164
     * @return float|null
165
     */
166 1
    public function getHours()
167
    {
168 1
        return $this->hours;
169
    }
170
171
    /**
172
     * @param float|null $hours
173
     *
174
     * @return $this
175
     */
176 1
    public function setHours($hours)
177
    {
178 1
        $this->hours = $hours;
179
180 1
        return $this;
181
    }
182
183
    /**
184
     * @return string|null
185
     */
186 1
    public function getCreatedDate()
187
    {
188 1
        return $this->createdDate;
189
    }
190
191
    /**
192
     * @param string|null $createdDate
193
     *
194
     * @return $this
195
     */
196 1
    public function setCreatedDate($createdDate)
197
    {
198 1
        $this->createdDate = $createdDate;
199
200 1
        return $this;
201
    }
202
203
    /**
204
     * @return string|null
205
     */
206 1
    public function getTrackedDate()
207
    {
208 1
        return $this->trackedDate;
209
    }
210
211
    /**
212
     * @param string|null $trackedDate
213
     *
214
     * @return $this
215
     */
216 1
    public function setTrackedDate($trackedDate)
217
    {
218 1
        $this->trackedDate = $trackedDate;
219
220 1
        return $this;
221
    }
222
223
    /**
224
     * @return null|string
225
     */
226 1
    public function getComment()
227
    {
228 1
        return $this->comment;
229
    }
230
231
    /**
232
     * @param null|string $comment
233
     *
234
     * @return $this
235
     */
236 1
    public function setComment($comment)
237
    {
238 1
        $this->comment = $comment;
239
240 1
        return $this;
241
    }
242
}
243