Skip to content

Commit

Permalink
remove unnecessary config validation
Browse files Browse the repository at this point in the history
  • Loading branch information
amalfra committed Jul 25, 2021
1 parent 5da5ba7 commit 0d58749
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ private function validate($config) {
if (count($config) == 0)
throw new ConfigException('Auth token and company need to be set.');

if (!isset($config['token'] ) || !ctype_alnum($config['token']))
throw new ConfigException('Invalid Token.');
if (!isset($config['token']))
throw new ConfigException('Token is required.');

if (!isset($config['company']) || !ctype_alnum($config['company']))
throw new ConfigException('Invalid Company name.');
if (!isset($config['company']))
throw new ConfigException('Company name is required.');
}

public function tickets($options = array()) {
Expand Down

0 comments on commit 0d58749

Please sign in to comment.