From 2c19c97c707d96fae9e8102c4b10bbb712a48b62 Mon Sep 17 00:00:00 2001 From: Michael Roterman Date: Sat, 1 Mar 2014 01:00:43 +0100 Subject: [PATCH] PSR compliance. --- lib/Tmdb/Api/AbstractApi.php | 3 +- lib/Tmdb/Api/Account.php | 3 +- lib/Tmdb/Api/Authentication.php | 6 +- lib/Tmdb/Api/Certifications.php | 6 +- lib/Tmdb/Api/Changes.php | 3 +- lib/Tmdb/Api/Collections.php | 3 +- lib/Tmdb/Api/Companies.php | 3 +- lib/Tmdb/Api/Configuration.php | 3 +- lib/Tmdb/Api/Credits.php | 10 ++- lib/Tmdb/Api/Discover.php | 6 +- lib/Tmdb/Api/Find.php | 9 +- lib/Tmdb/Api/Genres.php | 6 +- lib/Tmdb/Api/Jobs.php | 3 +- lib/Tmdb/Api/Keywords.php | 3 +- lib/Tmdb/Api/Lists.php | 3 +- lib/Tmdb/Api/Movies.php | 18 ++-- lib/Tmdb/Api/Networks.php | 3 +- lib/Tmdb/Api/People.php | 3 +- lib/Tmdb/Api/Reviews.php | 3 +- lib/Tmdb/Api/Search.php | 3 +- lib/Tmdb/Api/Tv.php | 4 +- lib/Tmdb/Api/TvEpisode.php | 83 +++++++++++++++---- lib/Tmdb/Api/TvSeason.php | 3 +- lib/Tmdb/Common/ObjectHydrator.php | 15 ++-- lib/Tmdb/Factory/AbstractFactory.php | 4 +- lib/Tmdb/Factory/CollectionFactory.php | 12 ++- .../Common/GenericCollectionFactory.php | 4 +- lib/Tmdb/Factory/CreditsFactory.php | 5 +- lib/Tmdb/Factory/FindFactory.php | 1 - lib/Tmdb/Factory/ImageFactory.php | 2 +- lib/Tmdb/Factory/Lists/ListItemFactory.php | 8 +- lib/Tmdb/Factory/MovieFactory.php | 10 ++- lib/Tmdb/Factory/PeopleFactory.php | 2 +- lib/Tmdb/Factory/TvEpisodeFactory.php | 19 +++-- lib/Tmdb/Factory/TvFactory.php | 30 +++++-- lib/Tmdb/Factory/TvSeasonFactory.php | 14 +++- lib/Tmdb/HttpClient/HttpClient.php | 3 +- lib/Tmdb/Model/AbstractModel.php | 3 +- lib/Tmdb/Model/Account.php | 3 +- lib/Tmdb/Model/Account/ListItem.php | 2 +- lib/Tmdb/Model/Certification.php | 2 +- .../Certification/CountryCertification.php | 3 +- lib/Tmdb/Model/Change.php | 2 +- lib/Tmdb/Model/Collection.php | 2 +- lib/Tmdb/Model/Collection/Changes.php | 4 +- .../CreditsCollection/CombinedCredits.php | 4 +- .../CreditsCollection/MovieCredits.php | 4 +- .../CreditsCollection/TvCredits.php | 4 +- lib/Tmdb/Model/Collection/Images.php | 36 ++++++-- lib/Tmdb/Model/Collection/Jobs.php | 12 ++- .../Collection/QueryParametersCollection.php | 4 +- .../Model/Collection/ResultCollection.php | 2 +- lib/Tmdb/Model/Common/Change.php | 3 +- lib/Tmdb/Model/Common/Change/Item.php | 3 +- lib/Tmdb/Model/Common/Country.php | 2 +- lib/Tmdb/Model/Common/ExternalIds.php | 2 +- lib/Tmdb/Model/Common/GenericCollection.php | 16 +++- lib/Tmdb/Model/Common/SpokenLanguage.php | 2 +- lib/Tmdb/Model/Common/Trailer/Youtube.php | 2 +- lib/Tmdb/Model/Common/Translation.php | 2 +- lib/Tmdb/Model/Company.php | 2 +- lib/Tmdb/Model/Configuration.php | 2 +- lib/Tmdb/Model/Credits.php | 2 +- lib/Tmdb/Model/Credits/Media.php | 2 +- lib/Tmdb/Model/Find.php | 1 - lib/Tmdb/Model/Genre.php | 2 +- lib/Tmdb/Model/Image.php | 8 +- lib/Tmdb/Model/Image/BackdropImage.php | 4 +- lib/Tmdb/Model/Image/LogoImage.php | 4 +- lib/Tmdb/Model/Image/PosterImage.php | 4 +- lib/Tmdb/Model/Image/ProfileImage.php | 4 +- lib/Tmdb/Model/Image/StillImage.php | 4 +- lib/Tmdb/Model/Job.php | 2 +- lib/Tmdb/Model/Keyword.php | 2 +- lib/Tmdb/Model/Lists.php | 2 +- lib/Tmdb/Model/Lists/ItemStatus.php | 2 +- lib/Tmdb/Model/Lists/ListItem.php | 2 +- lib/Tmdb/Model/Lists/Result.php | 2 +- lib/Tmdb/Model/Lists/ResultWithListId.php | 2 +- lib/Tmdb/Model/Movie.php | 2 +- lib/Tmdb/Model/Movie/AccountStates.php | 2 +- lib/Tmdb/Model/Movie/AlternativeTitle.php | 2 +- lib/Tmdb/Model/Movie/ListItem.php | 3 +- lib/Tmdb/Model/Movie/Rating.php | 2 +- lib/Tmdb/Model/Movie/Release.php | 2 +- lib/Tmdb/Model/Network.php | 2 +- lib/Tmdb/Model/Person.php | 2 +- lib/Tmdb/Model/Person/AbstractMember.php | 2 +- lib/Tmdb/Model/Person/CastMember.php | 2 +- lib/Tmdb/Model/Person/CrewMember.php | 2 +- lib/Tmdb/Model/Person/MovieCredit.php | 3 +- .../Query/Discover/DiscoverMoviesQuery.php | 22 +++-- .../Model/Query/Discover/DiscoverTvQuery.php | 22 +++-- lib/Tmdb/Model/Review.php | 3 +- .../Search/SearchQuery/CompanySearchQuery.php | 4 +- .../Search/SearchQuery/KeywordSearchQuery.php | 4 +- lib/Tmdb/Model/Tv.php | 2 +- lib/Tmdb/Model/Tv/Episode.php | 2 +- lib/Tmdb/Model/Tv/Network.php | 2 +- lib/Tmdb/Model/Tv/Season.php | 2 +- lib/Tmdb/Repository/AccountRepository.php | 3 +- .../Repository/AuthenticationRepository.php | 11 ++- .../Repository/CertificationRepository.php | 3 +- lib/Tmdb/Repository/CollectionRepository.php | 3 +- lib/Tmdb/Repository/DiscoverRepository.php | 10 ++- lib/Tmdb/Repository/FindRepository.php | 2 +- lib/Tmdb/Repository/GenreRepository.php | 3 +- lib/Tmdb/Repository/KeywordRepository.php | 3 +- lib/Tmdb/Repository/ListRepository.php | 9 +- lib/Tmdb/Repository/MovieRepository.php | 21 +++-- lib/Tmdb/Repository/PeopleRepository.php | 8 +- lib/Tmdb/Repository/TvEpisodeRepository.php | 38 +++++++-- lib/Tmdb/Repository/TvRepository.php | 9 +- test/Tmdb/Tests/Common/ObjectHydratorTest.php | 4 +- .../Movie/GenericCollectionFactoryTest.php | 2 +- 115 files changed, 468 insertions(+), 241 deletions(-) diff --git a/lib/Tmdb/Api/AbstractApi.php b/lib/Tmdb/Api/AbstractApi.php index ff608e92..4e75af21 100644 --- a/lib/Tmdb/Api/AbstractApi.php +++ b/lib/Tmdb/Api/AbstractApi.php @@ -19,8 +19,7 @@ * Class AbstractApi * @package Tmdb\Api */ -abstract class AbstractApi - implements ApiInterface +abstract class AbstractApi implements ApiInterface { /** * The client diff --git a/lib/Tmdb/Api/Account.php b/lib/Tmdb/Api/Account.php index 674dbff2..80282464 100644 --- a/lib/Tmdb/Api/Account.php +++ b/lib/Tmdb/Api/Account.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#account */ -class Account - extends AbstractApi +class Account extends AbstractApi { /** * Get the basic information for an account. You will need to have a valid session id. diff --git a/lib/Tmdb/Api/Authentication.php b/lib/Tmdb/Api/Authentication.php index aeeeffdb..a28862c9 100644 --- a/lib/Tmdb/Api/Authentication.php +++ b/lib/Tmdb/Api/Authentication.php @@ -19,8 +19,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#authentication */ -class Authentication - extends AbstractApi +class Authentication extends AbstractApi { const REQUEST_TOKEN_URI = 'https://www.themoviedb.org/authenticate'; @@ -78,7 +77,8 @@ public function getNewSession($requestToken) * You should only generate a single guest session per user (or device) * as you will be able to attach the ratings to a TMDb user account in the future. * - * There is also IP limits in place so you should always make sure it's the end user doing the guest session actions. + * There is also IP limits in place so you should always make sure it's the end user + * doing the guest session actions. * * If a guest session is not used for the first time within 24 hours, it will be automatically discarded. * diff --git a/lib/Tmdb/Api/Certifications.php b/lib/Tmdb/Api/Certifications.php index 08785722..6c676ed6 100644 --- a/lib/Tmdb/Api/Certifications.php +++ b/lib/Tmdb/Api/Certifications.php @@ -17,13 +17,13 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#certifications */ -class Certifications - extends AbstractApi +class Certifications extends AbstractApi { /** * Get the list of supported certifications for movies. * - * These can be used in conjunction with the certification_country and certification.lte parameters when using discover. + * These can be used in conjunction with the certification_country and + * certification.lte parameters when using discover. * * @param array $parameters * @param array $headers diff --git a/lib/Tmdb/Api/Changes.php b/lib/Tmdb/Api/Changes.php index 1f356023..084d5926 100644 --- a/lib/Tmdb/Api/Changes.php +++ b/lib/Tmdb/Api/Changes.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * http://docs.themoviedb.apiary.io/#changes */ -class Changes - extends AbstractApi +class Changes extends AbstractApi { /** * Get a list of movie ids that have been edited. diff --git a/lib/Tmdb/Api/Collections.php b/lib/Tmdb/Api/Collections.php index d8b64a52..8d4c8ff0 100644 --- a/lib/Tmdb/Api/Collections.php +++ b/lib/Tmdb/Api/Collections.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#collections */ -class Collections - extends AbstractApi +class Collections extends AbstractApi { /** * Get the basic collection information for a specific collection id. diff --git a/lib/Tmdb/Api/Companies.php b/lib/Tmdb/Api/Companies.php index 5671dc35..738ebcc1 100644 --- a/lib/Tmdb/Api/Companies.php +++ b/lib/Tmdb/Api/Companies.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#companies */ -class Companies - extends AbstractApi +class Companies extends AbstractApi { /** * This method is used to retrieve all of the basic information about a company. diff --git a/lib/Tmdb/Api/Configuration.php b/lib/Tmdb/Api/Configuration.php index 7de82e56..d80da3b0 100644 --- a/lib/Tmdb/Api/Configuration.php +++ b/lib/Tmdb/Api/Configuration.php @@ -18,8 +18,7 @@ * * @see http://docs.themoviedb.apiary.io/#configuration */ -class Configuration - extends AbstractApi +class Configuration extends AbstractApi { /** * Get the system wide configuration information. diff --git a/lib/Tmdb/Api/Credits.php b/lib/Tmdb/Api/Credits.php index e7e5d547..b5754d53 100644 --- a/lib/Tmdb/Api/Credits.php +++ b/lib/Tmdb/Api/Credits.php @@ -17,12 +17,14 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#credits */ -class Credits - extends AbstractApi +class Credits extends AbstractApi { /** - * Get the detailed information about a particular credit record. This is currently only supported with the new credit model found in TV. - * These ids can be found from any TV credit response as well as the tv_credits and combined_credits methods for people. + * Get the detailed information about a particular credit record. + * + * This is currently only supported with the new credit model found in TV. + * These ids can be found from any TV credit response as well as + * the tv_credits and combined_credits methods for people. * * The episodes object returns a list of episodes and are generally going to be guest stars. * The season array will return a list of season numbers. diff --git a/lib/Tmdb/Api/Discover.php b/lib/Tmdb/Api/Discover.php index 2a437629..f822e794 100644 --- a/lib/Tmdb/Api/Discover.php +++ b/lib/Tmdb/Api/Discover.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#discover */ -class Discover - extends AbstractApi +class Discover extends AbstractApi { /** * Discover movies by different types of data like average rating, number of votes, genres and certifications. @@ -33,7 +32,8 @@ public function discoverMovies(array $parameters = array(), array $headers = arr } /** - * Discover TV shows by different types of data like average rating, number of votes, genres, the network they aired on and air dates. + * Discover TV shows by different types of data like average rating, number of votes, genres, + * the network they aired on and air dates. * * @param array $parameters * @param array $headers diff --git a/lib/Tmdb/Api/Find.php b/lib/Tmdb/Api/Find.php index a3e468aa..74913c5f 100644 --- a/lib/Tmdb/Api/Find.php +++ b/lib/Tmdb/Api/Find.php @@ -17,12 +17,15 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#find */ -class Find - extends AbstractApi +class Find extends AbstractApi { /** - * The find method makes it easy to search for objects in our database by an external id. For instance, an IMDB ID. This will search all objects (movies, TV shows and people) and return the results in a single response. TV season and TV episode searches will be supported shortly. + * The find method makes it easy to search for objects in our database by an external id. * + * For instance, an IMDB ID. This will search all objects (movies, TV shows and people) + * and return the results in a single response. + * + * TV season and TV episode searches will be supported shortly. * The supported external sources for each object are as follows: * * Movies: imdb_id diff --git a/lib/Tmdb/Api/Genres.php b/lib/Tmdb/Api/Genres.php index 2bf93c38..00d88d5a 100644 --- a/lib/Tmdb/Api/Genres.php +++ b/lib/Tmdb/Api/Genres.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#genres */ -class Genres - extends AbstractApi +class Genres extends AbstractApi { /** * Get the list of genres, and return one by id @@ -72,8 +71,9 @@ public function getMovies($genre_id, array $parameters = array(), array $headers private function extractGenreByIdFromResponse($id, array $data = array()) { foreach ($data as $genre) { - if ($id == $genre['id']) + if ($id == $genre['id']) { return $genre; + } } return null; diff --git a/lib/Tmdb/Api/Jobs.php b/lib/Tmdb/Api/Jobs.php index 242df650..7341b1ee 100644 --- a/lib/Tmdb/Api/Jobs.php +++ b/lib/Tmdb/Api/Jobs.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#jobs */ -class Jobs - extends AbstractApi +class Jobs extends AbstractApi { /** * Get a list of valid jobs. diff --git a/lib/Tmdb/Api/Keywords.php b/lib/Tmdb/Api/Keywords.php index 6c2be730..e47a41b0 100644 --- a/lib/Tmdb/Api/Keywords.php +++ b/lib/Tmdb/Api/Keywords.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#keywords */ -class Keywords - extends AbstractApi +class Keywords extends AbstractApi { /** * Get the basic information for a specific keyword id. diff --git a/lib/Tmdb/Api/Lists.php b/lib/Tmdb/Api/Lists.php index 7c79b682..c4838f7e 100644 --- a/lib/Tmdb/Api/Lists.php +++ b/lib/Tmdb/Api/Lists.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#lists */ -class Lists - extends AbstractApi +class Lists extends AbstractApi { /** * Get a list by id. diff --git a/lib/Tmdb/Api/Movies.php b/lib/Tmdb/Api/Movies.php index cdb8aede..38390d94 100644 --- a/lib/Tmdb/Api/Movies.php +++ b/lib/Tmdb/Api/Movies.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#movies */ -class Movies - extends AbstractApi +class Movies extends AbstractApi { /** * Get the basic movie information for a specific movie id. @@ -189,7 +188,8 @@ public function getLatest(array $parameters = array(), array $headers = array()) } /** - * Get the list of upcoming movies. This list refreshes every day. The maximum number of items this list will include is 100. + * Get the list of upcoming movies. This list refreshes every day. + * The maximum number of items this list will include is 100. * * @param array $parameters * @param array $headers @@ -201,7 +201,8 @@ public function getUpcoming(array $parameters = array(), array $headers = 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. + * 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 $parameters * @param array $headers @@ -213,7 +214,8 @@ public function getNowPlaying(array $parameters = array(), array $headers = arra } /** - * Get the list of popular movies on The Movie Database. This list refreshes every day. + * Get the list of popular movies on The Movie Database. + * This list refreshes every day. * * @param array $parameters * @param array $headers @@ -225,7 +227,8 @@ public function getPopular(array $parameters = array(), array $headers = 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. + * 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 $parameters * @param array $headers @@ -237,7 +240,8 @@ public function getTopRated(array $parameters = array(), array $headers = array( } /** - * This method lets users get the status of whether or not the movie has been rated or added to their favourite or watch lists. + * This method lets users get the status of whether or not the movie has been rated + * or added to their favourite or watch lists. * * A valid session id is required. * diff --git a/lib/Tmdb/Api/Networks.php b/lib/Tmdb/Api/Networks.php index 3bb6b981..1fb0d8e1 100644 --- a/lib/Tmdb/Api/Networks.php +++ b/lib/Tmdb/Api/Networks.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#networks */ -class Networks - extends AbstractApi +class Networks extends AbstractApi { /** * This method is used to retrieve the basic information about a TV network. diff --git a/lib/Tmdb/Api/People.php b/lib/Tmdb/Api/People.php index 1be1e463..cd379813 100644 --- a/lib/Tmdb/Api/People.php +++ b/lib/Tmdb/Api/People.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#people */ -class People - extends AbstractApi +class People extends AbstractApi { /** * Get the general person information for a specific id. diff --git a/lib/Tmdb/Api/Reviews.php b/lib/Tmdb/Api/Reviews.php index e14a9df9..2d630b16 100644 --- a/lib/Tmdb/Api/Reviews.php +++ b/lib/Tmdb/Api/Reviews.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#reviews */ -class Reviews - extends AbstractApi +class Reviews extends AbstractApi { /** * Get the full details of a review by ID. diff --git a/lib/Tmdb/Api/Search.php b/lib/Tmdb/Api/Search.php index 4e988127..8e5f1f1b 100644 --- a/lib/Tmdb/Api/Search.php +++ b/lib/Tmdb/Api/Search.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#search */ -class Search - extends AbstractApi +class Search extends AbstractApi { /** * Search for movies by title. diff --git a/lib/Tmdb/Api/Tv.php b/lib/Tmdb/Api/Tv.php index c8fcf9cc..c0a91214 100644 --- a/lib/Tmdb/Api/Tv.php +++ b/lib/Tmdb/Api/Tv.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#tv */ -class Tv - extends AbstractApi +class Tv extends AbstractApi { /** * Get the primary information about a TV series by id. @@ -114,5 +113,4 @@ public function getTranslations($tvshow_id, array $parameters = array(), array $ { $this->get('tv/' . $tvshow_id . '/translations', $parameters, $headers); } - } diff --git a/lib/Tmdb/Api/TvEpisode.php b/lib/Tmdb/Api/TvEpisode.php index 811fc13b..e05cb3e1 100644 --- a/lib/Tmdb/Api/TvEpisode.php +++ b/lib/Tmdb/Api/TvEpisode.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#tvepisodes */ -class TvEpisode - extends AbstractApi +class TvEpisode extends AbstractApi { /** * Get the primary information about a TV episode by combination of a season and episode number. @@ -30,9 +29,23 @@ class TvEpisode * @param array $headers * @return mixed */ - public function getEpisode($tvshow_id, $season_number, $episode_number, array $parameters = array(), array $headers = array()) - { - return $this->get(sprintf('tv/%s/season/%s/episode/%s', $tvshow_id, $season_number,$episode_number), $parameters, $headers); + public function getEpisode( + $tvshow_id, + $season_number, + $episode_number, + array $parameters = array(), + array $headers = array() + ) { + return $this->get( + sprintf( + 'tv/%s/season/%s/episode/%s', + $tvshow_id, + $season_number, + $episode_number + ), + $parameters, + $headers + ); } /** @@ -45,9 +58,23 @@ public function getEpisode($tvshow_id, $season_number, $episode_number, array $p * @param array $headers * @return mixed */ - public function getCredits($tvshow_id, $season_number, $episode_number, array $parameters = array(), array $headers = array()) - { - return $this->get(sprintf('tv/%s/season/%s/episode/%s/credits', $tvshow_id, $season_number,$episode_number), $parameters, $headers); + public function getCredits( + $tvshow_id, + $season_number, + $episode_number, + array $parameters = array(), + array $headers = array() + ) { + return $this->get( + sprintf( + 'tv/%s/season/%s/episode/%s/credits', + $tvshow_id, + $season_number, + $episode_number + ), + $parameters, + $headers + ); } /** @@ -60,9 +87,23 @@ public function getCredits($tvshow_id, $season_number, $episode_number, array $p * @param array $headers * @return mixed */ - public function getExternalIds($tvshow_id, $season_number, $episode_number, array $parameters = array(), array $headers = array()) - { - return $this->get(sprintf('tv/%s/season/%s/episode/%s/external_ids', $tvshow_id, $season_number,$episode_number), $parameters, $headers); + public function getExternalIds( + $tvshow_id, + $season_number, + $episode_number, + array $parameters = array(), + array $headers = array() + ) { + return $this->get( + sprintf( + 'tv/%s/season/%s/episode/%s/external_ids', + $tvshow_id, + $season_number, + $episode_number + ), + $parameters, + $headers + ); } /** @@ -75,8 +116,22 @@ public function getExternalIds($tvshow_id, $season_number, $episode_number, arra * @param array $headers * @return mixed */ - public function getImages($tvshow_id, $season_number, $episode_number, array $parameters = array(), array $headers = array()) - { - return $this->get(sprintf('tv/%s/season/%s/episode/%s/images', $tvshow_id, $season_number,$episode_number), $parameters, $headers); + public function getImages( + $tvshow_id, + $season_number, + $episode_number, + array $parameters = array(), + array $headers = array() + ) { + return $this->get( + sprintf( + 'tv/%s/season/%s/episode/%s/images', + $tvshow_id, + $season_number, + $episode_number + ), + $parameters, + $headers + ); } } diff --git a/lib/Tmdb/Api/TvSeason.php b/lib/Tmdb/Api/TvSeason.php index 8d6201d3..b4785359 100644 --- a/lib/Tmdb/Api/TvSeason.php +++ b/lib/Tmdb/Api/TvSeason.php @@ -17,8 +17,7 @@ * @package Tmdb\Api * @see http://docs.themoviedb.apiary.io/#tvseasons */ -class TvSeason - extends AbstractApi +class TvSeason extends AbstractApi { /** * Get the primary information about a TV season by its season number. diff --git a/lib/Tmdb/Common/ObjectHydrator.php b/lib/Tmdb/Common/ObjectHydrator.php index b462970b..979437ae 100644 --- a/lib/Tmdb/Common/ObjectHydrator.php +++ b/lib/Tmdb/Common/ObjectHydrator.php @@ -36,7 +36,7 @@ public function hydrate(AbstractModel $object, $data = array()) if (!empty($data)) { foreach ($data as $k => $v) { - if (in_array($k, $object::$_properties)) { + if (in_array($k, $object::$properties)) { $method = $this->camelize( sprintf('set_%s', $k) @@ -69,10 +69,15 @@ public function hydrate(AbstractModel $object, $data = array()) public function camelize($candidate) { return lcfirst( - implode('', - array_map('ucfirst', - array_map('strtolower', - explode('_', $candidate + implode( + '', + array_map( + 'ucfirst', + array_map( + 'strtolower', + explode( + '_', + $candidate ) ) ) diff --git a/lib/Tmdb/Factory/AbstractFactory.php b/lib/Tmdb/Factory/AbstractFactory.php index 19bd253a..d6a8623e 100644 --- a/lib/Tmdb/Factory/AbstractFactory.php +++ b/lib/Tmdb/Factory/AbstractFactory.php @@ -40,13 +40,13 @@ abstract public function create(array $data = array()); abstract public function createCollection(array $data = array()); /** - * Create a generic collection of data and map it on the class by it's static parameter $_properties + * Create a generic collection of data and map it on the class by it's static parameter $properties * * @param array $data * @param $class * @return GenericCollection */ - protected function createGenericCollection(array $data = array(), $class) + protected function createGenericCollection(array $data, $class) { if (is_object($class)) { $class = get_class($class); diff --git a/lib/Tmdb/Factory/CollectionFactory.php b/lib/Tmdb/Factory/CollectionFactory.php index 7184796b..b1ccf955 100644 --- a/lib/Tmdb/Factory/CollectionFactory.php +++ b/lib/Tmdb/Factory/CollectionFactory.php @@ -55,15 +55,21 @@ public function create(array $data = array()) } if (array_key_exists('backdrop_path', $data)) { - $collection->setBackdropImage($this->getImageFactory()->createFromPath($data['backdrop_path'], 'backdrop_path')); + $collection->setBackdropImage( + $this->getImageFactory()->createFromPath($data['backdrop_path'], 'backdrop_path') + ); } if (array_key_exists('images', $data)) { - $collection->setImages($this->getImageFactory()->createCollectionFromMovie($data['images'])); + $collection->setImages( + $this->getImageFactory()->createCollectionFromMovie($data['images']) + ); } if (array_key_exists('poster_path', $data)) { - $collection->setPosterImage($this->getImageFactory()->createFromPath($data['poster_path'], 'poster_path')); + $collection->setPosterImage( + $this->getImageFactory()->createFromPath($data['poster_path'], 'poster_path') + ); } return $this->hydrate($collection, $data); diff --git a/lib/Tmdb/Factory/Common/GenericCollectionFactory.php b/lib/Tmdb/Factory/Common/GenericCollectionFactory.php index 722af78b..38fe2d67 100644 --- a/lib/Tmdb/Factory/Common/GenericCollectionFactory.php +++ b/lib/Tmdb/Factory/Common/GenericCollectionFactory.php @@ -28,7 +28,7 @@ class GenericCollectionFactory * @param $class * @return GenericCollection */ - public function create(array $data = array(), $class) + public function create(array $data, $class) { return $this->createCollection($data, $class); } @@ -38,7 +38,7 @@ public function create(array $data = array(), $class) * @param $class * @return GenericCollection */ - public function createCollection(array $data = array(), $class) + public function createCollection(array $data, $class) { if (is_object($class)) { $class = get_class($class); diff --git a/lib/Tmdb/Factory/CreditsFactory.php b/lib/Tmdb/Factory/CreditsFactory.php index 4e4dbfe6..ac6c129d 100644 --- a/lib/Tmdb/Factory/CreditsFactory.php +++ b/lib/Tmdb/Factory/CreditsFactory.php @@ -84,7 +84,10 @@ public function create(array $data = array()) */ public function createCollection(array $data = array()) { - throw new NotImplementedException('Credits are usually obtained through the PeopleFactory, however we might add a shortcut for that here.'); + throw new NotImplementedException( + 'Credits are usually obtained through the PeopleFactory, + however we might add a shortcut for that here.' + ); } /** diff --git a/lib/Tmdb/Factory/FindFactory.php b/lib/Tmdb/Factory/FindFactory.php index 67fe9ee6..dd6fb3d9 100644 --- a/lib/Tmdb/Factory/FindFactory.php +++ b/lib/Tmdb/Factory/FindFactory.php @@ -132,5 +132,4 @@ public function getTvFactory() { return $this->tvFactory; } - } diff --git a/lib/Tmdb/Factory/ImageFactory.php b/lib/Tmdb/Factory/ImageFactory.php index cb0d3867..3d38d7fc 100644 --- a/lib/Tmdb/Factory/ImageFactory.php +++ b/lib/Tmdb/Factory/ImageFactory.php @@ -134,7 +134,7 @@ public function createImageCollection(array $data = array()) } foreach ($formatCollection as $item) { - if (array_key_exists($format, Image::$_formats)) { + if (array_key_exists($format, Image::$formats)) { $item = $this->create($item, $format); $collection->addImage($item); diff --git a/lib/Tmdb/Factory/Lists/ListItemFactory.php b/lib/Tmdb/Factory/Lists/ListItemFactory.php index 52c9980f..cda36e06 100644 --- a/lib/Tmdb/Factory/Lists/ListItemFactory.php +++ b/lib/Tmdb/Factory/Lists/ListItemFactory.php @@ -44,11 +44,15 @@ public function create(array $data = array()) /** Images */ if (array_key_exists('backdrop_path', $data)) { - $listItem->setBackdropImage($this->getImageFactory()->createFromPath($data['backdrop_path'], 'backdrop_path')); + $listItem->setBackdropImage( + $this->getImageFactory()->createFromPath($data['backdrop_path'], 'backdrop_path') + ); } if (array_key_exists('poster_path', $data)) { - $listItem->setPosterImage($this->getImageFactory()->createFromPath($data['poster_path'], 'poster_path')); + $listItem->setPosterImage( + $this->getImageFactory()->createFromPath($data['poster_path'], 'poster_path') + ); } return $this->hydrate($listItem, $data); diff --git a/lib/Tmdb/Factory/MovieFactory.php b/lib/Tmdb/Factory/MovieFactory.php index 64e677d2..8e4429d1 100644 --- a/lib/Tmdb/Factory/MovieFactory.php +++ b/lib/Tmdb/Factory/MovieFactory.php @@ -139,14 +139,20 @@ public function create(array $data = array()) } /** - * @TODO actually implement more providers? ( Can't seem to find any quicktime related trailers anyways? ). For now KISS + * @TODO actually implement more providers? + * ( Can't seem to find any quicktime related trailers anyways? ). For now KISS */ if (array_key_exists('trailers', $data) && array_key_exists('youtube', $data['trailers'])) { $movie->setTrailers($this->createGenericCollection($data['trailers']['youtube'], new Youtube())); } if (array_key_exists('translations', $data) && array_key_exists('translations', $data['translations'])) { - $movie->setTranslations($this->createGenericCollection($data['translations']['translations'], new Translation())); + $movie->setTranslations( + $this->createGenericCollection( + $data['translations']['translations'], + new Translation() + ) + ); } if (array_key_exists('similar_movies', $data)) { diff --git a/lib/Tmdb/Factory/PeopleFactory.php b/lib/Tmdb/Factory/PeopleFactory.php index 354cb677..91a04f44 100644 --- a/lib/Tmdb/Factory/PeopleFactory.php +++ b/lib/Tmdb/Factory/PeopleFactory.php @@ -101,7 +101,7 @@ public function create(array $data = array(), $person = null) * @param array $data * @param Person $person */ - protected function applyCredits(array $data = array(), Person $person) + protected function applyCredits(array $data, Person $person) { $hydrator = new ObjectHydrator(); $types = array('movie_credits', 'tv_credits', 'combined_credits'); diff --git a/lib/Tmdb/Factory/TvEpisodeFactory.php b/lib/Tmdb/Factory/TvEpisodeFactory.php index 8b840b2f..e8ce8481 100644 --- a/lib/Tmdb/Factory/TvEpisodeFactory.php +++ b/lib/Tmdb/Factory/TvEpisodeFactory.php @@ -64,16 +64,23 @@ public function create(array $data = array()) if (array_key_exists('credits', $data)) { if (array_key_exists('cast', $data['credits'])) { - $tvEpisode->getCredits()->setCast( - $this->getCastFactory()->createCollection($data['credits']['cast'], - new CastMember()) - ); + $tvEpisode + ->getCredits() + ->setCast( + $this->getCastFactory() + ->createCollection( + $data['credits']['cast'], + new CastMember() + ) + ); } if (array_key_exists('crew', $data['credits'])) { $tvEpisode->getCredits()->setCrew( - $this->getCrewFactory()->createCollection($data['credits']['crew'], - new CrewMember()) + $this->getCrewFactory()->createCollection( + $data['credits']['crew'], + new CrewMember() + ) ); } } diff --git a/lib/Tmdb/Factory/TvFactory.php b/lib/Tmdb/Factory/TvFactory.php index 8017be63..1ad6c7e0 100644 --- a/lib/Tmdb/Factory/TvFactory.php +++ b/lib/Tmdb/Factory/TvFactory.php @@ -85,11 +85,21 @@ public function create(array $data = array()) if (array_key_exists('credits', $data)) { if (array_key_exists('cast', $data['credits'])) { - $tvShow->getCredits()->setCast($this->getCastFactory()->createCollection($data['credits']['cast'], new CastMember())); + $tvShow->getCredits()->setCast( + $this->getCastFactory()->createCollection( + $data['credits']['cast'], + new CastMember() + ) + ); } if (array_key_exists('crew', $data['credits'])) { - $tvShow->getCredits()->setCrew($this->getCrewFactory()->createCollection($data['credits']['crew'], new CrewMember())); + $tvShow->getCredits()->setCrew( + $this->getCrewFactory()->createCollection( + $data['credits']['crew'], + new CrewMember() + ) + ); } } @@ -107,20 +117,28 @@ public function create(array $data = array()) /** Images */ if (array_key_exists('images', $data)) { - $tvShow->setImages($this->getImageFactory()->createCollectionFromTv($data['images'])); + $tvShow->setImages( + $this->getImageFactory()->createCollectionFromTv($data['images']) + ); } if (array_key_exists('backdrop_path', $data)) { - $tvShow->setBackdropImage($this->getImageFactory()->createFromPath($data['backdrop_path'], 'backdrop_path')); + $tvShow->setBackdropImage( + $this->getImageFactory()->createFromPath($data['backdrop_path'], 'backdrop_path') + ); } if (array_key_exists('poster_path', $data)) { - $tvShow->setPosterImage($this->getImageFactory()->createFromPath($data['poster_path'], 'poster_path')); + $tvShow->setPosterImage( + $this->getImageFactory()->createFromPath($data['poster_path'], 'poster_path') + ); } /** Translations */ if (array_key_exists('translations', $data) && null !== $data['translations']) { - $tvShow->setTranslations($this->createGenericCollection($data['translations']['translations'], new Translation())); + $tvShow->setTranslations( + $this->createGenericCollection($data['translations']['translations'], new Translation()) + ); } /** Seasons */ diff --git a/lib/Tmdb/Factory/TvSeasonFactory.php b/lib/Tmdb/Factory/TvSeasonFactory.php index 14189045..f3598a03 100644 --- a/lib/Tmdb/Factory/TvSeasonFactory.php +++ b/lib/Tmdb/Factory/TvSeasonFactory.php @@ -70,11 +70,21 @@ public function create(array $data = array()) if (array_key_exists('credits', $data)) { if (array_key_exists('cast', $data['credits'])) { - $tvSeason->getCredits()->setCast($this->getCastFactory()->createCollection($data['credits']['cast'], new CastMember())); + $tvSeason->getCredits()->setCast( + $this->getCastFactory()->createCollection( + $data['credits']['cast'], + new CastMember() + ) + ); } if (array_key_exists('crew', $data['credits'])) { - $tvSeason->getCredits()->setCrew($this->getCrewFactory()->createCollection($data['credits']['crew'], new CrewMember())); + $tvSeason->getCredits()->setCrew( + $this->getCrewFactory()->createCollection( + $data['credits']['crew'], + new CrewMember() + ) + ); } } diff --git a/lib/Tmdb/HttpClient/HttpClient.php b/lib/Tmdb/HttpClient/HttpClient.php index 25b6bb2f..5792ab36 100644 --- a/lib/Tmdb/HttpClient/HttpClient.php +++ b/lib/Tmdb/HttpClient/HttpClient.php @@ -22,8 +22,7 @@ * Class HttpClient * @package Tmdb\HttpClient */ -class HttpClient - implements HttpClientInterface +class HttpClient implements HttpClientInterface { /** * @var \Guzzle\Http\ClientInterface diff --git a/lib/Tmdb/Model/AbstractModel.php b/lib/Tmdb/Model/AbstractModel.php index 6274036a..6e561600 100644 --- a/lib/Tmdb/Model/AbstractModel.php +++ b/lib/Tmdb/Model/AbstractModel.php @@ -23,6 +23,5 @@ class AbstractModel * * @var array */ - public static $_properties = array(); - + public static $properties = array(); } diff --git a/lib/Tmdb/Model/Account.php b/lib/Tmdb/Model/Account.php index a70fd52a..feef5e10 100644 --- a/lib/Tmdb/Model/Account.php +++ b/lib/Tmdb/Model/Account.php @@ -51,7 +51,7 @@ class Account extends AbstractModel /** * @var array */ - public static $_properties = array( + public static $properties = array( 'id', 'include_adult', 'iso_3166_1', @@ -173,5 +173,4 @@ public function getUsername() { return $this->username; } - } diff --git a/lib/Tmdb/Model/Account/ListItem.php b/lib/Tmdb/Model/Account/ListItem.php index 95bf40b4..e9b1c989 100644 --- a/lib/Tmdb/Model/Account/ListItem.php +++ b/lib/Tmdb/Model/Account/ListItem.php @@ -69,7 +69,7 @@ class ListItem extends AbstractModel /** * @var array */ - public static $_properties = array( + public static $properties = array( 'description', 'favorite_count', 'id', diff --git a/lib/Tmdb/Model/Certification.php b/lib/Tmdb/Model/Certification.php index c4d38594..36e2e429 100644 --- a/lib/Tmdb/Model/Certification.php +++ b/lib/Tmdb/Model/Certification.php @@ -30,7 +30,7 @@ class Certification extends AbstractModel */ private $certifications; - public static $_properties = array( + public static $properties = array( 'country', ); diff --git a/lib/Tmdb/Model/Certification/CountryCertification.php b/lib/Tmdb/Model/Certification/CountryCertification.php index a0d62c88..24e73655 100644 --- a/lib/Tmdb/Model/Certification/CountryCertification.php +++ b/lib/Tmdb/Model/Certification/CountryCertification.php @@ -35,7 +35,7 @@ class CountryCertification extends AbstractModel */ private $order; - public static $_properties = array( + public static $properties = array( 'certification', 'meaning', 'order', @@ -97,5 +97,4 @@ public function getOrder() { return $this->order; } - } diff --git a/lib/Tmdb/Model/Change.php b/lib/Tmdb/Model/Change.php index c161ed66..8e670b37 100644 --- a/lib/Tmdb/Model/Change.php +++ b/lib/Tmdb/Model/Change.php @@ -31,7 +31,7 @@ class Change extends AbstractModel /** * @var array */ - public static $_properties = array( + public static $properties = array( 'id', 'adult' ); diff --git a/lib/Tmdb/Model/Collection.php b/lib/Tmdb/Model/Collection.php index e78ac50c..bece1f07 100644 --- a/lib/Tmdb/Model/Collection.php +++ b/lib/Tmdb/Model/Collection.php @@ -68,7 +68,7 @@ class Collection extends AbstractModel */ private $poster; - public static $_properties = array( + public static $properties = array( 'backdrop_path', 'id', 'name', diff --git a/lib/Tmdb/Model/Collection/Changes.php b/lib/Tmdb/Model/Collection/Changes.php index 1d047b89..3643b16f 100644 --- a/lib/Tmdb/Model/Collection/Changes.php +++ b/lib/Tmdb/Model/Collection/Changes.php @@ -16,4 +16,6 @@ * Class Changes * @package Tmdb\Model\Collection */ -class Changes extends ResultCollection {} +class Changes extends ResultCollection +{ +} diff --git a/lib/Tmdb/Model/Collection/CreditsCollection/CombinedCredits.php b/lib/Tmdb/Model/Collection/CreditsCollection/CombinedCredits.php index a321af2d..e363478b 100644 --- a/lib/Tmdb/Model/Collection/CreditsCollection/CombinedCredits.php +++ b/lib/Tmdb/Model/Collection/CreditsCollection/CombinedCredits.php @@ -18,4 +18,6 @@ * Class CombinedCredits * @package Tmdb\Model\Collection\CreditsCollection */ -class CombinedCredits extends CreditsCollection {} +class CombinedCredits extends CreditsCollection +{ +} diff --git a/lib/Tmdb/Model/Collection/CreditsCollection/MovieCredits.php b/lib/Tmdb/Model/Collection/CreditsCollection/MovieCredits.php index 6d63d4cd..384e7872 100644 --- a/lib/Tmdb/Model/Collection/CreditsCollection/MovieCredits.php +++ b/lib/Tmdb/Model/Collection/CreditsCollection/MovieCredits.php @@ -18,4 +18,6 @@ * Class MovieCredits * @package Tmdb\Model\Collection\CreditsCollection */ -class MovieCredits extends CreditsCollection {} +class MovieCredits extends CreditsCollection +{ +} diff --git a/lib/Tmdb/Model/Collection/CreditsCollection/TvCredits.php b/lib/Tmdb/Model/Collection/CreditsCollection/TvCredits.php index b2d91be7..bff00549 100644 --- a/lib/Tmdb/Model/Collection/CreditsCollection/TvCredits.php +++ b/lib/Tmdb/Model/Collection/CreditsCollection/TvCredits.php @@ -18,4 +18,6 @@ * Class TvCredits * @package Tmdb\Model\Collection\CreditsCollection */ -class TvCredits extends CreditsCollection {} +class TvCredits extends CreditsCollection +{ +} diff --git a/lib/Tmdb/Model/Collection/Images.php b/lib/Tmdb/Model/Collection/Images.php index 40cfcaec..7163afde 100644 --- a/lib/Tmdb/Model/Collection/Images.php +++ b/lib/Tmdb/Model/Collection/Images.php @@ -62,7 +62,9 @@ public function filterPosters() { return $this->filter( function ($key, $value) { - if ($value instanceof ImageFilter && $value instanceof Image\PosterImage) { return true; } + if ($value instanceof ImageFilter && $value instanceof Image\PosterImage) { + return true; + } } ); } @@ -76,7 +78,9 @@ public function filterBackdrops() { return $this->filter( function ($key, $value) { - if ($value instanceof ImageFilter && $value instanceof Image\BackdropImage) { return true; } + if ($value instanceof ImageFilter && $value instanceof Image\BackdropImage) { + return true; + } } ); } @@ -90,7 +94,9 @@ public function filterProfile() { return $this->filter( function ($key, $value) { - if ($value instanceof ImageFilter && $value instanceof Image\ProfileImage) { return true; } + if ($value instanceof ImageFilter && $value instanceof Image\ProfileImage) { + return true; + } } ); } @@ -104,7 +110,9 @@ public function filterStills() { return $this->filter( function ($key, $value) { - if ($value instanceof ImageFilter && $value instanceof Image\StillImage) { return true; } + if ($value instanceof ImageFilter && $value instanceof Image\StillImage) { + return true; + } } ); } @@ -119,7 +127,9 @@ public function filterMaxWidth($width) { return $this->filter( function ($key, $value) use ($width) { - if ($value instanceof ImageFilter && $value->getWidth() <= $width && $value->getWidth() !== null) { return true; } + if ($value instanceof ImageFilter && $value->getWidth() <= $width && $value->getWidth() !== null) { + return true; + } } ); } @@ -134,7 +144,9 @@ public function filterMinWidth($width) { return $this->filter( function ($key, $value) use ($width) { - if ($value instanceof ImageFilter && $value->getWidth() >= $width && $value->getWidth() !== null) { return true; } + if ($value instanceof ImageFilter && $value->getWidth() >= $width && $value->getWidth() !== null) { + return true; + } } ); } @@ -149,7 +161,11 @@ public function filterMaxHeight($height) { return $this->filter( function ($key, $value) use ($height) { - if ($value instanceof ImageFilter && $value->getHeight() <= $height && $value->getHeight() !== null) { return true; } + if ($value instanceof ImageFilter && + $value->getHeight() <= $height && $value->getHeight() !== null + ) { + return true; + } } ); } @@ -164,7 +180,11 @@ public function filterMinHeight($height) { return $this->filter( function ($key, $value) use ($height) { - if ($value instanceof ImageFilter && $value->getHeight() >= $height && $value->getHeight() !== null) { return true; } + if ($value instanceof ImageFilter && + $value->getHeight() >= $height && + $value->getHeight() !== null) { + return true; + } } ); } diff --git a/lib/Tmdb/Model/Collection/Jobs.php b/lib/Tmdb/Model/Collection/Jobs.php index ee9f3def..0495749b 100644 --- a/lib/Tmdb/Model/Collection/Jobs.php +++ b/lib/Tmdb/Model/Collection/Jobs.php @@ -30,7 +30,9 @@ public function filterByDepartment($department) { $result = $this->filter( function ($key, $value) use ($department) { - if ($value->getDepartment() == $department) { return true; } + if ($value->getDepartment() == $department) { + return true; + } } ); @@ -53,7 +55,9 @@ public function filterByDepartmentAndReturnJobsList($department) { $result = $this->filter( function ($key, $value) use ($department) { - if ($value->getDepartment() == $department) { return true; } + if ($value->getDepartment() == $department) { + return true; + } } ); @@ -80,7 +84,9 @@ function ($key, $value) use ($filterByJob) { $jobList = $value->getJobList(); foreach ($jobList as $job) { - if ($filterByJob == $job) { return true; } + if ($filterByJob == $job) { + return true; + } } } ); diff --git a/lib/Tmdb/Model/Collection/QueryParametersCollection.php b/lib/Tmdb/Model/Collection/QueryParametersCollection.php index b1f3cd21..0cfa2a30 100644 --- a/lib/Tmdb/Model/Collection/QueryParametersCollection.php +++ b/lib/Tmdb/Model/Collection/QueryParametersCollection.php @@ -18,4 +18,6 @@ * Class QueryParametersCollection * @package Tmdb\Model\Collection */ -class QueryParametersCollection extends GenericCollection {} +class QueryParametersCollection extends GenericCollection +{ +} diff --git a/lib/Tmdb/Model/Collection/ResultCollection.php b/lib/Tmdb/Model/Collection/ResultCollection.php index 22e09c0d..bdf6a9d3 100644 --- a/lib/Tmdb/Model/Collection/ResultCollection.php +++ b/lib/Tmdb/Model/Collection/ResultCollection.php @@ -38,7 +38,7 @@ class ResultCollection extends GenericCollection /** * @var array */ - public static $_properties = array( + public static $properties = array( 'page', 'total_pages', 'total_results' diff --git a/lib/Tmdb/Model/Common/Change.php b/lib/Tmdb/Model/Common/Change.php index 069f5408..6aa86cce 100644 --- a/lib/Tmdb/Model/Common/Change.php +++ b/lib/Tmdb/Model/Common/Change.php @@ -30,7 +30,7 @@ class Change extends AbstractModel */ private $items; - public static $_properties = array( + public static $properties = array( 'key', ); @@ -76,5 +76,4 @@ public function getKey() { return $this->key; } - } diff --git a/lib/Tmdb/Model/Common/Change/Item.php b/lib/Tmdb/Model/Common/Change/Item.php index 2a7ab014..c4267456 100644 --- a/lib/Tmdb/Model/Common/Change/Item.php +++ b/lib/Tmdb/Model/Common/Change/Item.php @@ -40,7 +40,7 @@ class Item extends AbstractModel */ private $value; - public static $_properties = array( + public static $properties = array( 'id', 'action', 'time', @@ -126,5 +126,4 @@ public function getValue() { return $this->value; } - } diff --git a/lib/Tmdb/Model/Common/Country.php b/lib/Tmdb/Model/Common/Country.php index 353adbd6..70b662a3 100644 --- a/lib/Tmdb/Model/Common/Country.php +++ b/lib/Tmdb/Model/Common/Country.php @@ -24,7 +24,7 @@ class Country extends AbstractModel implements CountryFilter private $iso31661; private $name; - public static $_properties = array( + public static $properties = array( 'iso_3166_1', 'name', ); diff --git a/lib/Tmdb/Model/Common/ExternalIds.php b/lib/Tmdb/Model/Common/ExternalIds.php index 61d57838..e064623c 100644 --- a/lib/Tmdb/Model/Common/ExternalIds.php +++ b/lib/Tmdb/Model/Common/ExternalIds.php @@ -27,7 +27,7 @@ class ExternalIds extends AbstractModel private $tvdbId; private $tvrageId; - public static $_properties = array( + public static $properties = array( 'imdb_id', 'freebase_id', 'freebase_mid', diff --git a/lib/Tmdb/Model/Common/GenericCollection.php b/lib/Tmdb/Model/Common/GenericCollection.php index 16df46be..8029c4f8 100644 --- a/lib/Tmdb/Model/Common/GenericCollection.php +++ b/lib/Tmdb/Model/Common/GenericCollection.php @@ -317,7 +317,9 @@ public function filterId($id) { $result = $this->filter( function ($key, $value) use ($id) { - if ($value->getId() == $id) { return true; } + if ($value->getId() == $id) { + return true; + } } ); @@ -338,7 +340,9 @@ public function filterLanguage($language = 'en') { return $this->filter( function ($key, $value) use ($language) { - if ($value instanceof LanguageFilter && $value->getIso6391() == $language) { return true; } + if ($value instanceof LanguageFilter && $value->getIso6391() == $language) { + return true; + } } ); } @@ -353,7 +357,9 @@ public function filterCountry($country = 'US') { return $this->filter( function ($key, $value) use ($country) { - if ($value instanceof CountryFilter && $value->getIso31661() == $country) { return true; } + if ($value instanceof CountryFilter && $value->getIso31661() == $country) { + return true; + } } ); } @@ -368,7 +374,9 @@ public function filterAdult($adult = false) { return $this->filter( function ($key, $value) use ($adult) { - if ($value instanceof AdultFilter && $value->getAdult() == $adult) { return true; } + if ($value instanceof AdultFilter && $value->getAdult() == $adult) { + return true; + } } ); } diff --git a/lib/Tmdb/Model/Common/SpokenLanguage.php b/lib/Tmdb/Model/Common/SpokenLanguage.php index ddb2d3f8..47a87865 100644 --- a/lib/Tmdb/Model/Common/SpokenLanguage.php +++ b/lib/Tmdb/Model/Common/SpokenLanguage.php @@ -24,7 +24,7 @@ class SpokenLanguage extends AbstractModel implements LanguageFilter private $iso6391; private $name; - public static $_properties = array( + public static $properties = array( 'iso_369_1', 'name', ); diff --git a/lib/Tmdb/Model/Common/Trailer/Youtube.php b/lib/Tmdb/Model/Common/Trailer/Youtube.php index ef4faf76..3d78aeaf 100644 --- a/lib/Tmdb/Model/Common/Trailer/Youtube.php +++ b/lib/Tmdb/Model/Common/Trailer/Youtube.php @@ -27,7 +27,7 @@ class Youtube extends AbstractTrailer private $source; private $type; - public static $_properties = array( + public static $properties = array( 'name', 'size', 'source', diff --git a/lib/Tmdb/Model/Common/Translation.php b/lib/Tmdb/Model/Common/Translation.php index c75e52c7..bcc513b0 100644 --- a/lib/Tmdb/Model/Common/Translation.php +++ b/lib/Tmdb/Model/Common/Translation.php @@ -22,7 +22,7 @@ class Translation extends SpokenLanguage implements LanguageFilter { private $englishName; - public static $_properties = array( + public static $properties = array( 'iso_639_1', 'name', 'english_name' diff --git a/lib/Tmdb/Model/Company.php b/lib/Tmdb/Model/Company.php index 41c26b9c..8bb70e0f 100644 --- a/lib/Tmdb/Model/Company.php +++ b/lib/Tmdb/Model/Company.php @@ -29,7 +29,7 @@ class Company extends AbstractModel private $name; private $parentCompany; - public static $_properties = array( + public static $properties = array( 'description', 'headquarters', 'homepage', diff --git a/lib/Tmdb/Model/Configuration.php b/lib/Tmdb/Model/Configuration.php index 8badb84b..8b71c5d4 100644 --- a/lib/Tmdb/Model/Configuration.php +++ b/lib/Tmdb/Model/Configuration.php @@ -28,7 +28,7 @@ class Configuration extends AbstractModel */ private $change_keys; - public static $_properties = array( + public static $properties = array( 'images', 'change_keys', ); diff --git a/lib/Tmdb/Model/Credits.php b/lib/Tmdb/Model/Credits.php index 3b6a6cf4..24c0e88c 100644 --- a/lib/Tmdb/Model/Credits.php +++ b/lib/Tmdb/Model/Credits.php @@ -58,7 +58,7 @@ class Credits extends AbstractModel /** * @var array */ - public static $_properties = array( + public static $properties = array( 'credit_type', 'department', 'job', diff --git a/lib/Tmdb/Model/Credits/Media.php b/lib/Tmdb/Model/Credits/Media.php index c19d0281..622b72fe 100644 --- a/lib/Tmdb/Model/Credits/Media.php +++ b/lib/Tmdb/Model/Credits/Media.php @@ -51,7 +51,7 @@ class Media extends AbstractModel */ private $seasons; - public static $_properties = array( + public static $properties = array( 'id', 'name', 'original_name', diff --git a/lib/Tmdb/Model/Find.php b/lib/Tmdb/Model/Find.php index 7512f34f..7b50fbab 100644 --- a/lib/Tmdb/Model/Find.php +++ b/lib/Tmdb/Model/Find.php @@ -92,5 +92,4 @@ public function getTvResults() { return $this->tvResults; } - } diff --git a/lib/Tmdb/Model/Genre.php b/lib/Tmdb/Model/Genre.php index 484ad4fc..d28876f7 100644 --- a/lib/Tmdb/Model/Genre.php +++ b/lib/Tmdb/Model/Genre.php @@ -21,7 +21,7 @@ class Genre extends AbstractModel private $id; private $name; - public static $_properties = array( + public static $properties = array( 'id', 'name', ); diff --git a/lib/Tmdb/Model/Image.php b/lib/Tmdb/Model/Image.php index b1237257..53020318 100644 --- a/lib/Tmdb/Model/Image.php +++ b/lib/Tmdb/Model/Image.php @@ -38,7 +38,7 @@ class Image extends AbstractModel implements ImageFilter, LanguageFilter protected $id; protected $type; - public static $_properties = array( + public static $properties = array( 'file_path', 'width', 'height', @@ -48,7 +48,7 @@ class Image extends AbstractModel implements ImageFilter, LanguageFilter 'vote_count' ); - public static $_formats = array( + public static $formats = array( 'posters' => self::FORMAT_POSTER, 'backdrops' => self::FORMAT_BACKDROP, 'profiles' => self::FORMAT_PROFILE, @@ -64,8 +64,8 @@ class Image extends AbstractModel implements ImageFilter, LanguageFilter */ public static function getTypeFromCollectionName($name) { - if (array_key_exists($name, self::$_formats)) { - return self::$_formats[$name]; + if (array_key_exists($name, self::$formats)) { + return self::$formats[$name]; } } diff --git a/lib/Tmdb/Model/Image/BackdropImage.php b/lib/Tmdb/Model/Image/BackdropImage.php index 81f9c6bb..628af20d 100644 --- a/lib/Tmdb/Model/Image/BackdropImage.php +++ b/lib/Tmdb/Model/Image/BackdropImage.php @@ -18,4 +18,6 @@ * Class BackdropImage * @package Tmdb\Model\Image */ -class BackdropImage extends Image {} +class BackdropImage extends Image +{ +} diff --git a/lib/Tmdb/Model/Image/LogoImage.php b/lib/Tmdb/Model/Image/LogoImage.php index e2e82035..99a2eace 100644 --- a/lib/Tmdb/Model/Image/LogoImage.php +++ b/lib/Tmdb/Model/Image/LogoImage.php @@ -18,4 +18,6 @@ * Class LogoImage * @package Tmdb\Model\Image */ -class LogoImage extends Image {} +class LogoImage extends Image +{ +} diff --git a/lib/Tmdb/Model/Image/PosterImage.php b/lib/Tmdb/Model/Image/PosterImage.php index e0337de6..63d7e262 100644 --- a/lib/Tmdb/Model/Image/PosterImage.php +++ b/lib/Tmdb/Model/Image/PosterImage.php @@ -18,4 +18,6 @@ * Class PosterImage * @package Tmdb\Model\Image */ -class PosterImage extends Image {} +class PosterImage extends Image +{ +} diff --git a/lib/Tmdb/Model/Image/ProfileImage.php b/lib/Tmdb/Model/Image/ProfileImage.php index a62bbdcc..e2bcd075 100644 --- a/lib/Tmdb/Model/Image/ProfileImage.php +++ b/lib/Tmdb/Model/Image/ProfileImage.php @@ -18,4 +18,6 @@ * Class ProfileImage * @package Tmdb\Model\Image */ -class ProfileImage extends Image {} +class ProfileImage extends Image +{ +} diff --git a/lib/Tmdb/Model/Image/StillImage.php b/lib/Tmdb/Model/Image/StillImage.php index dff71b50..18539dcd 100644 --- a/lib/Tmdb/Model/Image/StillImage.php +++ b/lib/Tmdb/Model/Image/StillImage.php @@ -18,4 +18,6 @@ * Class StillImage * @package Tmdb\Model\Image */ -class StillImage extends Image {} +class StillImage extends Image +{ +} diff --git a/lib/Tmdb/Model/Job.php b/lib/Tmdb/Model/Job.php index 310e37fb..d5f39b2c 100644 --- a/lib/Tmdb/Model/Job.php +++ b/lib/Tmdb/Model/Job.php @@ -18,7 +18,7 @@ */ class Job extends AbstractModel { - public static $_properties = array( + public static $properties = array( 'department', 'job_list' ); diff --git a/lib/Tmdb/Model/Keyword.php b/lib/Tmdb/Model/Keyword.php index f6fb0323..91e91b16 100644 --- a/lib/Tmdb/Model/Keyword.php +++ b/lib/Tmdb/Model/Keyword.php @@ -21,7 +21,7 @@ class Keyword extends AbstractModel private $id; private $name; - public static $_properties = array( + public static $properties = array( 'id', 'name', ); diff --git a/lib/Tmdb/Model/Lists.php b/lib/Tmdb/Model/Lists.php index 8047e44a..e1c13419 100644 --- a/lib/Tmdb/Model/Lists.php +++ b/lib/Tmdb/Model/Lists.php @@ -71,7 +71,7 @@ class Lists extends AbstractModel */ private $posterImage; - public static $_properties = array( + public static $properties = array( 'created_by', 'description', 'favorite_count', diff --git a/lib/Tmdb/Model/Lists/ItemStatus.php b/lib/Tmdb/Model/Lists/ItemStatus.php index 79f5a614..8b8f9524 100644 --- a/lib/Tmdb/Model/Lists/ItemStatus.php +++ b/lib/Tmdb/Model/Lists/ItemStatus.php @@ -33,7 +33,7 @@ class ItemStatus extends AbstractModel /** * @var array */ - public static $_properties = array( + public static $properties = array( 'id', 'item_present' ); diff --git a/lib/Tmdb/Model/Lists/ListItem.php b/lib/Tmdb/Model/Lists/ListItem.php index 8591a93e..350c2475 100644 --- a/lib/Tmdb/Model/Lists/ListItem.php +++ b/lib/Tmdb/Model/Lists/ListItem.php @@ -75,7 +75,7 @@ class ListItem extends AbstractModel /** * @var array */ - public static $_properties = array( + public static $properties = array( 'backdrop_path', 'id', 'original_title', diff --git a/lib/Tmdb/Model/Lists/Result.php b/lib/Tmdb/Model/Lists/Result.php index 35a7ee71..b9413523 100644 --- a/lib/Tmdb/Model/Lists/Result.php +++ b/lib/Tmdb/Model/Lists/Result.php @@ -33,7 +33,7 @@ class Result extends AbstractModel /** * @var array */ - public static $_properties = array( + public static $properties = array( 'status_code', 'status_message' ); diff --git a/lib/Tmdb/Model/Lists/ResultWithListId.php b/lib/Tmdb/Model/Lists/ResultWithListId.php index 113f6dd5..d28362bc 100644 --- a/lib/Tmdb/Model/Lists/ResultWithListId.php +++ b/lib/Tmdb/Model/Lists/ResultWithListId.php @@ -26,7 +26,7 @@ class ResultWithListId extends Result /** * @var array */ - public static $_properties = array( + public static $properties = array( 'status_code', 'status_message', 'list_id' diff --git a/lib/Tmdb/Model/Movie.php b/lib/Tmdb/Model/Movie.php index 73151b03..ea467361 100644 --- a/lib/Tmdb/Model/Movie.php +++ b/lib/Tmdb/Model/Movie.php @@ -220,7 +220,7 @@ class Movie extends AbstractModel * * @var array */ - public static $_properties = array( + public static $properties = array( 'adult', 'backdrop_path', 'belongs_to_collection', diff --git a/lib/Tmdb/Model/Movie/AccountStates.php b/lib/Tmdb/Model/Movie/AccountStates.php index d48b4e1b..6d64bcc9 100644 --- a/lib/Tmdb/Model/Movie/AccountStates.php +++ b/lib/Tmdb/Model/Movie/AccountStates.php @@ -40,7 +40,7 @@ class AccountStates extends AbstractModel */ private $watchlist; - public static $_properties = array( + public static $properties = array( 'id', 'favorite', 'watchlist', diff --git a/lib/Tmdb/Model/Movie/AlternativeTitle.php b/lib/Tmdb/Model/Movie/AlternativeTitle.php index 4dbb0acf..ae7d8180 100644 --- a/lib/Tmdb/Model/Movie/AlternativeTitle.php +++ b/lib/Tmdb/Model/Movie/AlternativeTitle.php @@ -24,7 +24,7 @@ class AlternativeTitle extends AbstractModel implements CountryFilter private $iso31661; private $title; - public static $_properties = array( + public static $properties = array( 'iso_3166_1', 'title', ); diff --git a/lib/Tmdb/Model/Movie/ListItem.php b/lib/Tmdb/Model/Movie/ListItem.php index 79e09680..c8188f7c 100644 --- a/lib/Tmdb/Model/Movie/ListItem.php +++ b/lib/Tmdb/Model/Movie/ListItem.php @@ -61,7 +61,7 @@ class ListItem extends AbstractModel */ private $posterImage; - public static $_properties = array( + public static $properties = array( 'description', 'favorite_count', 'id', @@ -222,5 +222,4 @@ public function getPosterPath() { return $this->posterPath; } - } diff --git a/lib/Tmdb/Model/Movie/Rating.php b/lib/Tmdb/Model/Movie/Rating.php index 75e60e9b..71af8de6 100644 --- a/lib/Tmdb/Model/Movie/Rating.php +++ b/lib/Tmdb/Model/Movie/Rating.php @@ -25,7 +25,7 @@ class Rating extends AbstractModel */ private $value; - public static $_properties = array( + public static $properties = array( 'value', ); diff --git a/lib/Tmdb/Model/Movie/Release.php b/lib/Tmdb/Model/Movie/Release.php index 28bbd902..16d94c64 100644 --- a/lib/Tmdb/Model/Movie/Release.php +++ b/lib/Tmdb/Model/Movie/Release.php @@ -25,7 +25,7 @@ class Release extends AbstractModel implements CountryFilter private $certification; private $releaseDate; - public static $_properties = array( + public static $properties = array( 'iso_3166_1', 'certification', 'release_date' diff --git a/lib/Tmdb/Model/Network.php b/lib/Tmdb/Model/Network.php index cae40ecf..f7174d3e 100644 --- a/lib/Tmdb/Model/Network.php +++ b/lib/Tmdb/Model/Network.php @@ -21,7 +21,7 @@ class Network extends AbstractModel private $id; private $name; - public static $_properties = array( + public static $properties = array( 'id', 'name', ); diff --git a/lib/Tmdb/Model/Person.php b/lib/Tmdb/Model/Person.php index 9aee9981..d2a8db30 100644 --- a/lib/Tmdb/Model/Person.php +++ b/lib/Tmdb/Model/Person.php @@ -117,7 +117,7 @@ class Person extends AbstractModel implements PersonInterface */ protected $externalIds; - public static $_properties = array( + public static $properties = array( 'adult', 'also_known_as', 'biography', diff --git a/lib/Tmdb/Model/Person/AbstractMember.php b/lib/Tmdb/Model/Person/AbstractMember.php index f6726820..a4c79282 100644 --- a/lib/Tmdb/Model/Person/AbstractMember.php +++ b/lib/Tmdb/Model/Person/AbstractMember.php @@ -41,7 +41,7 @@ abstract class AbstractMember extends AbstractModel */ private $profile; - public static $_properties = array( + public static $properties = array( 'id', 'name', 'profile_path' diff --git a/lib/Tmdb/Model/Person/CastMember.php b/lib/Tmdb/Model/Person/CastMember.php index 78d41d13..129bbdd8 100644 --- a/lib/Tmdb/Model/Person/CastMember.php +++ b/lib/Tmdb/Model/Person/CastMember.php @@ -35,7 +35,7 @@ class CastMember extends AbstractMember implements PersonInterface */ private $castId; - public static $_properties = array( + public static $properties = array( 'id', 'cast_id', 'name', diff --git a/lib/Tmdb/Model/Person/CrewMember.php b/lib/Tmdb/Model/Person/CrewMember.php index fc0bf915..bf53811b 100644 --- a/lib/Tmdb/Model/Person/CrewMember.php +++ b/lib/Tmdb/Model/Person/CrewMember.php @@ -30,7 +30,7 @@ class CrewMember extends AbstractMember implements PersonInterface */ private $job; - public static $_properties = array( + public static $properties = array( 'id', 'name', 'department', diff --git a/lib/Tmdb/Model/Person/MovieCredit.php b/lib/Tmdb/Model/Person/MovieCredit.php index 8c97815d..db117427 100644 --- a/lib/Tmdb/Model/Person/MovieCredit.php +++ b/lib/Tmdb/Model/Person/MovieCredit.php @@ -66,7 +66,7 @@ class MovieCredit extends AbstractModel */ private $posterImage; - public static $_properties = array( + public static $properties = array( 'adult', 'character', 'credit_id', @@ -251,5 +251,4 @@ public function getTitle() { return $this->title; } - } diff --git a/lib/Tmdb/Model/Query/Discover/DiscoverMoviesQuery.php b/lib/Tmdb/Model/Query/Discover/DiscoverMoviesQuery.php index 0ab1369b..b49c0e58 100644 --- a/lib/Tmdb/Model/Query/Discover/DiscoverMoviesQuery.php +++ b/lib/Tmdb/Model/Query/Discover/DiscoverMoviesQuery.php @@ -47,7 +47,8 @@ public function language($language) } /** - * Available options are vote_average.desc, vote_average.asc, release_date.desc, release_date.asc, popularity.desc, popularity.asc + * Available options are vote_average.desc, vote_average.asc, release_date.desc, + * release_date.asc, popularity.desc, popularity.asc * * @param string $option * @return $this @@ -73,7 +74,8 @@ public function includeAdult($allow = true) } /** - * Filter the results release dates to matches that include this value. Expected value is a year. + * Filter the results release dates to matches that include this value. + * Expected value is a year. * * @param \DateTime|integer $year * @return $this @@ -90,7 +92,8 @@ public function year($year) } /** - * Filter the results so that only the primary release date year has this value. Expected value is a year. + * Filter the results so that only the primary release date year has this value. + * Expected value is a year. * * @param \DateTime|integer $year * @return $this @@ -107,7 +110,8 @@ public function primaryReleaseYear($year) } /** - * Only include movies that are equal to, or have a vote count higher than this value. Expected value is an integer. + * Only include movies that are equal to, or have a vote count higher than this value. + * Expected value is an integer. * * @param integer $count * @return $this @@ -120,7 +124,8 @@ public function voteCountGte($count) } /** - * Only include movies that are equal to, or have a higher average rating than this value. Expected value is a float. + * Only include movies that are equal to, or have a higher average rating than this value. + * Expected value is a float. * * @param float $average * @return $this @@ -133,7 +138,9 @@ public function voteAverageGte($average) } /** - * Only include movies with the specified genres. Expected value is an integer (the id of a genre). + * Only include movies with the specified genres. + * Expected value is an integer (the id of a genre). + * * Multiple values can be specified. * * Comma separated indicates an 'AND' query, while a pipe (|) separated value indicates an 'OR'. @@ -217,7 +224,8 @@ public function releaseDateLte(\DateTime $date) /** * Only include movies with certifications for a specific country. * - * When this value is specified, 'certification.lte' is required. A ISO 3166-1 is expected. + * When this value is specified, 'certification.lte' is required. + * A ISO 3166-1 is expected. * * @param string $country * @return $this diff --git a/lib/Tmdb/Model/Query/Discover/DiscoverTvQuery.php b/lib/Tmdb/Model/Query/Discover/DiscoverTvQuery.php index 46660b35..5e2f336f 100644 --- a/lib/Tmdb/Model/Query/Discover/DiscoverTvQuery.php +++ b/lib/Tmdb/Model/Query/Discover/DiscoverTvQuery.php @@ -47,7 +47,8 @@ public function language($language) } /** - * Available options are vote_average.desc, vote_average.asc, first_air_date.desc, first_air_date.asc, popularity.desc, popularity.asc + * Available options are vote_average.desc, vote_average.asc, first_air_date.desc, + * first_air_date.asc, popularity.desc, popularity.asc * * @param string $option * @return $this @@ -60,7 +61,8 @@ public function sortBy($option) } /** - * Filter the results release dates to matches that include this value. Expected value is a year. + * Filter the results release dates to matches that include this value. + * Expected value is a year. * * @param \DateTime|integer $year * @return $this @@ -77,7 +79,8 @@ public function firstAirDateYear($year) } /** - * Only include TV shows that are equal to, or have a vote count higher than this value. Expected value is an integer. + * Only include TV shows that are equal to, or have a vote count higher than this value. + * Expected value is an integer. * * @param integer $count * @return $this @@ -90,7 +93,8 @@ public function voteCountGte($count) } /** - * Only include TV shows that are equal to, or have a higher average rating than this value. Expected value is a float. + * Only include TV shows that are equal to, or have a higher average rating than this value. + * Expected value is a float. * * @param float $average * @return $this @@ -103,10 +107,13 @@ public function voteAverageGte($average) } /** - * Only include TV shows with the specified genres. Expected value is an integer (the id of a genre). + * Only include TV shows with the specified genres. + * Expected value is an integer (the id of a genre). * * Multiple values can be specified. - * Comma separated indicates an 'AND' query, while a pipe (|) separated value indicates an 'OR'. + * + * Comma separated indicates an 'AND' query, + * while a pipe (|) separated value indicates an 'OR'. * * @param array|string $genres * @return $this @@ -185,7 +192,8 @@ public function firstAirDateLte($date) /** * Filter TV shows to include a specific network. * - * Expected value is an integer (the id of a network). They can be comma separated to indicate an 'AND' query. + * Expected value is an integer (the id of a network). + * They can be comma separated to indicate an 'AND' query. * * Expected value is an integer (the id of a company). * They can be comma separated to indicate an 'AND' query. diff --git a/lib/Tmdb/Model/Review.php b/lib/Tmdb/Model/Review.php index 44371245..c49f659c 100644 --- a/lib/Tmdb/Model/Review.php +++ b/lib/Tmdb/Model/Review.php @@ -27,7 +27,7 @@ class Review extends AbstractModel private $mediaType; private $url; - public static $_properties = array( + public static $properties = array( 'id', 'author', 'content', @@ -189,5 +189,4 @@ public function getUrl() { return $this->url; } - } diff --git a/lib/Tmdb/Model/Search/SearchQuery/CompanySearchQuery.php b/lib/Tmdb/Model/Search/SearchQuery/CompanySearchQuery.php index 03741501..da281a46 100644 --- a/lib/Tmdb/Model/Search/SearchQuery/CompanySearchQuery.php +++ b/lib/Tmdb/Model/Search/SearchQuery/CompanySearchQuery.php @@ -18,4 +18,6 @@ * Class CompanySearchQuery * @package Tmdb\Model\Search\SearchQuery */ -class CompanySearchQuery extends SearchQuery {} +class CompanySearchQuery extends SearchQuery +{ +} diff --git a/lib/Tmdb/Model/Search/SearchQuery/KeywordSearchQuery.php b/lib/Tmdb/Model/Search/SearchQuery/KeywordSearchQuery.php index 972287a7..487ce2cc 100644 --- a/lib/Tmdb/Model/Search/SearchQuery/KeywordSearchQuery.php +++ b/lib/Tmdb/Model/Search/SearchQuery/KeywordSearchQuery.php @@ -18,4 +18,6 @@ * Class KeywordSearchQuery * @package Tmdb\Model\Search\SearchQuery */ -class KeywordSearchQuery extends SearchQuery {} +class KeywordSearchQuery extends SearchQuery +{ +} diff --git a/lib/Tmdb/Model/Tv.php b/lib/Tmdb/Model/Tv.php index 1bec3145..95ddc93d 100644 --- a/lib/Tmdb/Model/Tv.php +++ b/lib/Tmdb/Model/Tv.php @@ -187,7 +187,7 @@ class Tv extends AbstractModel * * @var array */ - public static $_properties = array( + public static $properties = array( 'backdrop_path', 'created_by', 'episode_run_time', diff --git a/lib/Tmdb/Model/Tv/Episode.php b/lib/Tmdb/Model/Tv/Episode.php index 4815ca1d..c809591e 100644 --- a/lib/Tmdb/Model/Tv/Episode.php +++ b/lib/Tmdb/Model/Tv/Episode.php @@ -107,7 +107,7 @@ class Episode extends AbstractModel * * @var array */ - public static $_properties = array( + public static $properties = array( 'air_date', 'episode_number', 'name', diff --git a/lib/Tmdb/Model/Tv/Network.php b/lib/Tmdb/Model/Tv/Network.php index 0bbe1180..366f9003 100644 --- a/lib/Tmdb/Model/Tv/Network.php +++ b/lib/Tmdb/Model/Tv/Network.php @@ -37,7 +37,7 @@ class Network extends AbstractModel * * @var array */ - public static $_properties = array( + public static $properties = array( 'id', 'name', ); diff --git a/lib/Tmdb/Model/Tv/Season.php b/lib/Tmdb/Model/Tv/Season.php index 166ac925..3bb9e9c2 100644 --- a/lib/Tmdb/Model/Tv/Season.php +++ b/lib/Tmdb/Model/Tv/Season.php @@ -93,7 +93,7 @@ class Season extends AbstractModel * * @var array */ - public static $_properties = array( + public static $properties = array( 'air_date', 'name', 'overview', diff --git a/lib/Tmdb/Repository/AccountRepository.php b/lib/Tmdb/Repository/AccountRepository.php index 8085d79a..19e26247 100644 --- a/lib/Tmdb/Repository/AccountRepository.php +++ b/lib/Tmdb/Repository/AccountRepository.php @@ -24,7 +24,8 @@ class AccountRepository extends AbstractRepository { /** - * Get the basic information for an account. You will need to have a valid session id. + * Get the basic information for an account. + * You will need to have a valid session id. * * @return null|\Tmdb\Model\AbstractModel */ diff --git a/lib/Tmdb/Repository/AuthenticationRepository.php b/lib/Tmdb/Repository/AuthenticationRepository.php index ed075b0b..809a16b9 100644 --- a/lib/Tmdb/Repository/AuthenticationRepository.php +++ b/lib/Tmdb/Repository/AuthenticationRepository.php @@ -56,11 +56,14 @@ public function getSessionToken(RequestToken $requestToken) * This method is used to generate a guest session id. * * A guest session can be used to rate movies without having a registered TMDb user account. - * You should only generate a single guest session per user (or device) as you will be able to - * attach the ratings to a TMDb user account in the future. + * You should only generate a single guest session per user (or device) + * as you will be able to attach the ratings to a TMDb user account in the future. * - * There is also IP limits in place so you should always make sure it's the end user doing the guest session actions. - * If a guest session is not used for the first time within 24 hours, it will be automatically discarded. + * There is also IP limits in place so you should always make sure it's + * the end user doing the guest session actions. + * + * If a guest session is not used for the first time within 24 hours, + * it will be automatically discarded. * * @return RequestToken */ diff --git a/lib/Tmdb/Repository/CertificationRepository.php b/lib/Tmdb/Repository/CertificationRepository.php index 31d979af..8738535f 100644 --- a/lib/Tmdb/Repository/CertificationRepository.php +++ b/lib/Tmdb/Repository/CertificationRepository.php @@ -24,7 +24,8 @@ class CertificationRepository extends AbstractRepository /** * Get the list of supported certifications for movies. * - * These can be used in conjunction with the certification_country and certification.lte parameters when using discover. + * These can be used in conjunction with the certification_country + * and certification.lte parameters when using discover. * * @param $parameters * @param $headers diff --git a/lib/Tmdb/Repository/CollectionRepository.php b/lib/Tmdb/Repository/CollectionRepository.php index 4079f5ad..c38df046 100644 --- a/lib/Tmdb/Repository/CollectionRepository.php +++ b/lib/Tmdb/Repository/CollectionRepository.php @@ -37,7 +37,8 @@ public function __construct(Client $client) /** * Load a collection with the given identifier * - * If you want to optimize the result set/bandwidth you should define the AppendToResponse parameter + * If you want to optimize the result set/bandwidth you + * should define the AppendToResponse parameter * * @param $id * @param $parameters diff --git a/lib/Tmdb/Repository/DiscoverRepository.php b/lib/Tmdb/Repository/DiscoverRepository.php index 3d20825f..6d7ec6c6 100644 --- a/lib/Tmdb/Repository/DiscoverRepository.php +++ b/lib/Tmdb/Repository/DiscoverRepository.php @@ -29,7 +29,8 @@ class DiscoverRepository extends AbstractRepository { /** - * Discover movies by different types of data like average rating, number of votes, genres and certifications. + * Discover movies by different types of data like average rating, + * number of votes, genres and certifications. * * @param DiscoverMoviesQuery $query * @param array $headers @@ -41,7 +42,9 @@ public function discoverMovies(DiscoverMoviesQuery $query, array $headers = arra $query = $query->toArray(); if (array_key_exists('certification_country', $query) && !array_key_exists('certification.lte', $query)) { - throw new RuntimeException('When the certification_country option is given the certification.lte option is required.'); + throw new RuntimeException( + 'When the certification_country option is given the certification.lte option is required.' + ); } $data = $this->getApi()->discoverMovies($query, $headers); @@ -50,7 +53,8 @@ public function discoverMovies(DiscoverMoviesQuery $query, array $headers = arra } /** - * Discover TV shows by different types of data like average rating, number of votes, genres, the network they aired on and air dates. + * Discover TV shows by different types of data like average rating, + * number of votes, genres, the network they aired on and air dates. * * @param DiscoverTvQuery $query * @param array $headers diff --git a/lib/Tmdb/Repository/FindRepository.php b/lib/Tmdb/Repository/FindRepository.php index 9cf26910..e8f538ea 100644 --- a/lib/Tmdb/Repository/FindRepository.php +++ b/lib/Tmdb/Repository/FindRepository.php @@ -33,7 +33,7 @@ class FindRepository extends AbstractRepository public function find($id, array $parameters = array(), array $headers = array()) { return $this->getFactory()->create( - $this->getApi()->find($id,$parameters, $headers) + $this->getApi()->find($id, $parameters, $headers) ); } diff --git a/lib/Tmdb/Repository/GenreRepository.php b/lib/Tmdb/Repository/GenreRepository.php index 3a8bdff2..96e171a2 100644 --- a/lib/Tmdb/Repository/GenreRepository.php +++ b/lib/Tmdb/Repository/GenreRepository.php @@ -51,7 +51,8 @@ public function loadCollection(array $parameters = array(), array $headers = arr } /** - * Get the list of movies for a particular genre by id. By default, only movies with 10 or more votes are included. + * Get the list of movies for a particular genre by id. + * By default, only movies with 10 or more votes are included. * * @param $id * @param array $parameters diff --git a/lib/Tmdb/Repository/KeywordRepository.php b/lib/Tmdb/Repository/KeywordRepository.php index b3a6784b..4c854777 100644 --- a/lib/Tmdb/Repository/KeywordRepository.php +++ b/lib/Tmdb/Repository/KeywordRepository.php @@ -39,7 +39,8 @@ public function load($id, array $parameters = array(), array $headers = array()) } /** - * Get the list of movies for a particular keyword by id. By default, only movies with 10 or more votes are included. + * Get the list of movies for a particular keyword by id. + * By default, only movies with 10 or more votes are included. * * @param $id * @param array $parameters diff --git a/lib/Tmdb/Repository/ListRepository.php b/lib/Tmdb/Repository/ListRepository.php index 04abcc40..1342c5cb 100644 --- a/lib/Tmdb/Repository/ListRepository.php +++ b/lib/Tmdb/Repository/ListRepository.php @@ -71,7 +71,8 @@ public function createList($name, $description = null, array $parameters = array } /** - * This method lets users add new movies to a list that they created. A valid session id is required. + * This method lets users add new movies to a list that they created. + * A valid session id is required. * * @param string $id * @param int $mediaId @@ -85,7 +86,8 @@ public function add($id, $mediaId) } /** - * This method lets users delete movies from a list that they created. A valid session id is required. + * This method lets users delete movies from a list that they created. + * A valid session id is required. * * @param string $id * @param int $mediaId @@ -99,7 +101,8 @@ public function remove($id, $mediaId) } /** - * This method lets users delete a list that they created. A valid session id is required. + * This method lets users delete a list that they created. + * A valid session id is required. * * @param string $id * @return ItemStatus diff --git a/lib/Tmdb/Repository/MovieRepository.php b/lib/Tmdb/Repository/MovieRepository.php index e733490e..d56571ce 100644 --- a/lib/Tmdb/Repository/MovieRepository.php +++ b/lib/Tmdb/Repository/MovieRepository.php @@ -45,7 +45,8 @@ class MovieRepository extends AbstractRepository /** * Load a movie with the given identifier * - * If you want to optimize the result set/bandwidth you should define the AppendToResponse parameter + * If you want to optimize the result set/bandwidth you + * should define the AppendToResponse parameter * * @param $id * @param $parameters @@ -274,7 +275,8 @@ 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. + * 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 Movie[] @@ -287,7 +289,8 @@ 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. + * 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 Movie[] @@ -300,7 +303,8 @@ public function getNowPlaying(array $options = array()) } /** - * Get the list of popular movies on The Movie Database. This list refreshes every day. + * Get the list of popular movies on The Movie Database. + * This list refreshes every day. * * @param array $options * @return Movie[] @@ -313,7 +317,10 @@ 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. + * 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 Movie[] @@ -326,7 +333,8 @@ public function getTopRated(array $options = array()) } /** - * This method lets users get the status of whether or not the movie has been rated or added to their favourite or watch lists. A valid session id is required. + * This method lets users get the status of whether or not the movie has been rated + * or added to their favourite or watch lists. A valid session id is required. * * @param integer $id * @return Movie[] @@ -439,5 +447,4 @@ public function getPeopleFactory() { return $this->peopleFactory; } - } diff --git a/lib/Tmdb/Repository/PeopleRepository.php b/lib/Tmdb/Repository/PeopleRepository.php index 648bb716..c09c87be 100644 --- a/lib/Tmdb/Repository/PeopleRepository.php +++ b/lib/Tmdb/Repository/PeopleRepository.php @@ -73,7 +73,9 @@ public function getMovieCredits($id, array $parameters = array(), array $headers /** * Get the TV credits for a specific person id. * - * To get the expanded details for each record, call the /credit method with the provided credit_id. + * To get the expanded details for each record, + * call the /credit method with the provided credit_id. + * * This will provide details about which episode and/or season the credit is for. * * @param $id @@ -92,7 +94,9 @@ public function getTvCredits($id, array $parameters = array(), array $headers = /** * Get the combined (movie and TV) credits for a specific person id. * - * To get the expanded details for each TV record, call the /credit method with the provided credit_id. + * To get the expanded details for each TV record, + * call the /credit method with the provided credit_id. + * * This will provide details about which episode and/or season the credit is for. * * @param $id diff --git a/lib/Tmdb/Repository/TvEpisodeRepository.php b/lib/Tmdb/Repository/TvEpisodeRepository.php index d573a7b0..74128c78 100644 --- a/lib/Tmdb/Repository/TvEpisodeRepository.php +++ b/lib/Tmdb/Repository/TvEpisodeRepository.php @@ -29,7 +29,8 @@ class TvEpisodeRepository extends AbstractRepository /** * Load a tv season with the given identifier * - * If you want to optimize the result set/bandwidth you should define the AppendToResponse parameter + * If you want to optimize the result set/bandwidth you should + * define the AppendToResponse parameter * * @param $tvShow Tv|integer * @param $season Season|integer @@ -67,7 +68,13 @@ public function load($tvShow, $season, $episode, array $parameters = array(), ar ); } - $data = $this->getApi()->getEpisode($tvShow, $season, $episode, $this->parseQueryParameters($parameters), $headers); + $data = $this->getApi()->getEpisode( + $tvShow, + $season, + $episode, + $this->parseQueryParameters($parameters), + $headers + ); return $this->getFactory()->create($data); } @@ -98,7 +105,14 @@ public function getCredits($tvShow, $season, $episode, array $parameters = array $episode = $episode->getId(); } - $data = $this->getApi()->getCredits($tvShow, $season, $episode, $this->parseQueryParameters($parameters), $headers); + $data = $this->getApi()->getCredits( + $tvShow, + $season, + $episode, + $this->parseQueryParameters($parameters), + $headers + ); + $episode = $this->getFactory()->create(array('credits' => $data)); return $episode->getCredits(); @@ -128,7 +142,14 @@ public function getExternalIds($tvShow, $season, $episode, array $parameters = a $episode = $episode->getId(); } - $data = $this->getApi()->getExternalIds($tvShow, $season, $episode, $this->parseQueryParameters($parameters), $headers); + $data = $this->getApi()->getExternalIds( + $tvShow, + $season, + $episode, + $this->parseQueryParameters($parameters), + $headers + ); + $episode = $this->getFactory()->create(array('external_ids' => $data)); return $episode->getExternalIds(); @@ -158,7 +179,14 @@ public function getImages($tvShow, $season, $episode, array $parameters = array( $episode = $episode->getId(); } - $data = $this->getApi()->getImages($tvShow, $season, $episode, $this->parseQueryParameters($parameters), $headers); + $data = $this->getApi()->getImages( + $tvShow, + $season, + $episode, + $this->parseQueryParameters($parameters), + $headers + ); + $episode = $this->getFactory()->create(array('images' => $data)); return $episode->getImages(); diff --git a/lib/Tmdb/Repository/TvRepository.php b/lib/Tmdb/Repository/TvRepository.php index 8277fea7..a3b55e99 100644 --- a/lib/Tmdb/Repository/TvRepository.php +++ b/lib/Tmdb/Repository/TvRepository.php @@ -26,7 +26,8 @@ class TvRepository extends AbstractRepository /** * Load a tv with the given identifier * - * If you want to optimize the result set/bandwidth you should define the AppendToResponse parameter + * If you want to optimize the result set/bandwidth you should + * define the AppendToResponse parameter * * @param integer $id * @param $parameters @@ -152,7 +153,8 @@ 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. + * 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 Tv[] @@ -165,7 +167,8 @@ public function getTopRated(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. + * 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 Tv[] diff --git a/test/Tmdb/Tests/Common/ObjectHydratorTest.php b/test/Tmdb/Tests/Common/ObjectHydratorTest.php index 2de27930..a66bc89d 100644 --- a/test/Tmdb/Tests/Common/ObjectHydratorTest.php +++ b/test/Tmdb/Tests/Common/ObjectHydratorTest.php @@ -46,7 +46,7 @@ class TestModel extends \Tmdb\Model\AbstractModel private $id; private $name; - static $_properties = array('id', 'name'); + static $properties = array('id', 'name'); /** * @param mixed $id @@ -89,5 +89,5 @@ public function getName() class FailingTestModel extends \Tmdb\Model\AbstractModel { - static $_properties = array('lastname'); + static $properties = array('lastname'); } diff --git a/test/Tmdb/Tests/Factory/Movie/GenericCollectionFactoryTest.php b/test/Tmdb/Tests/Factory/Movie/GenericCollectionFactoryTest.php index b19296f0..509cc2a1 100644 --- a/test/Tmdb/Tests/Factory/Movie/GenericCollectionFactoryTest.php +++ b/test/Tmdb/Tests/Factory/Movie/GenericCollectionFactoryTest.php @@ -48,7 +48,7 @@ protected function getFactoryClass() class FakeClass extends AbstractModel { - public static $_properties = array('id'); + public static $properties = array('id'); private $id;