Skip to content

Commit 25bf656

Browse files
authored
Merge pull request #182 from werstreamtes/fix-recommendations-in-factories
Add recommendations to MovieFactory
2 parents e2a56ee + 631881e commit 25bf656

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Tmdb/Factory/MovieFactory.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ public function create(array $data = [])
193193
$movie->setSimilar($this->createResultCollection($data['similar']));
194194
}
195195

196+
if (array_key_exists('recommendations', $data)) {
197+
$movie->setRecommendations($this->createResultCollection($data['recommendations']));
198+
}
199+
196200
if (array_key_exists('reviews', $data)) {
197201
$movie->setReviews($this->getReviewFactory()->createResultCollection($data['reviews']));
198202
}

0 commit comments

Comments
 (0)