From 8977f8cec4ca88f13528792a453eb27328e22845 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Sun, 14 Nov 2021 08:49:37 +0000 Subject: Add description to todo --- src/DTS/TodoRepository.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/DTS/TodoRepository.php') diff --git a/src/DTS/TodoRepository.php b/src/DTS/TodoRepository.php index 5ec759f..358ac9d 100644 --- a/src/DTS/TodoRepository.php +++ b/src/DTS/TodoRepository.php @@ -124,8 +124,9 @@ class TodoRepository implements \Iterator $todo->id = $id++; $todo->task = $data[0]; - $todo->tag = $data[1]; - $todo->addedAt = $data[2]; + $todo->description = $data[1]; + $todo->tag = $data[2]; + $todo->addedAt = $data[3]; $this->repository[] = $todo; @@ -150,6 +151,7 @@ class TodoRepository implements \Iterator foreach ($this->repository as $todo) { $success = $success && fputcsv($fp, [ $todo->task, + $todo->description, $todo->tag, $todo->addedAt, ]) !== false; -- cgit v1.2.3-13-gbd6f