Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
Last shot for 100% test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
iranianpep committed Jul 12, 2017
1 parent 1de73f7 commit 8c9b5d8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Darksky/Darksky.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ private function generateUrlQueryString(array $exclude = [], $extend = false)
{
$queryString = ['lang' => $this->getLanguage(), 'units' => $this->getUnits()];

if (!empty($exclude)) {
// validate $exclude
if ($this->validateExcludes($exclude) !== true) {
$validExcludes = implode(',', self::VALID_EXCLUDE);
throw new \Exception("Invalid excludes. Provide valid excludes: {$validExcludes}'");
}
// validate $exclude
if ($this->validateExcludes($exclude) !== true) {
$validExcludes = implode(',', self::VALID_EXCLUDE);
throw new \Exception("Invalid excludes. Provide valid excludes: {$validExcludes}'");
}

if (!empty($exclude)) {
$queryString['exclude'] = implode(',', $exclude);
}

Expand Down

0 comments on commit 8c9b5d8

Please sign in to comment.