Conditions | 5 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function entry(string $workspaceId, string $id, array $params = []): TimeEntryDtoImpl |
||
30 | { |
||
31 | if (isset($params['consider-duration-format']) && !is_bool($params['consider-duration-format'])) { |
||
32 | throw new ClockifyException('Invalid "consider-duration-format" parameter (should be a boolean value)'); |
||
33 | } |
||
34 | |||
35 | if (isset($params['hydrated']) && !is_bool($params['hydrated'])) { |
||
36 | throw new ClockifyException('Invalid "hydrated" parameter (should be a boolean value)'); |
||
37 | } |
||
38 | |||
39 | $data = $this->http->get("/workspaces/$workspaceId/time-entries/$id", $params); |
||
40 | |||
41 | return TimeEntryDtoImpl::fromArray($data); |
||
42 | } |
||
44 |