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 7b53b52 commit 5c7a8ecCopy full SHA for 5c7a8ec
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