Skip to content

Commit

Permalink
Updating docblocks to help IDE auto-completion
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfzdotnet committed Jan 19, 2014
1 parent a0fa24a commit 02ca249
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 86 deletions.
5 changes: 3 additions & 2 deletions lib/Tmdb/Repository/ChangesRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

use Tmdb\Factory\MovieFactory;
use Tmdb\Factory\People\PeopleFactory;
use Tmdb\Model\Collection\People;
use Tmdb\Model\Common\GenericCollection;
use Tmdb\Model\Movie;
use Tmdb\Model\Query\ChangesQuery;
Expand All @@ -31,7 +32,7 @@ class ChangesRepository extends AbstractRepository {
*
* @param ChangesQuery $query
* @param array $headers
* @return GenericCollection
* @return Movie[]
*/
public function getMovieChanges(ChangesQuery $query, array $headers = array()) {
$data = $this->getApi()->getMovieChanges($query->toArray(), $this->parseHeaders($headers));
Expand All @@ -51,7 +52,7 @@ public function getMovieChanges(ChangesQuery $query, array $headers = array()) {
*
* @param ChangesQuery $query
* @param array $headers
* @return GenericCollection
* @return People
*/
public function getPeopleChanges(ChangesQuery $query, array $headers = array()) {
$data = $this->getApi()->getPeopleChanges($query->toArray(), $this->parseHeaders($headers));
Expand Down
2 changes: 1 addition & 1 deletion lib/Tmdb/Repository/CollectionRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function getApi()
* @param $id
* @param array $parameters
* @param array $headers
* @return Images
* @return ApiCollection\Images
*/
public function getImages($id, array $parameters = array(), array $headers = array())
{
Expand Down
12 changes: 0 additions & 12 deletions lib/Tmdb/Repository/CompanyRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,6 @@ public function load($id, array $parameters = array(), array $headers = array())
return CompanyFactory::create($data);
}

/**
* If you obtained an person model which is not completely hydrated, you can use this function.
*
* @param Company $company
* @param array $parameters
* @param array $headers
* @return Company
*/
public function refresh(Company $company, array $parameters = array(), array $headers = array()) {
return $this->load($company->getId(), $parameters, $headers);
}

/**
* Return the related API class
*
Expand Down
7 changes: 4 additions & 3 deletions lib/Tmdb/Repository/DiscoverRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
use Tmdb\Exception\RuntimeException;
use Tmdb\Factory\MovieFactory;
use Tmdb\Factory\TvFactory;
use Tmdb\Model\Common\GenericCollection;
use Tmdb\Model\Movie;
use Tmdb\Model\Query\Discover\DiscoverMoviesQuery;
use Tmdb\Model\Query\Discover\DiscoverTvQuery;
use Tmdb\Model\Tv;

class DiscoverRepository extends AbstractRepository {
/**
Expand All @@ -26,7 +27,7 @@ class DiscoverRepository extends AbstractRepository {
* @param DiscoverMoviesQuery $query
* @param array $headers
* @throws RuntimeException when certification_country is set but certification.lte is not given
* @return GenericCollection
* @return Movie[]
*/
public function discoverMovies(DiscoverMoviesQuery $query, array $headers = array()) {
$query = $query->toArray();
Expand All @@ -45,7 +46,7 @@ public function discoverMovies(DiscoverMoviesQuery $query, array $headers = arra
*
* @param DiscoverTvQuery $query
* @param array $headers
* @return GenericCollection
* @return Tv[]
*/
public function discoverTv(DiscoverTvQuery $query, array $headers = array()) {
$data = $this->getApi()->discoverTv($query->toArray(), $this->parseHeaders($headers));
Expand Down
4 changes: 2 additions & 2 deletions lib/Tmdb/Repository/GenreRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function load($id, array $parameters = array(), array $headers = array())
*
* @param array $parameters
* @param array $headers
* @return GenericCollection
* @return Genre[]
*/
public function loadCollection(array $parameters = array(), array $headers = array())
{
Expand All @@ -47,7 +47,7 @@ public function loadCollection(array $parameters = array(), array $headers = arr
* Create an collection of an array
*
* @param $data
* @return GenericCollection
* @return Genre[]
*/
private function createCollection($data){
$collection = new GenericCollection();
Expand Down
27 changes: 5 additions & 22 deletions lib/Tmdb/Repository/MovieRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,6 @@ public function load($id, array $parameters = array(), array $headers = array())
return MovieFactory::create($data);
}

/**
* If you obtained an movie model which is not completely hydrated, you can use this function.
*
* @todo store the previous given parameters so the same conditions apply to a refresh, and merge the new set
*
* @param Movie $movie
* @param array $parameters
* @param array $headers
* @return Movie
*/
public function refresh(Movie $movie, array $parameters = array(), array $headers = array())
{
return $this->load($movie->getId(), $parameters, $headers);
}

/**
* Return the Movies API Class
*
Expand Down Expand Up @@ -98,7 +83,7 @@ public function getLatest(array $options = array())
* Get the list of upcoming movies. This list refreshes every day. The maximum number of items this list will include is 100.
*
* @param array $options
* @return GenericCollection
* @return Movie[]
*/
public function getUpcoming(array $options = array())
{
Expand All @@ -111,7 +96,7 @@ public function getUpcoming(array $options = array())
* Get the list of movies playing in theatres. This list refreshes every day. The maximum number of items this list will include is 100.
*
* @param array $options
* @return GenericCollection
* @return Movie[]
*/
public function getNowPlaying(array $options = array())
{
Expand All @@ -124,7 +109,7 @@ public function getNowPlaying(array $options = array())
* Get the list of popular movies on The Movie Database. This list refreshes every day.
*
* @param array $options
* @return GenericCollection
* @return Movie[]
*/
public function getPopular(array $options = array())
{
Expand All @@ -137,7 +122,7 @@ public function getPopular(array $options = array())
* Get the list of top rated movies. By default, this list will only include movies that have 10 or more votes. This list refreshes every day.
*
* @param array $options
* @return GenericCollection
* @return Movie[]
*/
public function getTopRated(array $options = array())
{
Expand All @@ -149,10 +134,8 @@ public function getTopRated(array $options = array())
/**
* Create an collection of an array
*
* @todo Allow an array of Movie objects to pass ( custom collection )
*
* @param $data
* @return GenericCollection
* @return Movie[]
*/
private function createCollection($data){
$collection = new GenericCollection();
Expand Down
12 changes: 0 additions & 12 deletions lib/Tmdb/Repository/PeopleRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,6 @@ public function load($id, array $parameters = array(), array $headers = array())
return PeopleFactory::create($data);
}

/**
* If you obtained an person model which is not completely hydrated, you can use this function.
*
* @param Person $person
* @param array $parameters
* @param array $headers
* @return Person
*/
public function refresh(Person $person, array $parameters = array(), array $headers = array()) {
return $this->load($person->getId(), $parameters, $headers);
}

/**
* Return the related API class
*
Expand Down
17 changes: 2 additions & 15 deletions lib/Tmdb/Repository/TvEpisodeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class TvEpisodeRepository extends AbstractRepository {
* @param $parameters
* @param $headers
* @throws RuntimeException
* @return Season
* @return Episode
*/
public function load($tvShow, $season, $episode, array $parameters = array(), array $headers = array())
{
Expand Down Expand Up @@ -70,19 +70,6 @@ public function load($tvShow, $season, $episode, array $parameters = array(), ar
return TvEpisodeFactory::create($data);
}

/**
* If you obtained an episode model which is not completely hydrated, you can use this function.
*
* @param Episode $episode
* @param array $parameters
* @param array $headers
* @return Season
*/
public function refresh(Episode $episode, array $parameters = array(), array $headers = array())
{
return $this->load($episode->getId(), $parameters, $headers);
}

/**
* Return the Seasons API Class
*
Expand All @@ -97,7 +84,7 @@ public function getApi()
* Create an collection of an array
*
* @param $data
* @return GenericCollection
* @return Episode[]
*/
private function createCollection($data){
$collection = new GenericCollection();
Expand Down
6 changes: 3 additions & 3 deletions lib/Tmdb/Repository/TvRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function getApi()
* Get the list of popular tvs on The Tv Database. This list refreshes every day.
*
* @param array $options
* @return GenericCollection
* @return Tv[]
*/
public function getPopular(array $options = array())
{
Expand All @@ -92,7 +92,7 @@ public function getPopular(array $options = array())
* Get the list of top rated tvs. By default, this list will only include tvs that have 10 or more votes. This list refreshes every day.
*
* @param array $options
* @return GenericCollection
* @return Tv[]
*/
public function getTopRated(array $options = array())
{
Expand All @@ -107,7 +107,7 @@ public function getTopRated(array $options = array())
* @todo Allow an array of Tv objects to pass ( custom collection )
*
* @param $data
* @return GenericCollection
* @return Tv[]
*/
private function createCollection($data){
$collection = new GenericCollection();
Expand Down
15 changes: 1 addition & 14 deletions lib/Tmdb/Repository/TvSeasonRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,6 @@ public function load($tvShow, $season, array $parameters = array(), array $heade
return TvSeasonFactory::create($data);
}

/**
* If you obtained an season model which is not completely hydrated, you can use this function.
*
* @param Season $season
* @param array $parameters
* @param array $headers
* @return Season
*/
public function refresh(Season $season, array $parameters = array(), array $headers = array())
{
return $this->load($season->getId(), $parameters, $headers);
}

/**
* Return the Seasons API Class
*
Expand All @@ -93,7 +80,7 @@ public function getApi()
* @todo Allow an array of Season objects to pass ( custom collection )
*
* @param $data
* @return GenericCollection
* @return Season[]
*/
private function createCollection($data){
$collection = new GenericCollection();
Expand Down

0 comments on commit 02ca249

Please sign in to comment.