From 7fbcb2e4d68bb731b3acbc35c57ad000f9f0ac53 Mon Sep 17 00:00:00 2001 From: Michael Roterman Date: Sun, 3 Nov 2013 14:12:06 +0100 Subject: [PATCH] Updating PHP DocBlocks for Movies, make sure all properties are marked with their respective types. --- lib/Tmdb/Model/Movie.php | 124 +++++++++++++++++++++- lib/Tmdb/Model/Movie/AlternativeTitle.php | 20 +--- 2 files changed, 126 insertions(+), 18 deletions(-) diff --git a/lib/Tmdb/Model/Movie.php b/lib/Tmdb/Model/Movie.php index b929b8f6..d44742d6 100644 --- a/lib/Tmdb/Model/Movie.php +++ b/lib/Tmdb/Model/Movie.php @@ -29,9 +29,24 @@ class Movie extends AbstractModel { + /** + * @var bool + */ private $adult = false; + + /** + * @var Image + */ private $backdropPath; + + /** + * @var Collection + */ private $belongsToCollection = null; + + /** + * @var int + */ private $budget; /** @@ -40,26 +55,105 @@ class Movie extends AbstractModel { * @var Common\Genres */ private $genres; + + /** + * @var string + */ private $homepage; + + /** + * @var int + */ private $id; + + /** + * @var string + */ private $imdbId; + + /** + * @var string + */ private $originalTitle; + + /** + * @var string + */ private $overview; + + /** + * @var float + */ private $popularity; + + /** + * @var Image + */ private $posterPath; + + /** + * @var Collection + */ private $productionCompanies; + + /** + * @var Collection + */ private $productionCountries; + + /** + * @var \DateTime + */ private $releaseDate; + + /** + * @var int + */ private $revenue; + + /** + * @var int + */ private $runtime; + + /** + * @var Collection + */ private $spokenLanguages; + + /** + * @var string + */ private $status; + + /** + * @var string + */ private $tagline; + + /** + * @var title + */ private $title; + + /** + * @var float + */ private $voteAverage; + + /** + * @var int + */ private $voteCount; + /** + * @var Collection + */ protected $alternativeTitles; + + /** + * @var Collection + */ protected $changes; /** @@ -75,14 +169,42 @@ class Movie extends AbstractModel { * @var Common\Collection\Images */ protected $images; + + /** + * @var Collection + */ protected $keywords; + + /** + * @var Collection + */ protected $lists; + + /** + * @var Collection + */ protected $releases; + + /** + * @var Collection + */ protected $similarMovies; + + /** + * @var Collection + */ protected $trailers; - protected $translations; + /** + * @var Collection + */ + protected $translations; + /** + * Properties that are available in the API + * + * @var array + */ protected static $_properties = array( 'adult', 'backdrop_path', diff --git a/lib/Tmdb/Model/Movie/AlternativeTitle.php b/lib/Tmdb/Model/Movie/AlternativeTitle.php index 475b5e0a..808bf6cd 100644 --- a/lib/Tmdb/Model/Movie/AlternativeTitle.php +++ b/lib/Tmdb/Model/Movie/AlternativeTitle.php @@ -33,24 +33,10 @@ class AlternativeTitle extends AbstractModel { */ public static function fromArray(Client $client, array $data) { - $genre = new AlternativeTitle(); - //$genre->setClient($client); + $title = new AlternativeTitle(); + //$title->setClient($client); - return $genre->hydrate($data); - } - - /** - * Load a person with the given identifier - * - * @param Client $client - * @param $id - * @param $options - * @return $this - */ - public static function load(Client $client, $id, array $options = array()) { - $data = $client->api('genres')->getGenre($id, $options); - - return Genre::fromArray($client, $data); + return $title->hydrate($data); } /**