Skip to content

Commit 631881e

Browse files
authored
Add recommendations to MovieFactory
MovieFactory did not transfer recommendations from response to data.
1 parent e2a56ee commit 631881e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

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)