Skip to content

Commit

Permalink
Allow search queries to be left empty, leave the responsibility to me…
Browse files Browse the repository at this point in the history
…et minimum parameters up to the end-user.
  • Loading branch information
wtfzdotnet committed Feb 23, 2014
1 parent 4f9e644 commit 56c161e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/Tmdb/Repository/SearchRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function __construct(Client $client)
*
* @return ResultCollection|Movie[]
*/
public function searchMovie($query, MovieSearchQuery $parameters, array $headers = array()) {
public function searchMovie($query, MovieSearchQuery $parameters = null, array $headers = array()) {
$data = $this->getApi()->searchMovies($query, $parameters->toArray(), $headers);

return $this->getMovieFactory()->createResultCollection($data);
Expand All @@ -107,7 +107,7 @@ public function searchMovie($query, MovieSearchQuery $parameters, array $headers
*
* @return ResultCollection|Collection[]
*/
public function searchCollection($query, CollectionSearchQuery $parameters, array $headers = array()) {
public function searchCollection($query, CollectionSearchQuery $parameters = null, array $headers = array()) {
$data = $this->getApi()->searchCollection($query, $parameters->toArray(), $headers);

return $this->getCollectionFactory()->createResultCollection($data);
Expand All @@ -120,7 +120,7 @@ public function searchCollection($query, CollectionSearchQuery $parameters, arra
*
* @return ResultCollection|Tv[]
*/
public function searchTv($query, TvSearchQuery $parameters, array $headers = array()) {
public function searchTv($query, TvSearchQuery $parameters = null, array $headers = array()) {
$data = $this->getApi()->searchTv($query, $parameters->toArray(), $headers);

return $this->getTvFactory()->createResultCollection($data);
Expand All @@ -133,7 +133,7 @@ public function searchTv($query, TvSearchQuery $parameters, array $headers = arr
*
* @return ResultCollection|Person[]
*/
public function searchPerson($query, PersonSearchQuery $parameters, array $headers = array()) {
public function searchPerson($query, PersonSearchQuery $parameters = null, array $headers = array()) {
$data = $this->getApi()->searchPersons($query, $parameters->toArray(), $headers);

return $this->getPeopleFactory()->createResultCollection($data);
Expand All @@ -147,7 +147,7 @@ public function searchPerson($query, PersonSearchQuery $parameters, array $heade
* @todo fix return docblock
* @return ResultCollection
*/
public function searchList($query, ListSearchQuery $parameters, array $headers = array()) {
public function searchList($query, ListSearchQuery $parameters = null, array $headers = array()) {
$data = $this->getApi()->searchList($query, $parameters->toArray(), $headers);

return $this->getListitemFactory()->createResultCollection($data);
Expand All @@ -160,7 +160,7 @@ public function searchList($query, ListSearchQuery $parameters, array $headers =
*
* @return ResultCollection|Company[]
*/
public function searchCompany($query, CompanySearchQuery $parameters, array $headers = array()) {
public function searchCompany($query, CompanySearchQuery $parameters = null, array $headers = array()) {
$data = $this->getApi()->searchTv($query, $parameters->toArray(), $headers);

return $this->getCompanyFactory()->createResultCollection($data);
Expand All @@ -174,7 +174,7 @@ public function searchCompany($query, CompanySearchQuery $parameters, array $hea
*
* @return ResultCollection|Keyword[]
*/
public function searchKeyword($query, KeywordSearchQuery $parameters, array $headers = array()) {
public function searchKeyword($query, KeywordSearchQuery $parameters = null, array $headers = array()) {
$data = $this->getApi()->searchKeyword($query, $parameters->toArray(), $headers);

return $this->getKeywordFactory()->createResultCollection($data);
Expand Down

0 comments on commit 56c161e

Please sign in to comment.