Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ossycodes committed Sep 21, 2023
1 parent 0b1c899 commit 63d4e34
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,8 @@ public function __construct(Configuration $config, ?HttpClient $httpClient = nul
{
$this->config = $config;

if ($this->config->getUsername() === null) {
throw new AuthenticateException('Cannot perform API Request without username set');
}

if ($this->config->getPassword() === null) {
throw new AuthenticateException('Cannot perform API Request without password set');
if (empty($this->config->getUsername()) || empty($this->config->getPassword())) {
throw new AuthenticateException('Cannot perform API Requests without username and password set');
}

$this->httpClient = new HttpClient(self::ENDPOINT, $this->config);
Expand Down

0 comments on commit 63d4e34

Please sign in to comment.