We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TasksResults
Task
1 parent b1d5738 commit 1a6811fCopy full SHA for 1a6811f
src/Contracts/TasksResults.php
@@ -28,7 +28,7 @@ class TasksResults extends Data
28
29
public function __construct(array $params)
30
{
31
- parent::__construct($params['results'] ?? []);
+ parent::__construct(isset($params['results']) ? array_map(static fn (array $data) => Task::fromArray($data), $params['results']) : []);
32
33
$this->from = $params['from'] ?? 0;
34
$this->limit = $params['limit'] ?? 0;
@@ -37,7 +37,7 @@ public function __construct(array $params)
37
}
38
39
/**
40
- * @return array<int, array>
+ * @return array<int, Task>
41
*/
42
public function getResults(): array
43
0 commit comments