Passed
Pull Request — master (#1)
by Jérémy
02:11
created
src/Model/TimeIntervalDto.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Model/TimeEntryDtoImpl.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -20,16 +20,16 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/Api/TimeEntry/TimeEntry.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,13 +26,13 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.