diff --git a/src/TogglApi.php b/src/TogglApi.php index 5d35c80..6188ec8 100644 --- a/src/TogglApi.php +++ b/src/TogglApi.php @@ -61,13 +61,13 @@ public function createClient($workspaceId, $clientName) * Update client. * * @param int $clientId - * @param array $clientData + * @param array $client * * @return bool|mixed|object */ - public function updateClient($workspaceId, $clientId, $clientData) + public function updateClient($workspaceId, $clientId, $client) { - return $this->PUT('clients/'.$clientId, ['client' => $clientData]); + return $this->workspace($workspaceId)->updateClient($clientId, $client); } /** diff --git a/src/TogglTrackWorkspaceApi.php b/src/TogglTrackWorkspaceApi.php index 89c72dd..724430f 100644 --- a/src/TogglTrackWorkspaceApi.php +++ b/src/TogglTrackWorkspaceApi.php @@ -73,13 +73,13 @@ public function createClient($clientData) * Update client. * * @param int $clientId - * @param array $clientData + * @param array $client * * @return bool|mixed|object */ - public function updateClient($clientId, $clientData) + public function updateClient($clientId, $client) { - return $this->PUT('clients/' . $clientId, ['client' => $clientData]); + return $this->PUT("clients/{$clientId}", $client); } /**