public function getCurrentUser(): User
    {
        try {
            $user = UserFactory::createFromAPIResponse($this->client->getUser());
        } catch (ClientException $ce) {
            $response = $ce->getResponse();

            throw ExceptionFactory::create($response, $ce);
        }

        return $user;
    }
public function getCurrentUser(): User
    {
        try {
            $user = UserFactory::createFromAPIResponse($this->client->getUser());
        } catch (ClientException $ce) {
            $response = $ce->getResponse();

            throw ExceptionFactory::create($response, $ce);
        }

        return $user;
    }
public function getCurrentUser ( ) : User { try { $ user = UserFactory :: createFromAPIResponse ( $ this -> client -> getUser ( ) ) ; } catch ( ClientException $ ce ) { $ response = $ ce -> getResponse ( ) ; throw ExceptionFactory :: create ( $ response , $ ce ) ; } return $ user ; }
Returns the current user.

@return User

@throws MoovlyException
Returns the current user .