@@ -15,9 +15,9 @@ |
||
| 15 | 15 | public static function fromArray(array $data): self |
| 16 | 16 | { |
| 17 | 17 | return new self( |
| 18 | - new DateTimeImmutable($data['start']), |
|
| 19 | - new DateTimeImmutable($data['end']), |
|
| 20 | - $data['duration'] |
|
| 18 | + new DateTimeImmutable($data[ 'start' ]), |
|
| 19 | + new DateTimeImmutable($data[ 'end' ]), |
|
| 20 | + $data[ 'duration' ] |
|
| 21 | 21 | ); |
| 22 | 22 | } |
| 23 | 23 | |
@@ -20,16 +20,16 @@ |
||
| 20 | 20 | public static function fromArray(array $data): self |
| 21 | 21 | { |
| 22 | 22 | return new self( |
| 23 | - $data['billable'], |
|
| 24 | - $data['description'], |
|
| 25 | - $data['id'], |
|
| 26 | - $data['isLocked'], |
|
| 27 | - $data['projectId'], |
|
| 28 | - $data['tagIds'], |
|
| 29 | - $data['taskId'], |
|
| 30 | - TimeIntervalDto::fromArray($data['timeInterval']), |
|
| 31 | - $data['userId'], |
|
| 32 | - $data['workspaceId'] |
|
| 23 | + $data[ 'billable' ], |
|
| 24 | + $data[ 'description' ], |
|
| 25 | + $data[ 'id' ], |
|
| 26 | + $data[ 'isLocked' ], |
|
| 27 | + $data[ 'projectId' ], |
|
| 28 | + $data[ 'tagIds' ], |
|
| 29 | + $data[ 'taskId' ], |
|
| 30 | + TimeIntervalDto::fromArray($data[ 'timeInterval' ]), |
|
| 31 | + $data[ 'userId' ], |
|
| 32 | + $data[ 'workspaceId' ] |
|
| 33 | 33 | ); |
| 34 | 34 | } |
| 35 | 35 | |
@@ -26,13 +26,13 @@ |
||
| 26 | 26 | return TimeEntryDtoImpl::fromArray($data); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - public function entry(string $workspaceId, string $id, array $params = []): TimeEntryDtoImpl |
|
| 29 | + public function entry(string $workspaceId, string $id, array $params = [ ]): TimeEntryDtoImpl |
|
| 30 | 30 | { |
| 31 | - if (isset($params['consider-duration-format']) && !is_bool($params['consider-duration-format'])) { |
|
| 31 | + if (isset($params[ 'consider-duration-format' ]) && !is_bool($params[ 'consider-duration-format' ])) { |
|
| 32 | 32 | throw new ClockifyException('Invalid "consider-duration-format" parameter (should be a boolean value)'); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | - if (isset($params['hydrated']) && !is_bool($params['hydrated'])) { |
|
| 35 | + if (isset($params[ 'hydrated' ]) && !is_bool($params[ 'hydrated' ])) { |
|
| 36 | 36 | throw new ClockifyException('Invalid "hydrated" parameter (should be a boolean value)'); |
| 37 | 37 | } |
| 38 | 38 | |