The `foreach` could be replaced with `$taskList = array_keys($taskMap);`