Skip to content

Commit

Permalink
Removing un-used parseHeaders function
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfzdotnet committed Feb 5, 2014
1 parent a6a529d commit 3631b47
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 25 deletions.
10 changes: 0 additions & 10 deletions lib/Tmdb/Repository/AbstractRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
4 changes: 2 additions & 2 deletions lib/Tmdb/Repository/ChangesRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
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 @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/Tmdb/Repository/CompanyRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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)
);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/Tmdb/Repository/DiscoverRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Tmdb/Repository/MovieRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Tmdb/Repository/PeopleRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Tmdb/Repository/TvEpisodeRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Tmdb/Repository/TvRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Tmdb/Repository/TvSeasonRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
6 changes: 3 additions & 3 deletions test/Tmdb/Tests/Factory/GenreFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);

Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 3631b47

Please sign in to comment.