Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | public function read() |
||
29 | { |
||
30 | if (!$this->task instanceof Task) { |
||
31 | return []; |
||
32 | } |
||
33 | |||
34 | return [ |
||
35 | 'id' => $this->task->id()->id(), |
||
36 | 'title' => $this->task->title()->title(), |
||
37 | 'priority' => $this->task->priority()->priority(), |
||
38 | 'progress' => $this->task->progress()->progress(), |
||
39 | 'description' => $this->task->description(), |
||
40 | 'created_on' => $this->task->createdOn()->format('Y-m-d'), |
||
41 | 'updated_on' => $this->task->updatedOn()->format('Y-m-d'), |
||
42 | 'project_id' => $this->task->projectId()->id(), |
||
43 | 'parent_id' => $this->task->parentId()->id(), |
||
44 | ]; |
||
45 | } |
||
46 | } |
||
47 |