Skip to content

Commit

Permalink
Fix: Removed double hydrator
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolajlovenhardt committed Jun 19, 2017
1 parent 110a196 commit b016e09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/SpotOnLive/AccuRanker/Models/Keyword.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function __construct(
$createdAt,
$searchLocale,
$starred,
array $tags,
array $tags = [],
$searchVolume,
Rank $rank = null,
array $history = []
Expand All @@ -85,7 +85,7 @@ public function __construct(
$this->createdAt = ($createdAt instanceof DateTime) ? $createdAt : new DateTime($createdAt);
$this->searchLocale = $searchLocale;
$this->starred = $starred;
$this->tags = $tags;
$this->tags = (is_array($tags)) ? $tags : [];
$this->searchVolume = $searchVolume;
$this->rank = $rank;
$this->history = $history;
Expand Down
1 change: 0 additions & 1 deletion src/SpotOnLive/AccuRanker/Resources/Keywords.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ private function convertResponseToKeyword(array $response)
}

if ($rank) {
$rank = $hydrator->hydrate(Rank::class, $rank);
$keyword->setRank($rank);
}

Expand Down

0 comments on commit b016e09

Please sign in to comment.