diff --git a/lib/Tmdb/Repository/AbstractRepository.php b/lib/Tmdb/Repository/AbstractRepository.php index 4ffcbec4..d8ac7a55 100644 --- a/lib/Tmdb/Repository/AbstractRepository.php +++ b/lib/Tmdb/Repository/AbstractRepository.php @@ -68,16 +68,6 @@ protected function parseQueryParameters(array $parameters = array()) return $parameters; } - /** - * @todo implement - * @param array $headers - * @return array - */ - protected function parseHeaders(array $headers = array()) - { - return $headers; - } - /** * Return the API Class * diff --git a/lib/Tmdb/Repository/ChangesRepository.php b/lib/Tmdb/Repository/ChangesRepository.php index 4fe177a5..f1172adc 100644 --- a/lib/Tmdb/Repository/ChangesRepository.php +++ b/lib/Tmdb/Repository/ChangesRepository.php @@ -32,7 +32,7 @@ class ChangesRepository extends AbstractRepository { * @return \Tmdb\Model\Common\GenericCollection */ public function getMovieChanges(ChangesQuery $query, array $headers = array()) { - $data = $this->getApi()->getMovieChanges($query->toArray(), $this->parseHeaders($headers)); + $data = $this->getApi()->getMovieChanges($query->toArray(), $headers); return $this->getFactory()->createCollection($data); } @@ -52,7 +52,7 @@ public function getMovieChanges(ChangesQuery $query, array $headers = array()) { * @return People */ public function getPeopleChanges(ChangesQuery $query, array $headers = array()) { - $data = $this->getApi()->getPersonChanges($query->toArray(), $this->parseHeaders($headers)); + $data = $this->getApi()->getPersonChanges($query->toArray(), $headers); return $this->getFactory()->createCollection($data); } diff --git a/lib/Tmdb/Repository/CollectionRepository.php b/lib/Tmdb/Repository/CollectionRepository.php index aede185d..04a92d88 100644 --- a/lib/Tmdb/Repository/CollectionRepository.php +++ b/lib/Tmdb/Repository/CollectionRepository.php @@ -40,7 +40,7 @@ public function load($id, array $parameters = array(), array $headers = array()) ); } - $data = $this->getApi()->getCollection($id, $this->parseQueryParameters($parameters), $this->parseHeaders($headers)); + $data = $this->getApi()->getCollection($id, $this->parseQueryParameters($parameters), $headers); return $this->getFactory()->create($data); } diff --git a/lib/Tmdb/Repository/CompanyRepository.php b/lib/Tmdb/Repository/CompanyRepository.php index 0b88d904..d532e48f 100644 --- a/lib/Tmdb/Repository/CompanyRepository.php +++ b/lib/Tmdb/Repository/CompanyRepository.php @@ -28,7 +28,7 @@ class CompanyRepository extends AbstractRepository { * @return Company */ public function load($id, array $parameters = array(), array $headers = array()) { - $data = $this->getApi()->getCompany($id, $this->parseQueryParameters($parameters), $this->parseHeaders($headers)); + $data = $this->getApi()->getCompany($id, $this->parseQueryParameters($parameters), $headers); return $this->getFactory()->create($data); } @@ -44,7 +44,7 @@ public function load($id, array $parameters = array(), array $headers = array()) public function getMovies($id, array $parameters = array(), array $headers = array()) { return $this->createMovieCollection( - $this->getApi()->getMovies($id, $this->parseQueryParameters($parameters), $this->parseHeaders($headers)) + $this->getApi()->getMovies($id, $this->parseQueryParameters($parameters), $headers) ); } diff --git a/lib/Tmdb/Repository/DiscoverRepository.php b/lib/Tmdb/Repository/DiscoverRepository.php index 2f0ecb50..cd411b9e 100644 --- a/lib/Tmdb/Repository/DiscoverRepository.php +++ b/lib/Tmdb/Repository/DiscoverRepository.php @@ -37,7 +37,7 @@ public function discoverMovies(DiscoverMoviesQuery $query, array $headers = arra throw new RuntimeException('When the certification_country option is given the certification.lte option is required.'); } - $data = $this->getApi()->discoverMovies($query, $this->parseHeaders($headers)); + $data = $this->getApi()->discoverMovies($query, $headers); return $this->getMovieFactory()->createCollection($data); } @@ -51,7 +51,7 @@ public function discoverMovies(DiscoverMoviesQuery $query, array $headers = arra * @return \Tmdb\Model\Common\GenericCollection */ public function discoverTv(DiscoverTvQuery $query, array $headers = array()) { - $data = $this->getApi()->discoverTv($query->toArray(), $this->parseHeaders($headers)); + $data = $this->getApi()->discoverTv($query->toArray(), $headers); return $this->getTvFactory()->createCollection($data); } diff --git a/lib/Tmdb/Repository/MovieRepository.php b/lib/Tmdb/Repository/MovieRepository.php index d776a04f..6ffa4fc6 100644 --- a/lib/Tmdb/Repository/MovieRepository.php +++ b/lib/Tmdb/Repository/MovieRepository.php @@ -51,7 +51,7 @@ public function load($id, array $parameters = array(), array $headers = array()) ); } - $data = $this->getApi()->getMovie($id, $this->parseQueryParameters($parameters), $this->parseHeaders($headers)); + $data = $this->getApi()->getMovie($id, $this->parseQueryParameters($parameters), $headers); return $this->getFactory()->create($data); } diff --git a/lib/Tmdb/Repository/PeopleRepository.php b/lib/Tmdb/Repository/PeopleRepository.php index e43af8e7..dfa421c4 100644 --- a/lib/Tmdb/Repository/PeopleRepository.php +++ b/lib/Tmdb/Repository/PeopleRepository.php @@ -41,7 +41,7 @@ public function load($id, array $parameters = array(), array $headers = array()) ); } - $data = $this->getApi()->getPerson($id, $this->parseQueryParameters($parameters), $this->parseHeaders($headers)); + $data = $this->getApi()->getPerson($id, $this->parseQueryParameters($parameters), $headers); return $this->getFactory()->create($data); } diff --git a/lib/Tmdb/Repository/TvEpisodeRepository.php b/lib/Tmdb/Repository/TvEpisodeRepository.php index ec287f9c..ccbdd5be 100644 --- a/lib/Tmdb/Repository/TvEpisodeRepository.php +++ b/lib/Tmdb/Repository/TvEpisodeRepository.php @@ -62,7 +62,7 @@ public function load($tvShow, $season, $episode, array $parameters = array(), ar ); } - $data = $this->getApi()->getEpisode($tvShow, $season, $episode, $this->parseQueryParameters($parameters), $this->parseHeaders($headers)); + $data = $this->getApi()->getEpisode($tvShow, $season, $episode, $this->parseQueryParameters($parameters), $headers); return $this->getFactory()->create($data); } diff --git a/lib/Tmdb/Repository/TvRepository.php b/lib/Tmdb/Repository/TvRepository.php index 1f980ddb..ee4bdb91 100644 --- a/lib/Tmdb/Repository/TvRepository.php +++ b/lib/Tmdb/Repository/TvRepository.php @@ -43,7 +43,7 @@ public function load($id, array $parameters = array(), array $headers = array()) ); } - $data = $this->getApi()->getTvshow($id, $this->parseQueryParameters($parameters), $this->parseHeaders($headers)); + $data = $this->getApi()->getTvshow($id, $this->parseQueryParameters($parameters), $headers); return $this->getFactory()->create($data); } diff --git a/lib/Tmdb/Repository/TvSeasonRepository.php b/lib/Tmdb/Repository/TvSeasonRepository.php index 931e0d00..ff03f855 100644 --- a/lib/Tmdb/Repository/TvSeasonRepository.php +++ b/lib/Tmdb/Repository/TvSeasonRepository.php @@ -57,7 +57,7 @@ public function load($tvShow, $season, array $parameters = array(), array $heade ); } - $data = $this->getApi()->getSeason($tvShow, $season, $this->parseQueryParameters($parameters), $this->parseHeaders($headers)); + $data = $this->getApi()->getSeason($tvShow, $season, $this->parseQueryParameters($parameters), $headers); return $this->getFactory()->create($data); } diff --git a/test/Tmdb/Tests/Factory/GenreFactoryTest.php b/test/Tmdb/Tests/Factory/GenreFactoryTest.php index e85b2769..c2c66fbe 100644 --- a/test/Tmdb/Tests/Factory/GenreFactoryTest.php +++ b/test/Tmdb/Tests/Factory/GenreFactoryTest.php @@ -24,7 +24,7 @@ class GenreFactoryTest extends TestCase public function shouldConstructGenres() { $factory = $this->getFactory(); - $data = $this->loadByFile('genre/result.json'); + $data = $this->loadByFile('genre/list.json'); $collection = $factory->createCollection($data['genres']); @@ -46,7 +46,7 @@ public function shouldConstructGenres() public function shouldFilter() { $factory = $this->getFactory(); - $data = $this->loadByFile('genre/result.json'); + $data = $this->loadByFile('genre/list.json'); /** * @var Genres $genres @@ -66,7 +66,7 @@ public function shouldFilter() public function shouldCollaborateWithCollection() { $factory = $this->getFactory(); - $data = $this->loadByFile('genre/result.json'); + $data = $this->loadByFile('genre/list.json'); /** * @var Genres $genres