diff --git a/src/TodoList.php b/src/TodoList.php index c17252f..c777d3e 100644 --- a/src/TodoList.php +++ b/src/TodoList.php @@ -43,7 +43,7 @@ class TodoList return $this->todos; } - public function getTodoById(int $id): ?Todo + public function getTodoById(int $id): Todo { foreach ($this->todos as $todo) { if ($todo->getID() == $id) {