MyBuilder\App\ToDo\Cli\JsonFileTaskRepository::store PHP Method

store() public method

public store ( Task $task )
$task MyBuilder\Package\ToDo\Task
    public function store(Task $task)
    {
        $tasks = $this->fetchTaskJson();
        $tasks[] = array('title' => $task->getTitle(), 'description' => $task->getDescription());
        file_put_contents($this->filePath, json_encode($tasks));
    }