Conditions | 5 |
Paths | 16 |
Total Lines | 19 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 5 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | 1 | public function hydrate(array $data, $object): WorkLogEntry |
|
37 | { |
||
38 | 1 | if (isset($data['issueID'])) { |
|
39 | 1 | $object->setIssueID($data['issueID']); |
|
40 | } |
||
41 | |||
42 | 1 | if (isset($data['timeSpent'])) { |
|
43 | 1 | $object->setTimeSpent($data['timeSpent']); |
|
44 | } |
||
45 | |||
46 | 1 | if (isset($data['comment'])) { |
|
47 | 1 | $object->setComment($data['comment']); |
|
48 | } |
||
49 | |||
50 | 1 | if (isset($data['spentOn'])) { |
|
51 | 1 | $object->setSpentOn(new \DateTimeImmutable($data['spentOn'])); |
|
52 | } |
||
53 | |||
54 | 1 | return $object; |
|
55 | } |
||
57 |