Skip to content

Commit

Permalink
Merge pull request #235 from php-tmdb/issue/233
Browse files Browse the repository at this point in the history
Issue with getting languages from a tv show, fixes #233
  • Loading branch information
wtfzdotnet authored Apr 15, 2021
2 parents 701806e + be1f0c2 commit 0980c7d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/Tmdb/Model/Tv.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use Tmdb\Model\Collection\Videos;
use Tmdb\Model\Common\ExternalIds;
use Tmdb\Model\Common\GenericCollection;
use Tmdb\Model\Common\SpokenLanguage;
use Tmdb\Model\Image\BackdropImage;
use Tmdb\Model\Image\PosterImage;
use Tmdb\Model\Tv\Episode;
Expand Down Expand Up @@ -162,7 +163,7 @@ class Tv extends AbstractModel
*/
private $inProduction;
/**
* @var array
* @var GenericCollection|SpokenLanguage[]
*/
private $languages;
/**
Expand Down Expand Up @@ -256,6 +257,7 @@ public function __construct()
$this->recommendations = new GenericCollection();
$this->contentRatings = new GenericCollection();
$this->alternativeTitles = new GenericCollection();
$this->languages = new GenericCollection();
}

/**
Expand Down Expand Up @@ -434,9 +436,9 @@ public function setInProduction($inProduction)
}

/**
* @return array
* @return GenericCollection
*/
public function getLanguages(): array
public function getLanguages(): GenericCollection
{
return $this->languages;
}
Expand Down

0 comments on commit 0980c7d

Please sign in to comment.