public function insertTask($task): Google_Service_Tasks
    {
        if ($task instanceof Tasks) {
            $task = $task->googleTasks;
        }

        return $this->service->tasks->insert($this->tasklist, $task);
    }
public function insertTask($task): Google_Service_Tasks
    {
        if ($task instanceof Tasks) {
            $task = $task->googleTasks;
        }

        return $this->service->tasks->insert($this->tasklist, $task);
    }
public function insertTask ( $ task ) : Google_Service_Tasks { if ( $ task instanceof Tasks ) { $ task = $ task -> googleTasks ; } return $ this -> service -> tasks -> insert ( $ this -> tasklist , $ task ) ; }
Insert a task.

@param \BobFridley\GoogleTasks\Tasks|Google_Service_Tasks $task

@link https://developers.google.com/google-apps/tasks/v1/reference/tasks/insert

@return \Google_Service_Tasks
Insert a task .