diff --git a/build/phpmd.xml b/build/phpmd.xml
index 6921081f..865291ae 100644
--- a/build/phpmd.xml
+++ b/build/phpmd.xml
@@ -10,4 +10,4 @@
-
\ No newline at end of file
+
diff --git a/build/phpunit.xml b/build/phpunit.xml
index 60217598..a33344bf 100644
--- a/build/phpunit.xml
+++ b/build/phpunit.xml
@@ -37,4 +37,4 @@
yui="true" highlight="true"
lowUpperBound="35" highLowerBound="70"/>
-
\ No newline at end of file
+
diff --git a/examples/account/api/account.php b/examples/account/api/account.php
index fe1fd5a8..e0170eca 100644
--- a/examples/account/api/account.php
+++ b/examples/account/api/account.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$account = $client->getAccountApi()->getAccount();
-var_dump($account);
\ No newline at end of file
+var_dump($account);
diff --git a/examples/account/api/favorite.php b/examples/account/api/favorite.php
index ad3219bb..7f34319c 100644
--- a/examples/account/api/favorite.php
+++ b/examples/account/api/favorite.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$favorite = $client->getAccountApi()->favorite(TMDB_ACCOUNT_ID, 97020, true);
-var_dump($favorite);
\ No newline at end of file
+var_dump($favorite);
diff --git a/examples/account/api/favorite_movies.php b/examples/account/api/favorite_movies.php
index 6b38f291..c6dd5397 100644
--- a/examples/account/api/favorite_movies.php
+++ b/examples/account/api/favorite_movies.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$favorite_movies = $client->getAccountApi()->getFavoriteMovies(TMDB_ACCOUNT_ID);
-var_dump($favorite_movies);
\ No newline at end of file
+var_dump($favorite_movies);
diff --git a/examples/account/api/lists.php b/examples/account/api/lists.php
index 318fcbcf..0fe404b5 100644
--- a/examples/account/api/lists.php
+++ b/examples/account/api/lists.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$lists = $client->getAccountApi()->getLists(TMDB_ACCOUNT_ID);
-var_dump($lists);
\ No newline at end of file
+var_dump($lists);
diff --git a/examples/account/api/rated_movies.php b/examples/account/api/rated_movies.php
index 6c33811b..d51efa36 100644
--- a/examples/account/api/rated_movies.php
+++ b/examples/account/api/rated_movies.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$rated_movies = $client->getAccountApi()->getRatedMovies(TMDB_ACCOUNT_ID);
-var_dump($rated_movies);
\ No newline at end of file
+var_dump($rated_movies);
diff --git a/examples/account/api/watchlist.php b/examples/account/api/watchlist.php
index aa7da6b8..03dca924 100644
--- a/examples/account/api/watchlist.php
+++ b/examples/account/api/watchlist.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$watchlist = $client->getAccountApi()->watchlist(TMDB_ACCOUNT_ID, 97020, true);
-var_dump($watchlist);
\ No newline at end of file
+var_dump($watchlist);
diff --git a/examples/account/api/watchlist_movies.php b/examples/account/api/watchlist_movies.php
index d4ec787c..6e4b6a0d 100644
--- a/examples/account/api/watchlist_movies.php
+++ b/examples/account/api/watchlist_movies.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$watchlist_movies = $client->getAccountApi()->getMovieWatchlist(TMDB_ACCOUNT_ID);
-var_dump($watchlist_movies);
\ No newline at end of file
+var_dump($watchlist_movies);
diff --git a/examples/account/model/account.php b/examples/account/model/account.php
index aa109d22..f7415cf3 100644
--- a/examples/account/model/account.php
+++ b/examples/account/model/account.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -23,4 +23,3 @@
$account = $accountRepository->getAccount();
var_dump($account);
-
diff --git a/examples/account/model/favorite.php b/examples/account/model/favorite.php
index 4d195cb4..075c9121 100644
--- a/examples/account/model/favorite.php
+++ b/examples/account/model/favorite.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -26,4 +26,3 @@
$lists = $accountRepository->favorite(TMDB_ACCOUNT_ID, 150);
var_dump($lists);
-
diff --git a/examples/account/model/favorite_movies.php b/examples/account/model/favorite_movies.php
index 77b4d28c..87b8bf0d 100644
--- a/examples/account/model/favorite_movies.php
+++ b/examples/account/model/favorite_movies.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -26,4 +26,3 @@
$lists = $accountRepository->getFavoriteMovies(TMDB_ACCOUNT_ID);
var_dump($lists);
-
diff --git a/examples/account/model/lists.php b/examples/account/model/lists.php
index 6f8f6ca1..31a3aae3 100644
--- a/examples/account/model/lists.php
+++ b/examples/account/model/lists.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -26,4 +26,3 @@
$lists = $accountRepository->getLists(TMDB_ACCOUNT_ID);
var_dump($lists);
-
diff --git a/examples/account/model/movie_watchlist.php b/examples/account/model/movie_watchlist.php
index 18542f82..a79fdc67 100644
--- a/examples/account/model/movie_watchlist.php
+++ b/examples/account/model/movie_watchlist.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -26,4 +26,3 @@
$lists = $accountRepository->getMovieWatchlist(TMDB_ACCOUNT_ID);
var_dump($lists);
-
diff --git a/examples/account/model/rated_movies.php b/examples/account/model/rated_movies.php
index a1e0f957..272cacbf 100644
--- a/examples/account/model/rated_movies.php
+++ b/examples/account/model/rated_movies.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -26,4 +26,3 @@
$lists = $accountRepository->getRatedMovies(TMDB_ACCOUNT_ID);
var_dump($lists);
-
diff --git a/examples/account/model/watchlist.php b/examples/account/model/watchlist.php
index 00de319e..879caa6d 100644
--- a/examples/account/model/watchlist.php
+++ b/examples/account/model/watchlist.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -26,4 +26,3 @@
$lists = $accountRepository->watchlist(TMDB_ACCOUNT_ID, 49047);
var_dump($lists);
-
diff --git a/examples/authentication/api/authenticate-token.php b/examples/authentication/api/authenticate-token.php
index 6e37987d..c0bd1853 100644
--- a/examples/authentication/api/authenticate-token.php
+++ b/examples/authentication/api/authenticate-token.php
@@ -10,12 +10,12 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
$requestToken = new \Tmdb\RequestToken(TMDB_REQUEST_TOKEN);
-$client->getAuthenticationApi()->authenticateRequestToken($requestToken->getToken());
\ No newline at end of file
+$client->getAuthenticationApi()->authenticateRequestToken($requestToken->getToken());
diff --git a/examples/authentication/api/get-guest-session.php b/examples/authentication/api/get-guest-session.php
index 8712ffb5..1e88bcc4 100644
--- a/examples/authentication/api/get-guest-session.php
+++ b/examples/authentication/api/get-guest-session.php
@@ -10,12 +10,12 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
$sessionToken = $client->getAuthenticationApi()->getNewGuestSession();
-var_dump($sessionToken);
\ No newline at end of file
+var_dump($sessionToken);
diff --git a/examples/authentication/api/get-session.php b/examples/authentication/api/get-session.php
index 534ab100..d3a23626 100644
--- a/examples/authentication/api/get-session.php
+++ b/examples/authentication/api/get-session.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -20,4 +20,4 @@
$sessionToken = $client->getAuthenticationApi()->getNewSession($requestToken->getToken());
-var_dump($sessionToken);
\ No newline at end of file
+var_dump($sessionToken);
diff --git a/examples/authentication/api/get-token.php b/examples/authentication/api/get-token.php
index 5f9ec2fe..6d9a8065 100644
--- a/examples/authentication/api/get-token.php
+++ b/examples/authentication/api/get-token.php
@@ -10,12 +10,12 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
$requestToken = $client->getAuthenticationApi()->getNewToken();
-var_dump($requestToken);
\ No newline at end of file
+var_dump($requestToken);
diff --git a/examples/authentication/model/authenticate_request_token.php b/examples/authentication/model/authenticate_request_token.php
index 16b1e29d..de971160 100644
--- a/examples/authentication/model/authenticate_request_token.php
+++ b/examples/authentication/model/authenticate_request_token.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
diff --git a/examples/authentication/model/guest_session_token.php b/examples/authentication/model/guest_session_token.php
index 33e4ecf5..05074cc4 100644
--- a/examples/authentication/model/guest_session_token.php
+++ b/examples/authentication/model/guest_session_token.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
diff --git a/examples/authentication/model/request_token.php b/examples/authentication/model/request_token.php
index 6685084f..ff706eec 100644
--- a/examples/authentication/model/request_token.php
+++ b/examples/authentication/model/request_token.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -20,4 +20,3 @@
$requestToken = $authenticationRepository->getRequestToken();
var_dump($requestToken);
-
diff --git a/examples/authentication/model/session_token.php b/examples/authentication/model/session_token.php
index 00e28599..8a68dbdb 100644
--- a/examples/authentication/model/session_token.php
+++ b/examples/authentication/model/session_token.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -22,4 +22,3 @@
$sessionToken = $authenticationRepository->getSessionToken($requestToken);
var_dump($sessionToken);
-
diff --git a/examples/certifications/api/get.php b/examples/certifications/api/get.php
index 96d01c0e..6990759e 100644
--- a/examples/certifications/api/get.php
+++ b/examples/certifications/api/get.php
@@ -10,12 +10,12 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
$credit = $client->getCertificationsApi()->getMovieList();
-var_dump($credit);
\ No newline at end of file
+var_dump($credit);
diff --git a/examples/certifications/model/get.php b/examples/certifications/model/get.php
index 83231228..ec98645b 100644
--- a/examples/certifications/model/get.php
+++ b/examples/certifications/model/get.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -20,4 +20,3 @@
$certificationList = $certificationRepository->getMovieList();
var_dump($certificationList);
-
diff --git a/examples/changes/model/movies.php b/examples/changes/model/movies.php
index 973794c0..309aea34 100644
--- a/examples/changes/model/movies.php
+++ b/examples/changes/model/movies.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -31,4 +31,3 @@
$response = $repository->getMovieChanges($query);
var_dump($response);
-
diff --git a/examples/changes/model/people.php b/examples/changes/model/people.php
index 21bf229c..f6a90c17 100644
--- a/examples/changes/model/people.php
+++ b/examples/changes/model/people.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -31,4 +31,3 @@
$response = $repository->getPeopleChanges($query);
var_dump($response);
-
diff --git a/examples/collection/model/all.php b/examples/collection/model/all.php
index 1f8c844c..210740fd 100644
--- a/examples/collection/model/all.php
+++ b/examples/collection/model/all.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\CollectionRepository($client);
$collection = $repository->load(10);
-var_dump($collection);
\ No newline at end of file
+var_dump($collection);
diff --git a/examples/collection/model/images.php b/examples/collection/model/images.php
index 1f8c844c..210740fd 100644
--- a/examples/collection/model/images.php
+++ b/examples/collection/model/images.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\CollectionRepository($client);
$collection = $repository->load(10);
-var_dump($collection);
\ No newline at end of file
+var_dump($collection);
diff --git a/examples/companies/model/get.php b/examples/companies/model/get.php
index 07f11c85..e542c2ae 100644
--- a/examples/companies/model/get.php
+++ b/examples/companies/model/get.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\CompanyRepository($client);
$company = $repository->load(1);
-var_dump($company);
\ No newline at end of file
+var_dump($company);
diff --git a/examples/configuration/model/get.php b/examples/configuration/model/get.php
index 410e076f..98009355 100644
--- a/examples/configuration/model/get.php
+++ b/examples/configuration/model/get.php
@@ -12,8 +12,8 @@
*/
header('Content-Type: text/html; charset=utf-8');
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$configRepository = new \Tmdb\Repository\ConfigurationRepository($client);
$config = $configRepository->load();
-var_dump($config);
\ No newline at end of file
+var_dump($config);
diff --git a/examples/credits/api/get.php b/examples/credits/api/get.php
index f1dd4ede..a84e445d 100644
--- a/examples/credits/api/get.php
+++ b/examples/credits/api/get.php
@@ -10,12 +10,12 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
$credit = $client->getCreditsApi()->getCredit('52542282760ee313280017f9');
-var_dump($credit);
\ No newline at end of file
+var_dump($credit);
diff --git a/examples/credits/model/get.php b/examples/credits/model/get.php
index 31b26985..f1a1ddfc 100644
--- a/examples/credits/model/get.php
+++ b/examples/credits/model/get.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\CreditsRepository($client);
$credits = $repository->load('52542282760ee313280017f9');
-var_dump($credits);
\ No newline at end of file
+var_dump($credits);
diff --git a/examples/discover/model/movies.php b/examples/discover/model/movies.php
index b792b3cf..97a21179 100644
--- a/examples/discover/model/movies.php
+++ b/examples/discover/model/movies.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -27,4 +27,3 @@
$response = $repository->discoverMovies($query);
var_dump($response);
-
diff --git a/examples/discover/model/tv.php b/examples/discover/model/tv.php
index 78b7ec80..0942e10a 100644
--- a/examples/discover/model/tv.php
+++ b/examples/discover/model/tv.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -27,4 +27,3 @@
$response = $repository->discoverTv($query);
var_dump($response);
-
diff --git a/examples/find/model/get.php b/examples/find/model/get.php
index 8cb8acb6..6ab5e09b 100644
--- a/examples/find/model/get.php
+++ b/examples/find/model/get.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\FindRepository($client);
$find = $repository->find('tt0120737', array('external_source' => 'imdb_id'));
-var_dump($find);
\ No newline at end of file
+var_dump($find);
diff --git a/examples/genres/model/all.php b/examples/genres/model/all.php
index b4746bc6..1378e308 100644
--- a/examples/genres/model/all.php
+++ b/examples/genres/model/all.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,6 +19,6 @@
$repository = new \Tmdb\Repository\GenreRepository($client);
$genres = $repository->loadCollection();
-foreach($genres as $genre) {
+foreach ($genres as $genre) {
var_dump($genre);
-}
\ No newline at end of file
+}
diff --git a/examples/genres/model/get.php b/examples/genres/model/get.php
index 0a9e0bea..212f7471 100644
--- a/examples/genres/model/get.php
+++ b/examples/genres/model/get.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\GenreRepository($client);
$genre = $repository->load(28);
-var_dump($genre);
\ No newline at end of file
+var_dump($genre);
diff --git a/examples/genres/model/movies.php b/examples/genres/model/movies.php
index ef77531b..03eb1915 100644
--- a/examples/genres/model/movies.php
+++ b/examples/genres/model/movies.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\GenreRepository($client);
$genre = $repository->getMovies(18);
-var_dump($genre);
\ No newline at end of file
+var_dump($genre);
diff --git a/examples/jobs/model/all.php b/examples/jobs/model/all.php
index 75f39a8b..a4fa258f 100644
--- a/examples/jobs/model/all.php
+++ b/examples/jobs/model/all.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,6 +19,6 @@
$repository = new \Tmdb\Repository\JobsRepository($client);
$jobs = $repository->loadCollection();
-foreach($jobs as $job) {
+foreach ($jobs as $job) {
var_dump($job);
-}
\ No newline at end of file
+}
diff --git a/examples/keywords/model/get.php b/examples/keywords/model/get.php
index 2f9dd9b6..8babf524 100644
--- a/examples/keywords/model/get.php
+++ b/examples/keywords/model/get.php
@@ -10,14 +10,13 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
-
$repository = new \Tmdb\Repository\KeywordRepository($client);
$keyword = $repository->load(1721);
-var_dump($keyword);
\ No newline at end of file
+var_dump($keyword);
diff --git a/examples/keywords/model/movies.php b/examples/keywords/model/movies.php
index 7630afce..556c6c23 100644
--- a/examples/keywords/model/movies.php
+++ b/examples/keywords/model/movies.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\KeywordRepository($client);
$movies = $repository->getMovies(1721);
-var_dump($movies);
\ No newline at end of file
+var_dump($movies);
diff --git a/examples/lists/api/add.php b/examples/lists/api/add.php
index 99da6017..a65935e6 100644
--- a/examples/lists/api/add.php
+++ b/examples/lists/api/add.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$add = $client->getListsApi()->addMediaToList(TMDB_LIST_ID, 49047);
-var_dump($add);
\ No newline at end of file
+var_dump($add);
diff --git a/examples/lists/api/item_status.php b/examples/lists/api/item_status.php
index 947af66e..691fb44f 100644
--- a/examples/lists/api/item_status.php
+++ b/examples/lists/api/item_status.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$remove = $client->getListsApi()->getItemStatus(TMDB_LIST_ID, 49047);
-var_dump($remove);
\ No newline at end of file
+var_dump($remove);
diff --git a/examples/lists/api/list_create.php b/examples/lists/api/list_create.php
index fb09fbed..5c2f1cee 100644
--- a/examples/lists/api/list_create.php
+++ b/examples/lists/api/list_create.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$create = $client->getListsApi()->createList('test', 'test description');
-var_dump($create);
\ No newline at end of file
+var_dump($create);
diff --git a/examples/lists/api/list_delete.php b/examples/lists/api/list_delete.php
index 7e658876..1671caf8 100644
--- a/examples/lists/api/list_delete.php
+++ b/examples/lists/api/list_delete.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$create = $client->getListsApi()->deleteList(TMDB_LIST_ID);
-var_dump($create);
\ No newline at end of file
+var_dump($create);
diff --git a/examples/lists/api/remove.php b/examples/lists/api/remove.php
index 1e2e5cc1..789f521d 100644
--- a/examples/lists/api/remove.php
+++ b/examples/lists/api/remove.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$remove = $client->getListsApi()->removeMediaFromList(TMDB_LIST_ID, 49047);
-var_dump($remove);
\ No newline at end of file
+var_dump($remove);
diff --git a/examples/lists/model/add.php b/examples/lists/model/add.php
index 93f6e8c8..55abd05b 100644
--- a/examples/lists/model/add.php
+++ b/examples/lists/model/add.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -22,4 +22,4 @@
$repository = new \Tmdb\Repository\ListRepository($client);
$result = $repository->add(TMDB_LIST_ID, 150);
-var_dump($result);
\ No newline at end of file
+var_dump($result);
diff --git a/examples/lists/model/create_list.php b/examples/lists/model/create_list.php
index de82a8ef..012c3999 100644
--- a/examples/lists/model/create_list.php
+++ b/examples/lists/model/create_list.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -22,4 +22,4 @@
$repository = new \Tmdb\Repository\ListRepository($client);
$result = $repository->createList('php-tmdb-api', 'just a test');
-var_dump($result);
\ No newline at end of file
+var_dump($result);
diff --git a/examples/lists/model/get.php b/examples/lists/model/get.php
index 8107437c..4cea0f20 100644
--- a/examples/lists/model/get.php
+++ b/examples/lists/model/get.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -22,4 +22,4 @@
$repository = new \Tmdb\Repository\ListRepository($client);
$list = $repository->load('509ec17b19c2950a0600050d');
-var_dump($list);
\ No newline at end of file
+var_dump($list);
diff --git a/examples/lists/model/item_status.php b/examples/lists/model/item_status.php
index 570aa4ac..b3f7d7bc 100644
--- a/examples/lists/model/item_status.php
+++ b/examples/lists/model/item_status.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -22,4 +22,4 @@
$repository = new \Tmdb\Repository\ListRepository($client);
$list = $repository->getItemStatus('509ec17b19c2950a0600050d', 150);
-var_dump($list);
\ No newline at end of file
+var_dump($list);
diff --git a/examples/lists/model/remove.php b/examples/lists/model/remove.php
index 6ecaa480..f2e7c34b 100644
--- a/examples/lists/model/remove.php
+++ b/examples/lists/model/remove.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -22,4 +22,4 @@
$repository = new \Tmdb\Repository\ListRepository($client);
$result = $repository->remove(TMDB_LIST_ID, 150);
-var_dump($result);
\ No newline at end of file
+var_dump($result);
diff --git a/examples/movies/api/account_states.php b/examples/movies/api/account_states.php
index 2d7b3b4f..acd242c7 100644
--- a/examples/movies/api/account_states.php
+++ b/examples/movies/api/account_states.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$accountStates = $client->getMoviesApi()->getAccountStates(550, true);
-var_dump($accountStates);
\ No newline at end of file
+var_dump($accountStates);
diff --git a/examples/movies/api/images.php b/examples/movies/api/images.php
index 30d9c029..1d701df4 100644
--- a/examples/movies/api/images.php
+++ b/examples/movies/api/images.php
@@ -10,10 +10,10 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
-$images = $client->getMoviesApi()->getImages(550);
\ No newline at end of file
+$images = $client->getMoviesApi()->getImages(550);
diff --git a/examples/movies/api/movie_rating.php b/examples/movies/api/movie_rating.php
index 0699d95d..f026ee77 100644
--- a/examples/movies/api/movie_rating.php
+++ b/examples/movies/api/movie_rating.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -21,4 +21,4 @@
$rating = $client->getMoviesApi()->rateMovie(550, 8.5);
-var_dump($rating);
\ No newline at end of file
+var_dump($rating);
diff --git a/examples/movies/model/account_states.php b/examples/movies/model/account_states.php
index 921e9712..83e30e57 100644
--- a/examples/movies/model/account_states.php
+++ b/examples/movies/model/account_states.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -22,4 +22,4 @@
$repository = new \Tmdb\Repository\MovieRepository($client);
$accountStates = $repository->getAccountStates(97020);
-var_dump($accountStates);
\ No newline at end of file
+var_dump($accountStates);
diff --git a/examples/movies/model/all.php b/examples/movies/model/all.php
index 70bba794..a26afdc8 100644
--- a/examples/movies/model/all.php
+++ b/examples/movies/model/all.php
@@ -12,8 +12,8 @@
*/
header('Content-Type: text/html; charset=utf-8');
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -33,20 +33,20 @@
echo "Alternative Titles
";
-foreach($movie->getAlternativeTitles()->filterCountry('US') as $title) {
+foreach ($movie->getAlternativeTitles()->filterCountry('US') as $title) {
printf(" - %s [%s]
", $title->getTitle(), $title->getIso31661());
}
echo "Cast
";
-foreach($movie->getCredits()->getCast() as $person) {
+foreach ($movie->getCredits()->getCast() as $person) {
echo $imageHelper->getHtml($person->getProfileImage(), 'w45');
printf(" - %s as %s
", $person->getName(), $person->getCharacter());
}
echo "Crew
";
-foreach($movie->getCredits()->getCrew() as $person) {
+foreach ($movie->getCredits()->getCrew() as $person) {
echo $imageHelper->getHtml($person->getProfileImage(), 'w45');
printf(" - %s as %s
", $person->getName(), $person->getJob());
}
@@ -55,7 +55,7 @@
// All collection classes support filtering by closure functions, provided by the generic collection implementation.
foreach($movie->getImages()->filter(
- function($key, $value){
+ function ($key, $value) {
if ($value->getIso6391() == 'en' && $value instanceof \Tmdb\Model\Image\PosterImage) { return true; }
}
) as $image) {
@@ -75,31 +75,31 @@ function($key, $value){
echo "Genres
";
-foreach($movie->getGenres() as $genre) {
+foreach ($movie->getGenres() as $genre) {
printf(" - %s
", $genre->getName());
}
echo "Keywords
";
-foreach($movie->getKeywords() as $keyword) {
+foreach ($movie->getKeywords() as $keyword) {
printf(" - %s [%s]
", $keyword->getName(), $keyword->getId());
}
echo "Releases
";
-foreach($movie->getReleases()->filterCountry('US') as $release) {
+foreach ($movie->getReleases()->filterCountry('US') as $release) {
printf(" - %s on %s
", $release->getIso31661(), $release->getReleaseDate()->format('d-m-Y'));
}
echo "Translations
";
-foreach($movie->getTranslations()->filterLanguage('en') as $translation) {
+foreach ($movie->getTranslations()->filterLanguage('en') as $translation) {
printf(" - %s
", $translation->getName());
}
echo "Trailers
";
-foreach($movie->getTrailers() as $trailer) {
+foreach ($movie->getTrailers() as $trailer) {
printf(" - %s
", $trailer->getUrl());
}
@@ -107,7 +107,7 @@ function($key, $value){
echo "Popular titles
";
-foreach($popular as $p) {
+foreach ($popular as $p) {
printf(" - %s
", $p->getTitle());
}
@@ -115,6 +115,6 @@ function($key, $value){
echo "Top rated
";
-foreach($topRated as $t) {
+foreach ($topRated as $t) {
printf(" - %s
", $t->getTitle());
-}
\ No newline at end of file
+}
diff --git a/examples/movies/model/alternative_titles.php b/examples/movies/model/alternative_titles.php
index f06f6740..cf130c04 100644
--- a/examples/movies/model/alternative_titles.php
+++ b/examples/movies/model/alternative_titles.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\MovieRepository($client);
$collection = $repository->getAlternativeTitles(87421);
-var_dump($collection);
\ No newline at end of file
+var_dump($collection);
diff --git a/examples/movies/model/changes.php b/examples/movies/model/changes.php
index c4e4e308..21ca4e71 100644
--- a/examples/movies/model/changes.php
+++ b/examples/movies/model/changes.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\MovieRepository($client);
$collection = $repository->getChanges(87421);
-var_dump($collection);
\ No newline at end of file
+var_dump($collection);
diff --git a/examples/movies/model/credits.php b/examples/movies/model/credits.php
index f9dbb099..835e3cd6 100644
--- a/examples/movies/model/credits.php
+++ b/examples/movies/model/credits.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\MovieRepository($client);
$collection = $repository->getCredits(87421);
-var_dump($collection);
\ No newline at end of file
+var_dump($collection);
diff --git a/examples/movies/model/get.php b/examples/movies/model/get.php
index 904b9ce0..b5f8fe57 100644
--- a/examples/movies/model/get.php
+++ b/examples/movies/model/get.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\MovieRepository($client);
$movie = $repository->load(87421);
-var_dump($movie);
\ No newline at end of file
+var_dump($movie);
diff --git a/examples/movies/model/images.php b/examples/movies/model/images.php
index 803a84ce..ce9fdcc0 100644
--- a/examples/movies/model/images.php
+++ b/examples/movies/model/images.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\MovieRepository($client);
$collection = $repository->getImages(87421);
-var_dump($collection);
\ No newline at end of file
+var_dump($collection);
diff --git a/examples/movies/model/keywords.php b/examples/movies/model/keywords.php
index 4fd83521..d8ae94b3 100644
--- a/examples/movies/model/keywords.php
+++ b/examples/movies/model/keywords.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\MovieRepository($client);
$collection = $repository->getKeywords(87421);
-var_dump($collection);
\ No newline at end of file
+var_dump($collection);
diff --git a/examples/movies/model/lists.php b/examples/movies/model/lists.php
index 3a806fce..a53feb58 100644
--- a/examples/movies/model/lists.php
+++ b/examples/movies/model/lists.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\MovieRepository($client);
$collection = $repository->getLists(87421);
-var_dump($collection);
\ No newline at end of file
+var_dump($collection);
diff --git a/examples/movies/model/rate.php b/examples/movies/model/rate.php
index e24ed605..d60c257e 100644
--- a/examples/movies/model/rate.php
+++ b/examples/movies/model/rate.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -22,4 +22,4 @@
$repository = new \Tmdb\Repository\MovieRepository($client);
$rate = $repository->rate(49047, 6.5);
-var_dump($rate);
\ No newline at end of file
+var_dump($rate);
diff --git a/examples/movies/model/releases.php b/examples/movies/model/releases.php
index b7127471..4b5f6c33 100644
--- a/examples/movies/model/releases.php
+++ b/examples/movies/model/releases.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\MovieRepository($client);
$collection = $repository->getReleases(87421);
-var_dump($collection);
\ No newline at end of file
+var_dump($collection);
diff --git a/examples/movies/model/reviews.php b/examples/movies/model/reviews.php
index c132a120..0331307e 100644
--- a/examples/movies/model/reviews.php
+++ b/examples/movies/model/reviews.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\MovieRepository($client);
$collection = $repository->getReviews(87421);
-var_dump($collection);
\ No newline at end of file
+var_dump($collection);
diff --git a/examples/movies/model/similar_movies.php b/examples/movies/model/similar_movies.php
index 378fa3ba..723d4882 100644
--- a/examples/movies/model/similar_movies.php
+++ b/examples/movies/model/similar_movies.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\MovieRepository($client);
$collection = $repository->getSimilarMovies(87421);
-var_dump($collection);
\ No newline at end of file
+var_dump($collection);
diff --git a/examples/movies/model/trailers.php b/examples/movies/model/trailers.php
index 51364014..a1cc3f84 100644
--- a/examples/movies/model/trailers.php
+++ b/examples/movies/model/trailers.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\MovieRepository($client);
$collection = $repository->getTrailers(87421);
-var_dump($collection);
\ No newline at end of file
+var_dump($collection);
diff --git a/examples/networks/model/get.php b/examples/networks/model/get.php
index c15f2701..bd8a8466 100644
--- a/examples/networks/model/get.php
+++ b/examples/networks/model/get.php
@@ -10,14 +10,13 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
-
$repository = new \Tmdb\Repository\NetworkRepository($client);
$network = $repository->load(49);
-var_dump($network);
\ No newline at end of file
+var_dump($network);
diff --git a/examples/people/model/all.php b/examples/people/model/all.php
index 62700185..5d54e105 100644
--- a/examples/people/model/all.php
+++ b/examples/people/model/all.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\PeopleRepository($client);
$person = $repository->load(33);
-var_dump($person);
\ No newline at end of file
+var_dump($person);
diff --git a/examples/people/model/combined_credits.php b/examples/people/model/combined_credits.php
index 21f36725..4c2acb08 100644
--- a/examples/people/model/combined_credits.php
+++ b/examples/people/model/combined_credits.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\PeopleRepository($client);
$person = $repository->getCombinedCredits(33);
-var_dump($person);
\ No newline at end of file
+var_dump($person);
diff --git a/examples/people/model/external_ids.php b/examples/people/model/external_ids.php
index 76fa3fa3..c182f7cb 100644
--- a/examples/people/model/external_ids.php
+++ b/examples/people/model/external_ids.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\PeopleRepository($client);
$externalIds = $repository->getExternalIds(287);
-var_dump($externalIds);
\ No newline at end of file
+var_dump($externalIds);
diff --git a/examples/people/model/latest.php b/examples/people/model/latest.php
index 54015664..4f0474db 100644
--- a/examples/people/model/latest.php
+++ b/examples/people/model/latest.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\PeopleRepository($client);
$latest = $repository->getLatest();
-var_dump($latest);
\ No newline at end of file
+var_dump($latest);
diff --git a/examples/people/model/movie_credits.php b/examples/people/model/movie_credits.php
index cc5b1df2..cf0e4581 100644
--- a/examples/people/model/movie_credits.php
+++ b/examples/people/model/movie_credits.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\PeopleRepository($client);
$person = $repository->getMovieCredits(33);
-var_dump($person);
\ No newline at end of file
+var_dump($person);
diff --git a/examples/people/model/popular.php b/examples/people/model/popular.php
index 3d348597..bc84b48c 100644
--- a/examples/people/model/popular.php
+++ b/examples/people/model/popular.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\PeopleRepository($client);
$popular = $repository->getPopular();
-var_dump($popular);
\ No newline at end of file
+var_dump($popular);
diff --git a/examples/people/model/tv_credits.php b/examples/people/model/tv_credits.php
index ab75c741..d526dec3 100644
--- a/examples/people/model/tv_credits.php
+++ b/examples/people/model/tv_credits.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\PeopleRepository($client);
$person = $repository->getTvCredits(33);
-var_dump($person);
\ No newline at end of file
+var_dump($person);
diff --git a/examples/reviews/model/get.php b/examples/reviews/model/get.php
index e902e5a4..d2ecc925 100644
--- a/examples/reviews/model/get.php
+++ b/examples/reviews/model/get.php
@@ -10,14 +10,13 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
-
$repository = new \Tmdb\Repository\ReviewRepository($client);
$review = $repository->load('5013bc76760ee372cb00253e');
-var_dump($review);
\ No newline at end of file
+var_dump($review);
diff --git a/examples/search/model/collection.php b/examples/search/model/collection.php
index 49e8bfa6..68739cbd 100644
--- a/examples/search/model/collection.php
+++ b/examples/search/model/collection.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -23,4 +23,4 @@
$find = $repository->searchCollection('star wars', $query);
-var_dump($find);
\ No newline at end of file
+var_dump($find);
diff --git a/examples/search/model/company.php b/examples/search/model/company.php
index c7da9292..ed83814f 100644
--- a/examples/search/model/company.php
+++ b/examples/search/model/company.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -23,4 +23,4 @@
$find = $repository->searchCompany('warner bros', $query);
-var_dump($find);
\ No newline at end of file
+var_dump($find);
diff --git a/examples/search/model/keyword.php b/examples/search/model/keyword.php
index 2a64d187..f1020e33 100644
--- a/examples/search/model/keyword.php
+++ b/examples/search/model/keyword.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -23,4 +23,4 @@
$find = $repository->searchKeyword('scary', $query);
-var_dump($find);
\ No newline at end of file
+var_dump($find);
diff --git a/examples/search/model/list.php b/examples/search/model/list.php
index a8e01ec3..e2d8c621 100644
--- a/examples/search/model/list.php
+++ b/examples/search/model/list.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -23,4 +23,4 @@
$find = $repository->searchList('award', $query);
-var_dump($find);
\ No newline at end of file
+var_dump($find);
diff --git a/examples/search/model/movie.php b/examples/search/model/movie.php
index 8b9e259c..bee0b527 100644
--- a/examples/search/model/movie.php
+++ b/examples/search/model/movie.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -23,4 +23,4 @@
$find = $repository->searchMovie('batman', $query);
-var_dump($find);
\ No newline at end of file
+var_dump($find);
diff --git a/examples/search/model/person.php b/examples/search/model/person.php
index 41a00b84..2407a083 100644
--- a/examples/search/model/person.php
+++ b/examples/search/model/person.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -23,4 +23,4 @@
$find = $repository->searchPerson('bruce lee', $query);
-var_dump($find);
\ No newline at end of file
+var_dump($find);
diff --git a/examples/search/model/tv.php b/examples/search/model/tv.php
index ba1d81e6..a3fc32d9 100644
--- a/examples/search/model/tv.php
+++ b/examples/search/model/tv.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -23,4 +23,4 @@
$find = $repository->searchTv('breaking bad', $query);
-var_dump($find);
\ No newline at end of file
+var_dump($find);
diff --git a/examples/tv/model/episode.php b/examples/tv/model/episode.php
index e58f7030..0cc52b3a 100644
--- a/examples/tv/model/episode.php
+++ b/examples/tv/model/episode.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\TvEpisodeRepository($client);
$episode = $repository->load(1396, 2, 1);
-var_dump($episode);
\ No newline at end of file
+var_dump($episode);
diff --git a/examples/tv/model/episode/credits.php b/examples/tv/model/episode/credits.php
index c5bfce65..3560e6b4 100644
--- a/examples/tv/model/episode/credits.php
+++ b/examples/tv/model/episode/credits.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../../vendor/autoload.php');
-require_once('../../../../apikey.php');
+require_once '../../../../vendor/autoload.php';
+require_once '../../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\TvEpisodeRepository($client);
$tvShow = $repository->getCredits(1396, 1, 1);
-var_dump($tvShow);
\ No newline at end of file
+var_dump($tvShow);
diff --git a/examples/tv/model/episode/external_ids.php b/examples/tv/model/episode/external_ids.php
index 617917b3..2c8ef730 100644
--- a/examples/tv/model/episode/external_ids.php
+++ b/examples/tv/model/episode/external_ids.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../../vendor/autoload.php');
-require_once('../../../../apikey.php');
+require_once '../../../../vendor/autoload.php';
+require_once '../../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\TvEpisodeRepository($client);
$tvShow = $repository->getExternalIds(1396, 1, 1);
-var_dump($tvShow);
\ No newline at end of file
+var_dump($tvShow);
diff --git a/examples/tv/model/episode/images.php b/examples/tv/model/episode/images.php
index 647a5513..37298d8d 100644
--- a/examples/tv/model/episode/images.php
+++ b/examples/tv/model/episode/images.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../../vendor/autoload.php');
-require_once('../../../../apikey.php');
+require_once '../../../../vendor/autoload.php';
+require_once '../../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\TvEpisodeRepository($client);
$tvShow = $repository->getImages(1396, 1, 1);
-var_dump($tvShow);
\ No newline at end of file
+var_dump($tvShow);
diff --git a/examples/tv/model/season.php b/examples/tv/model/season.php
index cc51e365..5fb3b6f6 100644
--- a/examples/tv/model/season.php
+++ b/examples/tv/model/season.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\TvSeasonRepository($client);
$season = $repository->load(1396, 2);
-var_dump($season);
\ No newline at end of file
+var_dump($season);
diff --git a/examples/tv/model/season/credits.php b/examples/tv/model/season/credits.php
index cc1b43ff..70edda5b 100644
--- a/examples/tv/model/season/credits.php
+++ b/examples/tv/model/season/credits.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../../vendor/autoload.php');
-require_once('../../../../apikey.php');
+require_once '../../../../vendor/autoload.php';
+require_once '../../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\TvSeasonRepository($client);
$tvShow = $repository->getCredits(1396, 1);
-var_dump($tvShow);
\ No newline at end of file
+var_dump($tvShow);
diff --git a/examples/tv/model/season/external_ids.php b/examples/tv/model/season/external_ids.php
index ac07c45f..19203b83 100644
--- a/examples/tv/model/season/external_ids.php
+++ b/examples/tv/model/season/external_ids.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../../vendor/autoload.php');
-require_once('../../../../apikey.php');
+require_once '../../../../vendor/autoload.php';
+require_once '../../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\TvSeasonRepository($client);
$tvShow = $repository->getExternalIds(1396, 1);
-var_dump($tvShow);
\ No newline at end of file
+var_dump($tvShow);
diff --git a/examples/tv/model/season/images.php b/examples/tv/model/season/images.php
index 84ecddbe..4e236004 100644
--- a/examples/tv/model/season/images.php
+++ b/examples/tv/model/season/images.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../../vendor/autoload.php');
-require_once('../../../../apikey.php');
+require_once '../../../../vendor/autoload.php';
+require_once '../../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\TvSeasonRepository($client);
$tvShow = $repository->getImages(1396, 1);
-var_dump($tvShow);
\ No newline at end of file
+var_dump($tvShow);
diff --git a/examples/tv/model/show.php b/examples/tv/model/show.php
index e5f51809..b2be9280 100644
--- a/examples/tv/model/show.php
+++ b/examples/tv/model/show.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../vendor/autoload.php');
-require_once('../../../apikey.php');
+require_once '../../../vendor/autoload.php';
+require_once '../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\TvRepository($client);
$tvShow = $repository->load(1396);
-var_dump($tvShow);
\ No newline at end of file
+var_dump($tvShow);
diff --git a/examples/tv/model/tv/credits.php b/examples/tv/model/tv/credits.php
index 497c6161..89614d98 100644
--- a/examples/tv/model/tv/credits.php
+++ b/examples/tv/model/tv/credits.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../../vendor/autoload.php');
-require_once('../../../../apikey.php');
+require_once '../../../../vendor/autoload.php';
+require_once '../../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\TvRepository($client);
$tvShow = $repository->getCredits(1396);
-var_dump($tvShow);
\ No newline at end of file
+var_dump($tvShow);
diff --git a/examples/tv/model/tv/external_ids.php b/examples/tv/model/tv/external_ids.php
index 8ee689ae..fb09fc4c 100644
--- a/examples/tv/model/tv/external_ids.php
+++ b/examples/tv/model/tv/external_ids.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../../vendor/autoload.php');
-require_once('../../../../apikey.php');
+require_once '../../../../vendor/autoload.php';
+require_once '../../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\TvRepository($client);
$tvShow = $repository->getExternalIds(1396);
-var_dump($tvShow);
\ No newline at end of file
+var_dump($tvShow);
diff --git a/examples/tv/model/tv/images.php b/examples/tv/model/tv/images.php
index fea43b3a..bf04b60b 100644
--- a/examples/tv/model/tv/images.php
+++ b/examples/tv/model/tv/images.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../../vendor/autoload.php');
-require_once('../../../../apikey.php');
+require_once '../../../../vendor/autoload.php';
+require_once '../../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\TvRepository($client);
$tvShow = $repository->getImages(1396);
-var_dump($tvShow);
\ No newline at end of file
+var_dump($tvShow);
diff --git a/examples/tv/model/tv/on_the_air.php b/examples/tv/model/tv/on_the_air.php
index fb8bd45d..6feac069 100644
--- a/examples/tv/model/tv/on_the_air.php
+++ b/examples/tv/model/tv/on_the_air.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../../vendor/autoload.php');
-require_once('../../../../apikey.php');
+require_once '../../../../vendor/autoload.php';
+require_once '../../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\TvRepository($client);
$tvShow = $repository->getOnTheAir();
-var_dump($tvShow);
\ No newline at end of file
+var_dump($tvShow);
diff --git a/examples/tv/model/tv/translations.php b/examples/tv/model/tv/translations.php
index c69304ac..a94dbad4 100644
--- a/examples/tv/model/tv/translations.php
+++ b/examples/tv/model/tv/translations.php
@@ -10,8 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-require_once('../../../../vendor/autoload.php');
-require_once('../../../../apikey.php');
+require_once '../../../../vendor/autoload.php';
+require_once '../../../../apikey.php';
$token = new \Tmdb\ApiToken(TMDB_API_KEY);
$client = new \Tmdb\Client($token);
@@ -19,4 +19,4 @@
$repository = new \Tmdb\Repository\TvRepository($client);
$tvShow = $repository->getTranslations(1396);
-var_dump($tvShow);
\ No newline at end of file
+var_dump($tvShow);
diff --git a/lib/Tmdb/Api/AbstractApi.php b/lib/Tmdb/Api/AbstractApi.php
index 3e4f2437..ff608e92 100644
--- a/lib/Tmdb/Api/AbstractApi.php
+++ b/lib/Tmdb/Api/AbstractApi.php
@@ -42,9 +42,9 @@ public function __construct(Client $client)
/**
* Send a GET request
*
- * @param string $path
- * @param array $parameters
- * @param array $headers
+ * @param string $path
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function get($path, array $parameters = array(), $headers = array())
@@ -53,6 +53,7 @@ public function get($path, array $parameters = array(), $headers = array())
* @var Response $response
*/
$response = $this->client->getHttpClient()->get($path, $parameters, $headers);
+
return $response->json();
}
@@ -60,8 +61,8 @@ public function get($path, array $parameters = array(), $headers = array())
* Send a HEAD request
*
* @param $path
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function head($path, array $parameters = array(), $headers = array())
@@ -70,6 +71,7 @@ public function head($path, array $parameters = array(), $headers = array())
* @var Response $response
*/
$response = $this->client->getHttpClient()->head($path, $parameters, $headers);
+
return $response->json();
}
@@ -77,9 +79,9 @@ public function head($path, array $parameters = array(), $headers = array())
* Send a POST request
*
* @param $path
- * @param null $postBody
- * @param array $parameters
- * @param array $headers
+ * @param null $postBody
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function post($path, $postBody = null, array $parameters = array(), $headers = array())
@@ -88,6 +90,7 @@ public function post($path, $postBody = null, array $parameters = array(), $head
* @var Response $response
*/
$response = $this->client->getHttpClient()->post($path, $postBody, $parameters, $headers);
+
return $response->json();
}
@@ -95,9 +98,9 @@ public function post($path, $postBody = null, array $parameters = array(), $head
* Send a POST request but json_encode the post body in the request
*
* @param $path
- * @param null $postBody
- * @param array $parameters
- * @param array $headers
+ * @param null $postBody
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function postJson($path, $postBody = null, array $parameters = array(), $headers = array())
@@ -110,6 +113,7 @@ public function postJson($path, $postBody = null, array $parameters = array(), $
}
$response = $this->client->getHttpClient()->postJson($path, $postBody, $parameters, $headers);
+
return $response->json();
}
@@ -117,9 +121,9 @@ public function postJson($path, $postBody = null, array $parameters = array(), $
* Send a PUT request
*
* @param $path
- * @param null $body
- * @param array $parameters
- * @param array $headers
+ * @param null $body
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function put($path, $body = null, array $parameters = array(), $headers = array())
@@ -128,6 +132,7 @@ public function put($path, $body = null, array $parameters = array(), $headers =
* @var Response $response
*/
$response = $this->client->getHttpClient()->put($path, $body, $parameters, $headers);
+
return $response->json();
}
@@ -135,9 +140,9 @@ public function put($path, $body = null, array $parameters = array(), $headers =
* Send a DELETE request
*
* @param $path
- * @param null $body
- * @param array $parameters
- * @param array $headers
+ * @param null $body
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function delete($path, $body = null, array $parameters = array(), $headers = array())
@@ -146,6 +151,7 @@ public function delete($path, $body = null, array $parameters = array(), $header
* @var Response $response
*/
$response = $this->client->getHttpClient()->delete($path, $body, $parameters, $headers);
+
return $response->json();
}
@@ -153,9 +159,9 @@ public function delete($path, $body = null, array $parameters = array(), $header
* Send a PATCH request
*
* @param $path
- * @param null $body
- * @param array $parameters
- * @param array $headers
+ * @param null $body
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function patch($path, $body = null, array $parameters = array(), $headers = array())
@@ -164,6 +170,7 @@ public function patch($path, $body = null, array $parameters = array(), $headers
* @var Response $response
*/
$response = $this->client->getHttpClient()->patch($path, $body, $parameters, $headers);
+
return $response->json();
}
}
diff --git a/lib/Tmdb/Api/Account.php b/lib/Tmdb/Api/Account.php
index 2bf4f5f5..674dbff2 100644
--- a/lib/Tmdb/Api/Account.php
+++ b/lib/Tmdb/Api/Account.php
@@ -23,8 +23,8 @@ class Account
/**
* Get the basic information for an account. You will need to have a valid session id.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getAccount(array $parameters = array(), array $headers = array())
@@ -35,9 +35,9 @@ public function getAccount(array $parameters = array(), array $headers = array()
/**
* Get the lists that you have created and marked as a favorite.
*
- * @param integer $accountId
- * @param array $parameters
- * @param array $headers
+ * @param integer $accountId
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getLists($accountId, array $parameters = array(), array $headers = array())
@@ -48,9 +48,9 @@ public function getLists($accountId, array $parameters = array(), array $headers
/**
* Get the list of favorite movies for an account.
*
- * @param integer $accountId
- * @param array $parameters
- * @param array $headers
+ * @param integer $accountId
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getFavoriteMovies($accountId, array $parameters = array(), array $headers = array())
@@ -61,9 +61,9 @@ public function getFavoriteMovies($accountId, array $parameters = array(), array
/**
* Add or remove a movie to an accounts favorite list.
*
- * @param integer $accountId
- * @param integer $movieId
- * @param boolean $isFavorite
+ * @param integer $accountId
+ * @param integer $movieId
+ * @param boolean $isFavorite
* @return mixed
*/
public function favorite($accountId, $movieId, $isFavorite = true)
@@ -77,9 +77,9 @@ public function favorite($accountId, $movieId, $isFavorite = true)
/**
* Get the list of rated movies (and associated rating) for an account.
*
- * @param integer $accountId
- * @param array $parameters
- * @param array $headers
+ * @param integer $accountId
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getRatedMovies($accountId, array $parameters = array(), array $headers = array())
@@ -90,9 +90,9 @@ public function getRatedMovies($accountId, array $parameters = array(), array $h
/**
* Get the list of movies on an accounts watchlist.
*
- * @param integer $accountId
- * @param array $parameters
- * @param array $headers
+ * @param integer $accountId
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getMovieWatchlist($accountId, array $parameters = array(), array $headers = array())
@@ -103,9 +103,9 @@ public function getMovieWatchlist($accountId, array $parameters = array(), array
/**
* Add or remove a movie to an accounts watch list.
*
- * @param integer $accountId
- * @param integer $movieId
- * @param boolean $isOnWatchlist
+ * @param integer $accountId
+ * @param integer $movieId
+ * @param boolean $isOnWatchlist
* @return mixed
*/
public function watchlist($accountId, $movieId, $isOnWatchlist = true)
diff --git a/lib/Tmdb/Api/ApiInterface.php b/lib/Tmdb/Api/ApiInterface.php
index 5719777c..351c7606 100644
--- a/lib/Tmdb/Api/ApiInterface.php
+++ b/lib/Tmdb/Api/ApiInterface.php
@@ -4,7 +4,7 @@
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
- *
+ *
* @package Tmdb
* @author Michael Roterman
* @copyright (c) 2013, Michael Roterman
@@ -16,5 +16,6 @@
* Interface ApiInterface
* @package Tmdb\Api
*/
-interface ApiInterface {
+interface ApiInterface
+{
}
diff --git a/lib/Tmdb/Api/Authentication.php b/lib/Tmdb/Api/Authentication.php
index f7c32607..aeeeffdb 100644
--- a/lib/Tmdb/Api/Authentication.php
+++ b/lib/Tmdb/Api/Authentication.php
@@ -12,7 +12,6 @@
*/
namespace Tmdb\Api;
-use Symfony\Component\Yaml\Exception\RuntimeException;
use Tmdb\Exception\UnauthorizedRequestTokenException;
/**
@@ -57,7 +56,7 @@ public function authenticateRequestToken($token)
* This method is used to generate a session id for user based authentication.
* A session id is required in order to use any of the write methods.
*
- * @param string $requestToken
+ * @param string $requestToken
* @throws UnauthorizedRequestTokenException
* @return mixed
*/
@@ -65,8 +64,7 @@ public function getNewSession($requestToken)
{
try {
return $this->get('authentication/session/new', array('request_token' => $requestToken));
- }
- catch(\Exception $e) {
+ } catch (\Exception $e) {
if ($e->getCode() == 401) {
throw new UnauthorizedRequestTokenException("The request token has not been validated yet.");
}
diff --git a/lib/Tmdb/Api/Certifications.php b/lib/Tmdb/Api/Certifications.php
index 30bff9be..08785722 100644
--- a/lib/Tmdb/Api/Certifications.php
+++ b/lib/Tmdb/Api/Certifications.php
@@ -25,8 +25,8 @@ class Certifications
*
* These can be used in conjunction with the certification_country and certification.lte parameters when using discover.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getMovieList(array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/Changes.php b/lib/Tmdb/Api/Changes.php
index 0ae9093a..1f356023 100644
--- a/lib/Tmdb/Api/Changes.php
+++ b/lib/Tmdb/Api/Changes.php
@@ -31,8 +31,8 @@ class Changes
* Please note that the change log system to support this was changed
* on October 5, 2012 and will only show movies that have been edited since.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getMovieChanges(array $parameters = array(), array $headers = array())
@@ -51,8 +51,8 @@ public function getMovieChanges(array $parameters = array(), array $headers = ar
* Please note that the change log system to support this was changed
* on October 5, 2012 and will only show movies that have been edited since.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getPersonChanges(array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/Collections.php b/lib/Tmdb/Api/Collections.php
index e297484d..d8b64a52 100644
--- a/lib/Tmdb/Api/Collections.php
+++ b/lib/Tmdb/Api/Collections.php
@@ -30,8 +30,8 @@ class Collections
* If you would like to sort them yourself you can use the provided release_date.
*
* @param $collection_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getCollection($collection_id, array $parameters = array(), array $headers = array())
@@ -43,8 +43,8 @@ public function getCollection($collection_id, array $parameters = array(), array
* Get all of the images for a particular collection by collection id.
*
* @param $collection_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getImages($collection_id, array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/Companies.php b/lib/Tmdb/Api/Companies.php
index 2f8d1696..5671dc35 100644
--- a/lib/Tmdb/Api/Companies.php
+++ b/lib/Tmdb/Api/Companies.php
@@ -24,8 +24,8 @@ class Companies
* This method is used to retrieve all of the basic information about a company.
*
* @param $company_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getCompany($company_id, array $parameters = array(), array $headers = array())
@@ -36,9 +36,9 @@ public function getCompany($company_id, array $parameters = array(), array $head
/**
* Get the list of movies associated with a particular company.
*
- * @param integer $company_id
- * @param array $parameters
- * @param array $headers
+ * @param integer $company_id
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getMovies($company_id, array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/Configuration.php b/lib/Tmdb/Api/Configuration.php
index f73986c0..7de82e56 100644
--- a/lib/Tmdb/Api/Configuration.php
+++ b/lib/Tmdb/Api/Configuration.php
@@ -38,7 +38,7 @@ class Configuration
*
* http://d3gtl9l2a4fn1j.cloudfront.net/t/p/w500/8uO0gUM8aNqYLs1OsTBQiXu0fEv.jpg
*
- * @param array $headers
+ * @param array $headers
* @return mixed
*/
public function getConfiguration(array $headers = array())
diff --git a/lib/Tmdb/Api/Credits.php b/lib/Tmdb/Api/Credits.php
index d82372a1..e7e5d547 100644
--- a/lib/Tmdb/Api/Credits.php
+++ b/lib/Tmdb/Api/Credits.php
@@ -31,8 +31,8 @@ class Credits
* and are assumed to be "season regulars".
*
* @param $credit_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getCredit($credit_id, array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/Discover.php b/lib/Tmdb/Api/Discover.php
index 69d236cc..2a437629 100644
--- a/lib/Tmdb/Api/Discover.php
+++ b/lib/Tmdb/Api/Discover.php
@@ -23,8 +23,8 @@ class Discover
/**
* Discover movies by different types of data like average rating, number of votes, genres and certifications.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function discoverMovies(array $parameters = array(), array $headers = array())
@@ -35,8 +35,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.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function discoverTv(array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/Find.php b/lib/Tmdb/Api/Find.php
index 8f783fa1..a3e468aa 100644
--- a/lib/Tmdb/Api/Find.php
+++ b/lib/Tmdb/Api/Find.php
@@ -29,9 +29,9 @@ class Find
* People: imdb_id, freebase_mid, freebase_id, tvrage_id
* TV Series: imdb_id, freebase_mid, freebase_id, tvdb_id, tvrage_id
*
- * @param string $id
- * @param array $parameters
- * @param array $headers
+ * @param string $id
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function find($id, array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/Genres.php b/lib/Tmdb/Api/Genres.php
index 789c96e6..2bf93c38 100644
--- a/lib/Tmdb/Api/Genres.php
+++ b/lib/Tmdb/Api/Genres.php
@@ -23,9 +23,9 @@ class Genres
/**
* Get the list of genres, and return one by id
*
- * @param integer $id
- * @param array $parameters
- * @param array $headers
+ * @param integer $id
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getGenre($id, array $parameters = array(), array $headers = array())
@@ -42,8 +42,8 @@ public function getGenre($id, array $parameters = array(), array $headers = arra
/**
* Get the list of genres.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getGenres(array $parameters = array(), array $headers = array())
@@ -55,8 +55,8 @@ public function getGenres(array $parameters = array(), array $headers = array())
* Get the list of movies for a particular genre by id. By default, only movies with 10 or more votes are included.
*
* @param $genre_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getMovies($genre_id, array $parameters = array(), array $headers = array())
@@ -65,13 +65,13 @@ public function getMovies($genre_id, array $parameters = array(), array $headers
}
/**
- * @param integer $id
- * @param array $data
+ * @param integer $id
+ * @param array $data
* @return mixed
*/
private function extractGenreByIdFromResponse($id, array $data = array())
{
- foreach($data as $genre) {
+ foreach ($data as $genre) {
if ($id == $genre['id'])
return $genre;
}
diff --git a/lib/Tmdb/Api/Jobs.php b/lib/Tmdb/Api/Jobs.php
index 5afed498..242df650 100644
--- a/lib/Tmdb/Api/Jobs.php
+++ b/lib/Tmdb/Api/Jobs.php
@@ -23,8 +23,8 @@ class Jobs
/**
* Get a list of valid jobs.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getJobs(array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/Keywords.php b/lib/Tmdb/Api/Keywords.php
index 80ed4f80..6c2be730 100644
--- a/lib/Tmdb/Api/Keywords.php
+++ b/lib/Tmdb/Api/Keywords.php
@@ -23,9 +23,9 @@ class Keywords
/**
* Get the basic information for a specific keyword id.
*
- * @param int $keyword_id
- * @param array $parameters
- * @param array $headers
+ * @param int $keyword_id
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getKeyword($keyword_id, array $parameters = array(), array $headers = array())
@@ -36,9 +36,9 @@ public function getKeyword($keyword_id, array $parameters = array(), array $head
/**
* Get the list of movies for a particular keyword by id.
*
- * @param int $keyword_id
- * @param array $parameters
- * @param array $headers
+ * @param int $keyword_id
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getMovies($keyword_id, array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/Lists.php b/lib/Tmdb/Api/Lists.php
index 1aa3b3f5..7c79b682 100644
--- a/lib/Tmdb/Api/Lists.php
+++ b/lib/Tmdb/Api/Lists.php
@@ -24,8 +24,8 @@ class Lists
* Get a list by id.
*
* @param $list_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getList($list_id, array $parameters = array(), array $headers = array())
@@ -36,10 +36,10 @@ public function getList($list_id, array $parameters = array(), array $headers =
/**
* This method lets users create a new list. A valid session id is required.
*
- * @param string $name
- * @param string $description
- * @param array $parameters
- * @param array $headers
+ * @param string $name
+ * @param string $description
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function createList($name, $description, array $parameters = array(), array $headers = array())
@@ -50,10 +50,10 @@ public function createList($name, $description, array $parameters = array(), arr
/**
* Check to see if a movie ID is already added to a list.
*
- * @param string $id
- * @param int $movieId
- * @param array $parameters
- * @param array $headers
+ * @param string $id
+ * @param int $movieId
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getItemStatus($id, $movieId, array $parameters = array(), array $headers = array())
@@ -68,8 +68,8 @@ public function getItemStatus($id, $movieId, array $parameters = array(), array
/**
* This method lets users add new movies to a list that they created. A valid session id is required.
*
- * @param string $id
- * @param string $mediaId
+ * @param string $id
+ * @param string $mediaId
* @return mixed
*/
public function addMediaToList($id, $mediaId)
@@ -80,8 +80,8 @@ public function addMediaToList($id, $mediaId)
/**
* This method lets users delete movies from a list that they created. A valid session id is required.
*
- * @param string $id
- * @param string $mediaId
+ * @param string $id
+ * @param string $mediaId
* @return mixed
*/
public function removeMediaFromList($id, $mediaId)
@@ -92,7 +92,7 @@ public function removeMediaFromList($id, $mediaId)
/**
* This method lets users delete a list that they created. A valid session id is required.
*
- * @param string $id
+ * @param string $id
* @return mixed
*/
public function deleteList($id)
diff --git a/lib/Tmdb/Api/Movies.php b/lib/Tmdb/Api/Movies.php
index 960da006..cdb8aede 100644
--- a/lib/Tmdb/Api/Movies.php
+++ b/lib/Tmdb/Api/Movies.php
@@ -24,8 +24,8 @@ class Movies
* Get the basic movie information for a specific movie id.
*
* @param $movie_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getMovie($movie_id, array $parameters = array(), array $headers = array())
@@ -37,8 +37,8 @@ public function getMovie($movie_id, array $parameters = array(), array $headers
* Get the alternative titles for a specific movie id.
*
* @param $movie_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getAlternativeTitles($movie_id, array $parameters = array(), array $headers = array())
@@ -50,8 +50,8 @@ public function getAlternativeTitles($movie_id, array $parameters = array(), arr
* Get the cast and crew information for a specific movie id.
*
* @param $movie_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getCredits($movie_id, array $parameters = array(), array $headers = array())
@@ -63,8 +63,8 @@ public function getCredits($movie_id, array $parameters = array(), array $header
* Get the images (posters and backdrops) for a specific movie id.
*
* @param $movie_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getImages($movie_id, array $parameters = array(), array $headers = array())
@@ -76,8 +76,8 @@ public function getImages($movie_id, array $parameters = array(), array $headers
* Get the plot keywords for a specific movie id.
*
* @param $movie_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getKeywords($movie_id, array $parameters = array(), array $headers = array())
@@ -89,8 +89,8 @@ public function getKeywords($movie_id, array $parameters = array(), array $heade
* Get the release date by country for a specific movie id.
*
* @param $movie_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getReleases($movie_id, array $parameters = array(), array $headers = array())
@@ -102,8 +102,8 @@ public function getReleases($movie_id, array $parameters = array(), array $heade
* Get the trailers for a specific movie id.
*
* @param $movie_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getTrailers($movie_id, array $parameters = array(), array $headers = array())
@@ -115,8 +115,8 @@ public function getTrailers($movie_id, array $parameters = array(), array $heade
* Get the translations for a specific movie id.
*
* @param $movie_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getTranslations($movie_id, array $parameters = array(), array $headers = array())
@@ -128,8 +128,8 @@ public function getTranslations($movie_id, array $parameters = array(), array $h
* Get the similar movies for a specific movie id.
*
* @param $movie_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getSimilarMovies($movie_id, array $parameters = array(), array $headers = array())
@@ -141,8 +141,8 @@ public function getSimilarMovies($movie_id, array $parameters = array(), array $
* Get the reviews for a particular movie id.
*
* @param $movie_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getReviews($movie_id, array $parameters = array(), array $headers = array())
@@ -154,8 +154,8 @@ public function getReviews($movie_id, array $parameters = array(), array $header
* Get the lists that the movie belongs to.
*
* @param $movie_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getLists($movie_id, array $parameters = array(), array $headers = array())
@@ -167,8 +167,8 @@ public function getLists($movie_id, array $parameters = array(), array $headers
* Get the changes for a specific movie id.
*
* @param $movie_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getChanges($movie_id, array $parameters = array(), array $headers = array())
@@ -179,8 +179,8 @@ public function getChanges($movie_id, array $parameters = array(), array $header
/**
* Get the latest movie id.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getLatest(array $parameters = array(), array $headers = array())
@@ -191,8 +191,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.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getUpcoming(array $parameters = array(), array $headers = array())
@@ -203,8 +203,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.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getNowPlaying(array $parameters = array(), array $headers = array())
@@ -215,8 +215,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.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getPopular(array $parameters = array(), array $headers = array())
@@ -227,8 +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.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getTopRated(array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/Networks.php b/lib/Tmdb/Api/Networks.php
index 347aade3..3bb6b981 100644
--- a/lib/Tmdb/Api/Networks.php
+++ b/lib/Tmdb/Api/Networks.php
@@ -26,9 +26,9 @@ class Networks
* You can use this ID to search for TV shows with the discover.
* At this time we don't have much but this will be fleshed out over time.
*
- * @param int $network_id
- * @param array $parameters
- * @param array $headers
+ * @param int $network_id
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getNetwork($network_id, array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/People.php b/lib/Tmdb/Api/People.php
index 466e2220..1be1e463 100644
--- a/lib/Tmdb/Api/People.php
+++ b/lib/Tmdb/Api/People.php
@@ -24,8 +24,8 @@ class People
* Get the general person information for a specific id.
*
* @param $person_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getPerson($person_id, array $parameters = array(), array $headers = array())
@@ -37,8 +37,8 @@ public function getPerson($person_id, array $parameters = array(), array $header
* Get the credits for a specific person id.
*
* @param $person_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getCredits($person_id, array $parameters = array(), array $headers = array())
@@ -50,8 +50,8 @@ public function getCredits($person_id, array $parameters = array(), array $heade
* Get the movie credits for a specific person id.
*
* @param $person_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getMovieCredits($person_id, array $parameters = array(), array $headers = array())
@@ -66,8 +66,8 @@ public function getMovieCredits($person_id, array $parameters = array(), array $
* This will provide details about which episode and/or season the credit is for.
*
* @param $person_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getTvCredits($person_id, array $parameters = array(), array $headers = array())
@@ -82,8 +82,8 @@ public function getTvCredits($person_id, array $parameters = array(), array $hea
* This will provide details about which episode and/or season the credit is for.
*
* @param $person_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getCombinedCredits($person_id, array $parameters = array(), array $headers = array())
@@ -95,8 +95,8 @@ public function getCombinedCredits($person_id, array $parameters = array(), arra
* Get the images for a specific person id.
*
* @param $person_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getImages($person_id, array $parameters = array(), array $headers = array())
@@ -114,8 +114,8 @@ public function getImages($person_id, array $parameters = array(), array $header
* The language is present on fields that are translatable.
*
* @param $person_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getChanges($person_id, array $parameters = array(), array $headers = array())
@@ -127,8 +127,8 @@ public function getChanges($person_id, array $parameters = array(), array $heade
* Get the external ids for a specific person id.
*
* @param $person_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getExternalIds($person_id, array $parameters = array(), array $headers = array())
@@ -139,8 +139,8 @@ public function getExternalIds($person_id, array $parameters = array(), array $h
/**
* Get the list of popular people on The Movie Database. This list refreshes every day.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getPopular(array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/Reviews.php b/lib/Tmdb/Api/Reviews.php
index 11b0f1d6..e14a9df9 100644
--- a/lib/Tmdb/Api/Reviews.php
+++ b/lib/Tmdb/Api/Reviews.php
@@ -24,8 +24,8 @@ class Reviews
* Get the full details of a review by ID.
*
* @param $review_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getReview($review_id, array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/Search.php b/lib/Tmdb/Api/Search.php
index 539f3f1b..4e988127 100644
--- a/lib/Tmdb/Api/Search.php
+++ b/lib/Tmdb/Api/Search.php
@@ -24,8 +24,8 @@ class Search
* Search for movies by title.
*
* @param $query
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function searchMovies($query, array $parameters = array(), array $headers = array())
@@ -39,8 +39,8 @@ public function searchMovies($query, array $parameters = array(), array $headers
* Search for collections by name.
*
* @param $query
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function searchCollection($query, array $parameters = array(), array $headers = array())
@@ -54,8 +54,8 @@ public function searchCollection($query, array $parameters = array(), array $hea
* Search for TV shows by title.
*
* @param $query
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function searchTv($query, array $parameters = array(), array $headers = array())
@@ -69,8 +69,8 @@ public function searchTv($query, array $parameters = array(), array $headers = a
* Search for people by name.
*
* @param $query
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function searchPersons($query, array $parameters = array(), array $headers = array())
@@ -84,8 +84,8 @@ public function searchPersons($query, array $parameters = array(), array $header
* Search for lists by name and description.
*
* @param $query
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function searchList($query, array $parameters = array(), array $headers = array())
@@ -99,8 +99,8 @@ public function searchList($query, array $parameters = array(), array $headers =
* Search for companies by name.
*
* @param $query
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function searchCompany($query, array $parameters = array(), array $headers = array())
@@ -114,8 +114,8 @@ public function searchCompany($query, array $parameters = array(), array $header
* Search for companies by name.
*
* @param $query
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function searchKeyword($query, array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/Tv.php b/lib/Tmdb/Api/Tv.php
index 40a4e27c..c8fcf9cc 100644
--- a/lib/Tmdb/Api/Tv.php
+++ b/lib/Tmdb/Api/Tv.php
@@ -23,9 +23,9 @@ class Tv
/**
* Get the primary information about a TV series by id.
*
- * @param integer $tvshow_id
- * @param array $parameters
- * @param array $headers
+ * @param integer $tvshow_id
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getTvshow($tvshow_id, array $parameters = array(), array $headers = array())
@@ -38,8 +38,8 @@ public function getTvshow($tvshow_id, array $parameters = array(), array $header
* Just like the website, we pull this information from the last season of the series.
*
* @param $tvshow_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getCredits($tvshow_id, array $parameters = array(), array $headers = array())
@@ -51,8 +51,8 @@ public function getCredits($tvshow_id, array $parameters = array(), array $heade
* Get the external ids that we have stored for a TV series.
*
* @param $tvshow_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getExternalIds($tvshow_id, array $parameters = array(), array $headers = array())
@@ -64,8 +64,8 @@ public function getExternalIds($tvshow_id, array $parameters = array(), array $h
* Get the images (posters and backdrops) for a TV series.
*
* @param $tvshow_id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getImages($tvshow_id, array $parameters = array(), array $headers = array())
@@ -76,8 +76,8 @@ public function getImages($tvshow_id, array $parameters = array(), array $header
/**
* Get the list of popular TV shows. This list refreshes every day.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getPopular(array $parameters = array(), array $headers = array())
@@ -91,8 +91,8 @@ public function getPopular(array $parameters = array(), array $headers = array()
* By default, this list will only include TV shows that have 2 or more votes.
* This list refreshes every day.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getTopRated(array $parameters = array(), array $headers = array())
@@ -105,9 +105,9 @@ public function getTopRated(array $parameters = array(), array $headers = array(
*
* These translations cascade down to the episode level.
*
- * @param int $tvshow_id
- * @param array $parameters
- * @param array $headers
+ * @param int $tvshow_id
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getTranslations($tvshow_id, array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/TvEpisode.php b/lib/Tmdb/Api/TvEpisode.php
index 3c09594d..811fc13b 100644
--- a/lib/Tmdb/Api/TvEpisode.php
+++ b/lib/Tmdb/Api/TvEpisode.php
@@ -26,8 +26,8 @@ class TvEpisode
* @param $tvshow_id
* @param $season_number
* @param $episode_number
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getEpisode($tvshow_id, $season_number, $episode_number, array $parameters = array(), array $headers = array())
@@ -41,8 +41,8 @@ public function getEpisode($tvshow_id, $season_number, $episode_number, array $p
* @param $tvshow_id
* @param $season_number
* @param $episode_number
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getCredits($tvshow_id, $season_number, $episode_number, array $parameters = array(), array $headers = array())
@@ -56,8 +56,8 @@ public function getCredits($tvshow_id, $season_number, $episode_number, array $p
* @param $tvshow_id
* @param $season_number
* @param $episode_number
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getExternalIds($tvshow_id, $season_number, $episode_number, array $parameters = array(), array $headers = array())
@@ -71,8 +71,8 @@ public function getExternalIds($tvshow_id, $season_number, $episode_number, arra
* @param $tvshow_id
* @param $season_number
* @param $episode_number
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getImages($tvshow_id, $season_number, $episode_number, array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/Api/TvSeason.php b/lib/Tmdb/Api/TvSeason.php
index cc0e8544..8d6201d3 100644
--- a/lib/Tmdb/Api/TvSeason.php
+++ b/lib/Tmdb/Api/TvSeason.php
@@ -25,8 +25,8 @@ class TvSeason
*
* @param $tvshow_id
* @param $season_number
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getSeason($tvshow_id, $season_number, array $parameters = array(), array $headers = array())
@@ -39,8 +39,8 @@ public function getSeason($tvshow_id, $season_number, array $parameters = array(
*
* @param $tvshow_id
* @param $season_number
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getCredits($tvshow_id, $season_number, array $parameters = array(), array $headers = array())
@@ -53,8 +53,8 @@ public function getCredits($tvshow_id, $season_number, array $parameters = array
*
* @param $tvshow_id
* @param $season_number
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getExternalIds($tvshow_id, $season_number, array $parameters = array(), array $headers = array())
@@ -67,8 +67,8 @@ public function getExternalIds($tvshow_id, $season_number, array $parameters = a
*
* @param $tvshow_id
* @param $season_number
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return mixed
*/
public function getImages($tvshow_id, $season_number, array $parameters = array(), array $headers = array())
diff --git a/lib/Tmdb/ApiToken.php b/lib/Tmdb/ApiToken.php
index 0f6bffa3..06e30938 100644
--- a/lib/Tmdb/ApiToken.php
+++ b/lib/Tmdb/ApiToken.php
@@ -16,7 +16,8 @@
* Class ApiToken
* @package Tmdb
*/
-class ApiToken {
+class ApiToken
+{
private $apiToken = null;
/**
@@ -30,12 +31,13 @@ public function __construct($api_token = null)
}
/**
- * @param null $apiToken
+ * @param null $apiToken
* @return $this
*/
public function setToken($apiToken)
{
$this->apiToken = $apiToken;
+
return $this;
}
diff --git a/lib/Tmdb/Client.php b/lib/Tmdb/Client.php
index 743ad5e6..0fa73452 100644
--- a/lib/Tmdb/Client.php
+++ b/lib/Tmdb/Client.php
@@ -25,7 +25,8 @@
* Client wrapper for TMDB
* @package Tmdb
*/
-class Client {
+class Client
+{
/**
* Base API URI
*/
@@ -73,8 +74,8 @@ class Client {
* Construct our client
*
* @param ClientInterface|null $httpClient
- * @param ApiToken $token
- * @param boolean $secure
+ * @param ApiToken $token
+ * @param boolean $secure
*/
public function __construct(Token $token, ClientInterface $httpClient = null, $secure = false)
{
@@ -97,12 +98,13 @@ public function __construct(Token $token, ClientInterface $httpClient = null, $s
/**
* Add the token subscriber
*
- * @param Token $token
+ * @param Token $token
* @return $this
*/
public function setToken(Token $token)
{
$this->token = $token;
+
return $this;
}
@@ -313,12 +315,13 @@ public function getBaseUrl()
}
/**
- * @param boolean $secure
+ * @param boolean $secure
* @return $this
*/
public function setSecure($secure)
{
$this->secure = $secure;
+
return $this;
}
@@ -331,7 +334,7 @@ public function getSecure()
}
/**
- * @param SessionToken $sessionToken
+ * @param SessionToken $sessionToken
* @return $this
*/
public function setSessionToken($sessionToken)
@@ -342,6 +345,7 @@ public function setSessionToken($sessionToken)
}
$this->sessionToken = $sessionToken;
+
return $this;
}
diff --git a/lib/Tmdb/Common/ObjectHydrator.php b/lib/Tmdb/Common/ObjectHydrator.php
index be4c66c6..b462970b 100644
--- a/lib/Tmdb/Common/ObjectHydrator.php
+++ b/lib/Tmdb/Common/ObjectHydrator.php
@@ -21,12 +21,13 @@
* Class ObjectHydrator
* @package Tmdb\Common
*/
-class ObjectHydrator {
+class ObjectHydrator
+{
/**
* Hydrate the object with data
*
- * @param AbstractModel $object
- * @param array $data
+ * @param AbstractModel $object
+ * @param array $data
* @return AbstractModel
* @throws RuntimeException
*/
@@ -47,7 +48,7 @@ public function hydrate(AbstractModel $object, $data = array())
$method,
get_class($object)
));
- }else{
+ } else {
$object->$method($v);
}
}
@@ -62,7 +63,7 @@ public function hydrate(AbstractModel $object, $data = array())
*
* @see https://gist.github.com/troelskn/751517
*
- * @param string $candidate
+ * @param string $candidate
* @return string
*/
public function camelize($candidate)
@@ -78,4 +79,4 @@ public function camelize($candidate)
)
);
}
-}
\ No newline at end of file
+}
diff --git a/lib/Tmdb/Exception/InvalidArgumentException.php b/lib/Tmdb/Exception/InvalidArgumentException.php
index 023ce8b7..a9ab221f 100644
--- a/lib/Tmdb/Exception/InvalidArgumentException.php
+++ b/lib/Tmdb/Exception/InvalidArgumentException.php
@@ -16,6 +16,6 @@
* Class InvalidArgumentException
* @package Tmdb\Exception
*/
-class InvalidArgumentException extends \InvalidArgumentException {
-
+class InvalidArgumentException extends \InvalidArgumentException
+{
}
diff --git a/lib/Tmdb/Exception/MissingArgumentException.php b/lib/Tmdb/Exception/MissingArgumentException.php
index edbedd87..f2941f92 100644
--- a/lib/Tmdb/Exception/MissingArgumentException.php
+++ b/lib/Tmdb/Exception/MissingArgumentException.php
@@ -16,6 +16,6 @@
* Class MissingArgumentException
* @package Tmdb\Exception
*/
-class MissingArgumentException extends \InvalidArgumentException {
-
+class MissingArgumentException extends \InvalidArgumentException
+{
}
diff --git a/lib/Tmdb/Exception/NotImplementedException.php b/lib/Tmdb/Exception/NotImplementedException.php
index 65659f48..5d26f11a 100644
--- a/lib/Tmdb/Exception/NotImplementedException.php
+++ b/lib/Tmdb/Exception/NotImplementedException.php
@@ -16,6 +16,6 @@
* Class NotImplementedException
* @package Tmdb\Exception
*/
-class NotImplementedException extends \Exception {
-
+class NotImplementedException extends \Exception
+{
}
diff --git a/lib/Tmdb/Exception/RuntimeException.php b/lib/Tmdb/Exception/RuntimeException.php
index a3f6c3e6..f7d8537e 100644
--- a/lib/Tmdb/Exception/RuntimeException.php
+++ b/lib/Tmdb/Exception/RuntimeException.php
@@ -16,6 +16,6 @@
* Class RuntimeException
* @package Tmdb\Exception
*/
-class RuntimeException extends \RuntimeException {
-
+class RuntimeException extends \RuntimeException
+{
}
diff --git a/lib/Tmdb/Exception/UnauthorizedRequestTokenException.php b/lib/Tmdb/Exception/UnauthorizedRequestTokenException.php
index d96a8b58..99e33442 100644
--- a/lib/Tmdb/Exception/UnauthorizedRequestTokenException.php
+++ b/lib/Tmdb/Exception/UnauthorizedRequestTokenException.php
@@ -16,6 +16,6 @@
* Class UnauthorizedRequestTokenException
* @package Tmdb\Exception
*/
-class UnauthorizedRequestTokenException extends \RuntimeException {
-
+class UnauthorizedRequestTokenException extends \RuntimeException
+{
}
diff --git a/lib/Tmdb/Factory/AbstractFactory.php b/lib/Tmdb/Factory/AbstractFactory.php
index f11e9902..19bd253a 100644
--- a/lib/Tmdb/Factory/AbstractFactory.php
+++ b/lib/Tmdb/Factory/AbstractFactory.php
@@ -21,11 +21,12 @@
* Class AbstractFactory
* @package Tmdb\Factory
*/
-abstract class AbstractFactory {
+abstract class AbstractFactory
+{
/**
* Convert an array to an hydrated object
*
- * @param array $data
+ * @param array $data
* @return AbstractModel
*/
abstract public function create(array $data = array());
@@ -33,7 +34,7 @@ abstract public function create(array $data = array());
/**
* Convert an array with an collection of items to an hydrated object collection
*
- * @param array $data
+ * @param array $data
* @return GenericCollection
*/
abstract public function createCollection(array $data = array());
@@ -41,7 +42,7 @@ 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
*
- * @param array $data
+ * @param array $data
* @param $class
* @return GenericCollection
*/
@@ -53,7 +54,7 @@ protected function createGenericCollection(array $data = array(), $class)
$collection = new GenericCollection();
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->hydrate(new $class(), $item));
}
@@ -63,8 +64,8 @@ protected function createGenericCollection(array $data = array(), $class)
/**
* Create a result collection
*
- * @param array $data
- * @param string $method
+ * @param array $data
+ * @param string $method
* @return ResultCollection
*/
public function createResultCollection(array $data = array(), $method = 'create')
@@ -87,7 +88,7 @@ public function createResultCollection(array $data = array(), $method = 'create'
$data = $data['results'];
}
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->$method($item));
}
@@ -97,8 +98,8 @@ public function createResultCollection(array $data = array(), $method = 'create'
/**
* Hydrate the object with data
*
- * @param AbstractModel $object
- * @param array $data
+ * @param AbstractModel $object
+ * @param array $data
* @return AbstractModel
*/
protected function hydrate(AbstractModel $object, $data = array())
diff --git a/lib/Tmdb/Factory/AccountFactory.php b/lib/Tmdb/Factory/AccountFactory.php
index 85c066ca..a3289bb9 100644
--- a/lib/Tmdb/Factory/AccountFactory.php
+++ b/lib/Tmdb/Factory/AccountFactory.php
@@ -61,17 +61,18 @@ public function createStatusResult(array $data = array())
/**
* Create movie
*
- * @param array $data
+ * @param array $data
* @return \Tmdb\Model\Movie
*/
- public function createMovie(array $data = array()) {
+ public function createMovie(array $data = array())
+ {
return $this->getMovieFactory()->create($data);
}
/**
* Create list item
*
- * @param array $data
+ * @param array $data
* @return \Tmdb\Model\AbstractModel
*/
public function createListItem(array $data = array())
@@ -94,12 +95,13 @@ public function createCollection(array $data = array())
}
/**
- * @param \Tmdb\Factory\MovieFactory $movieFactory
+ * @param \Tmdb\Factory\MovieFactory $movieFactory
* @return $this
*/
public function setMovieFactory($movieFactory)
{
$this->movieFactory = $movieFactory;
+
return $this;
}
@@ -112,12 +114,13 @@ public function getMovieFactory()
}
/**
- * @param \Tmdb\Factory\ImageFactory $imageFactory
+ * @param \Tmdb\Factory\ImageFactory $imageFactory
* @return $this
*/
public function setImageFactory($imageFactory)
{
$this->imageFactory = $imageFactory;
+
return $this;
}
diff --git a/lib/Tmdb/Factory/AuthenticationFactory.php b/lib/Tmdb/Factory/AuthenticationFactory.php
index 38b61d9e..3ec8ffd4 100644
--- a/lib/Tmdb/Factory/AuthenticationFactory.php
+++ b/lib/Tmdb/Factory/AuthenticationFactory.php
@@ -47,7 +47,7 @@ public function createCollection(array $data = array())
/**
* Create request token
*
- * @param array $data
+ * @param array $data
* @return RequestToken
*/
public function createRequestToken(array $data = array())
@@ -72,7 +72,7 @@ public function createRequestToken(array $data = array())
/**
* Create session token for user
*
- * @param array $data
+ * @param array $data
* @return SessionToken
*/
public function createSessionToken(array $data = array())
@@ -93,7 +93,7 @@ public function createSessionToken(array $data = array())
/**
* Create session token for guest
*
- * @param array $data
+ * @param array $data
* @return SessionToken
*/
public function createGuestSessionToken(array $data = array())
diff --git a/lib/Tmdb/Factory/CertificationFactory.php b/lib/Tmdb/Factory/CertificationFactory.php
index 6b92f418..db86dfe9 100644
--- a/lib/Tmdb/Factory/CertificationFactory.php
+++ b/lib/Tmdb/Factory/CertificationFactory.php
@@ -42,11 +42,11 @@ public function createCollection(array $data = array())
$collection = new GenericCollection();
- foreach($data as $country => $certifications) {
+ foreach ($data as $country => $certifications) {
$certification = new Certification();
$certification->setCountry($country);
- foreach($certifications as $countryCertification) {
+ foreach ($certifications as $countryCertification) {
$object = $this->create($countryCertification);
$certification->getCertifications()->add(null, $object);
diff --git a/lib/Tmdb/Factory/ChangesFactory.php b/lib/Tmdb/Factory/ChangesFactory.php
index ba21489a..aca66433 100644
--- a/lib/Tmdb/Factory/ChangesFactory.php
+++ b/lib/Tmdb/Factory/ChangesFactory.php
@@ -53,7 +53,7 @@ public function createCollection(array $data = array())
$data = $data['results'];
}
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item));
}
diff --git a/lib/Tmdb/Factory/CollectionFactory.php b/lib/Tmdb/Factory/CollectionFactory.php
index f1c29e2d..7184796b 100644
--- a/lib/Tmdb/Factory/CollectionFactory.php
+++ b/lib/Tmdb/Factory/CollectionFactory.php
@@ -76,7 +76,7 @@ public function createCollection(array $data = array())
{
$collection = new GenericCollection();
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item));
}
@@ -84,12 +84,13 @@ public function createCollection(array $data = array())
}
/**
- * @param \Tmdb\Factory\ImageFactory $imageFactory
+ * @param \Tmdb\Factory\ImageFactory $imageFactory
* @return $this
*/
public function setImageFactory($imageFactory)
{
$this->imageFactory = $imageFactory;
+
return $this;
}
@@ -102,12 +103,13 @@ public function getImageFactory()
}
/**
- * @param \Tmdb\Factory\MovieFactory $movieFactory
+ * @param \Tmdb\Factory\MovieFactory $movieFactory
* @return $this
*/
public function setMovieFactory($movieFactory)
{
$this->movieFactory = $movieFactory;
+
return $this;
}
diff --git a/lib/Tmdb/Factory/Common/ChangeFactory.php b/lib/Tmdb/Factory/Common/ChangeFactory.php
index 896ae1a7..37c6de9b 100644
--- a/lib/Tmdb/Factory/Common/ChangeFactory.php
+++ b/lib/Tmdb/Factory/Common/ChangeFactory.php
@@ -32,7 +32,7 @@ public function create(array $data = array())
if (array_key_exists('items', $data)) {
$items = new GenericCollection();
- foreach($data['items'] as $item) {
+ foreach ($data['items'] as $item) {
$item = $this->createChangeItem($item);
$items->add(null, $item);
@@ -47,7 +47,7 @@ public function create(array $data = array())
/**
* Create individual change items
*
- * @param array $data
+ * @param array $data
* @return \Tmdb\Model\AbstractModel
*/
private function createChangeItem(array $data = array())
@@ -66,7 +66,7 @@ public function createCollection(array $data = array())
$data = $data['changes'];
}
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item));
}
diff --git a/lib/Tmdb/Factory/Common/GenericCollectionFactory.php b/lib/Tmdb/Factory/Common/GenericCollectionFactory.php
index 90cf3ce2..722af78b 100644
--- a/lib/Tmdb/Factory/Common/GenericCollectionFactory.php
+++ b/lib/Tmdb/Factory/Common/GenericCollectionFactory.php
@@ -21,9 +21,10 @@
* Class GenericCollectionFactory
* @package Tmdb\Factory\Common
*/
-class GenericCollectionFactory {
+class GenericCollectionFactory
+{
/**
- * @param array $data
+ * @param array $data
* @param $class
* @return GenericCollection
*/
@@ -33,7 +34,7 @@ public function create(array $data = array(), $class)
}
/**
- * @param array $data
+ * @param array $data
* @param $class
* @return GenericCollection
*/
@@ -46,7 +47,7 @@ public function createCollection(array $data = array(), $class)
$collection = new GenericCollection();
$objectHydrator = new ObjectHydrator();
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $objectHydrator->hydrate(new $class(), $item));
}
diff --git a/lib/Tmdb/Factory/CompanyFactory.php b/lib/Tmdb/Factory/CompanyFactory.php
index 7fac2dda..6065fefc 100644
--- a/lib/Tmdb/Factory/CompanyFactory.php
+++ b/lib/Tmdb/Factory/CompanyFactory.php
@@ -56,12 +56,13 @@ public function createCollection(array $data = array())
}
/**
- * @param \Tmdb\Factory\ImageFactory $imageFactory
+ * @param \Tmdb\Factory\ImageFactory $imageFactory
* @return $this
*/
public function setImageFactory($imageFactory)
{
$this->imageFactory = $imageFactory;
+
return $this;
}
diff --git a/lib/Tmdb/Factory/CreditsFactory.php b/lib/Tmdb/Factory/CreditsFactory.php
index 5b33634d..4e4dbfe6 100644
--- a/lib/Tmdb/Factory/CreditsFactory.php
+++ b/lib/Tmdb/Factory/CreditsFactory.php
@@ -14,7 +14,6 @@
use Tmdb\Exception\NotImplementedException;
use Tmdb\Model\Genre;
-use Tmdb\Model\Movie;
use Tmdb\Model\Credits as Credits;
/**
@@ -89,12 +88,13 @@ public function createCollection(array $data = array())
}
/**
- * @param \Tmdb\Factory\TvEpisodeFactory $tvEpisodeFactory
+ * @param \Tmdb\Factory\TvEpisodeFactory $tvEpisodeFactory
* @return $this
*/
public function setTvEpisodeFactory($tvEpisodeFactory)
{
$this->tvEpisodeFactory = $tvEpisodeFactory;
+
return $this;
}
@@ -107,12 +107,13 @@ public function getTvEpisodeFactory()
}
/**
- * @param \Tmdb\Factory\TvSeasonFactory $tvSeasonFactory
+ * @param \Tmdb\Factory\TvSeasonFactory $tvSeasonFactory
* @return $this
*/
public function setTvSeasonFactory($tvSeasonFactory)
{
$this->tvSeasonFactory = $tvSeasonFactory;
+
return $this;
}
@@ -125,12 +126,13 @@ public function getTvSeasonFactory()
}
/**
- * @param \Tmdb\Factory\PeopleFactory $peopleFactory
+ * @param \Tmdb\Factory\PeopleFactory $peopleFactory
* @return $this
*/
public function setPeopleFactory($peopleFactory)
{
$this->peopleFactory = $peopleFactory;
+
return $this;
}
diff --git a/lib/Tmdb/Factory/FindFactory.php b/lib/Tmdb/Factory/FindFactory.php
index cba3716d..67fe9ee6 100644
--- a/lib/Tmdb/Factory/FindFactory.php
+++ b/lib/Tmdb/Factory/FindFactory.php
@@ -77,12 +77,13 @@ public function createCollection(array $data = array())
}
/**
- * @param \Tmdb\Factory\MovieFactory $movieFactory
+ * @param \Tmdb\Factory\MovieFactory $movieFactory
* @return $this
*/
public function setMovieFactory($movieFactory)
{
$this->movieFactory = $movieFactory;
+
return $this;
}
@@ -95,12 +96,13 @@ public function getMovieFactory()
}
/**
- * @param \Tmdb\Factory\PeopleFactory $peopleFactory
+ * @param \Tmdb\Factory\PeopleFactory $peopleFactory
* @return $this
*/
public function setPeopleFactory($peopleFactory)
{
$this->peopleFactory = $peopleFactory;
+
return $this;
}
@@ -113,12 +115,13 @@ public function getPeopleFactory()
}
/**
- * @param \Tmdb\Factory\TvFactory $tvFactory
+ * @param \Tmdb\Factory\TvFactory $tvFactory
* @return $this
*/
public function setTvFactory($tvFactory)
{
$this->tvFactory = $tvFactory;
+
return $this;
}
@@ -130,5 +133,4 @@ public function getTvFactory()
return $this->tvFactory;
}
-
}
diff --git a/lib/Tmdb/Factory/GenreFactory.php b/lib/Tmdb/Factory/GenreFactory.php
index f87116d3..548d3ebd 100644
--- a/lib/Tmdb/Factory/GenreFactory.php
+++ b/lib/Tmdb/Factory/GenreFactory.php
@@ -14,7 +14,6 @@
use Tmdb\Model\Collection\Genres;
use Tmdb\Model\Genre;
-use Tmdb\Model\Movie;
/**
* Class GenreFactory
@@ -43,7 +42,7 @@ public function createCollection(array $data = array())
$data = $data['genres'];
}
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->addGenre($this->create($item));
}
diff --git a/lib/Tmdb/Factory/ImageFactory.php b/lib/Tmdb/Factory/ImageFactory.php
index f1d0a2e3..cb0d3867 100644
--- a/lib/Tmdb/Factory/ImageFactory.php
+++ b/lib/Tmdb/Factory/ImageFactory.php
@@ -24,8 +24,8 @@ class ImageFactory extends AbstractFactory
/**
* Convert an array to an hydrated object
*
- * @param array $data
- * @param string|null $key
+ * @param array $data
+ * @param string|null $key
* @return Image
*/
public function create(array $data = array(), $key = null)
@@ -41,7 +41,7 @@ public function create(array $data = array(), $key = null)
* '/xkQ5yWnMjpC2bGmu7GsD66AAoKO.jpg', 'backdrop_path'
*
* @param $path
- * @param string $key
+ * @param string $key
* @return Image|Image\BackdropImage|Image\LogoImage|Image\PosterImage|Image\ProfileImage|Image\StillImage
*/
public function createFromPath($path, $key)
@@ -55,12 +55,12 @@ public function createFromPath($path, $key)
/**
* Helper function to obtain a new object for an image type
*
- * @param string|null $key
+ * @param string|null $key
* @return Image|Image\BackdropImage|Image\LogoImage|Image\PosterImage|Image\ProfileImage|Image\StillImage
*/
public function resolveImageType($key = null)
{
- switch($key) {
+ switch ($key) {
case 'poster':
case 'posters':
case 'poster_path':
@@ -103,14 +103,14 @@ public function resolveImageType($key = null)
/**
* Create generic collection
*
- * @param array $data
+ * @param array $data
* @return Images
*/
public function createCollection(array $data = array())
{
$collection = new Images();
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item));
}
@@ -120,20 +120,20 @@ public function createCollection(array $data = array())
/**
* Create full collection
*
- * @param array $data
+ * @param array $data
* @return Images
*/
public function createImageCollection(array $data = array())
{
$collection = new Images();
- foreach($data as $format => $formatCollection) {
+ foreach ($data as $format => $formatCollection) {
if (!is_array($formatCollection)) {
continue;
}
- foreach($formatCollection as $item) {
+ foreach ($formatCollection as $item) {
if (array_key_exists($format, Image::$_formats)) {
$item = $this->create($item, $format);
@@ -148,7 +148,7 @@ public function createImageCollection(array $data = array())
/**
* Create full movie collection
*
- * @param array $data
+ * @param array $data
* @return Images
*/
public function createCollectionFromMovie(array $data = array())
@@ -159,7 +159,7 @@ public function createCollectionFromMovie(array $data = array())
/**
* Create full tv show collection
*
- * @param array $data
+ * @param array $data
* @return Images
*/
public function createCollectionFromTv(array $data = array())
@@ -170,7 +170,7 @@ public function createCollectionFromTv(array $data = array())
/**
* Create full tv season collection
*
- * @param array $data
+ * @param array $data
* @return Images
*/
public function createCollectionFromTvSeason(array $data = array())
@@ -181,7 +181,7 @@ public function createCollectionFromTvSeason(array $data = array())
/**
* Create full tv episode collection
*
- * @param array $data
+ * @param array $data
* @return Images
*/
public function createCollectionFromTvEpisode(array $data = array())
@@ -192,7 +192,7 @@ public function createCollectionFromTvEpisode(array $data = array())
/**
* Create full people collection
*
- * @param array $data
+ * @param array $data
* @return Images
*/
public function createCollectionFromPeople(array $data = array())
diff --git a/lib/Tmdb/Factory/JobsFactory.php b/lib/Tmdb/Factory/JobsFactory.php
index 07725155..c644f2b3 100644
--- a/lib/Tmdb/Factory/JobsFactory.php
+++ b/lib/Tmdb/Factory/JobsFactory.php
@@ -40,7 +40,7 @@ public function createCollection(array $data = array())
$data = $data['jobs'];
}
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item));
}
diff --git a/lib/Tmdb/Factory/KeywordFactory.php b/lib/Tmdb/Factory/KeywordFactory.php
index 2fe2c650..e7d3a038 100644
--- a/lib/Tmdb/Factory/KeywordFactory.php
+++ b/lib/Tmdb/Factory/KeywordFactory.php
@@ -14,7 +14,6 @@
use Tmdb\Model\Collection\Keywords;
use Tmdb\Model\Keyword;
-use Tmdb\Model\Movie;
/**
* Class KeywordFactory
@@ -43,7 +42,7 @@ public function createCollection(array $data = array())
$data = $data['keywords'];
}
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->addKeyword($this->create($item));
}
diff --git a/lib/Tmdb/Factory/ListFactory.php b/lib/Tmdb/Factory/ListFactory.php
index 11e33b2d..363e047d 100644
--- a/lib/Tmdb/Factory/ListFactory.php
+++ b/lib/Tmdb/Factory/ListFactory.php
@@ -16,7 +16,6 @@
use Tmdb\Model\Common\GenericCollection;
use Tmdb\Model\Genre;
use Tmdb\Model\Lists;
-use Tmdb\Model\Movie;
/**
* Class ListFactory
@@ -100,7 +99,7 @@ public function createCollection(array $data = array())
{
$collection = new GenericCollection();
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item));
}
@@ -108,12 +107,13 @@ public function createCollection(array $data = array())
}
/**
- * @param \Tmdb\Factory\ImageFactory $imageFactory
+ * @param \Tmdb\Factory\ImageFactory $imageFactory
* @return $this
*/
public function setImageFactory($imageFactory)
{
$this->imageFactory = $imageFactory;
+
return $this;
}
@@ -126,12 +126,13 @@ public function getImageFactory()
}
/**
- * @param \Tmdb\Factory\Lists\ListItemFactory $listItemFactory
+ * @param \Tmdb\Factory\Lists\ListItemFactory $listItemFactory
* @return $this
*/
public function setListItemFactory($listItemFactory)
{
$this->listItemFactory = $listItemFactory;
+
return $this;
}
diff --git a/lib/Tmdb/Factory/Lists/ListItemFactory.php b/lib/Tmdb/Factory/Lists/ListItemFactory.php
index 208cc9db..52c9980f 100644
--- a/lib/Tmdb/Factory/Lists/ListItemFactory.php
+++ b/lib/Tmdb/Factory/Lists/ListItemFactory.php
@@ -65,7 +65,7 @@ public function createCollection(array $data = array())
$data = $data['items'];
}
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item));
}
@@ -73,12 +73,13 @@ public function createCollection(array $data = array())
}
/**
- * @param \Tmdb\Factory\ImageFactory $imageFactory
+ * @param \Tmdb\Factory\ImageFactory $imageFactory
* @return $this
*/
public function setImageFactory($imageFactory)
{
$this->imageFactory = $imageFactory;
+
return $this;
}
diff --git a/lib/Tmdb/Factory/Movie/AlternativeTitleFactory.php b/lib/Tmdb/Factory/Movie/AlternativeTitleFactory.php
index 7195f5b0..138e9722 100644
--- a/lib/Tmdb/Factory/Movie/AlternativeTitleFactory.php
+++ b/lib/Tmdb/Factory/Movie/AlternativeTitleFactory.php
@@ -39,7 +39,7 @@ public function createCollection(array $data = array())
{
$collection = new GenericCollection();
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item));
}
diff --git a/lib/Tmdb/Factory/Movie/ListItemFactory.php b/lib/Tmdb/Factory/Movie/ListItemFactory.php
index 3ca64eae..347a17b8 100644
--- a/lib/Tmdb/Factory/Movie/ListItemFactory.php
+++ b/lib/Tmdb/Factory/Movie/ListItemFactory.php
@@ -52,12 +52,13 @@ public function createCollection(array $data = array())
}
/**
- * @param \Tmdb\Factory\ImageFactory $imageFactory
+ * @param \Tmdb\Factory\ImageFactory $imageFactory
* @return $this
*/
public function setImageFactory($imageFactory)
{
$this->imageFactory = $imageFactory;
+
return $this;
}
diff --git a/lib/Tmdb/Factory/MovieFactory.php b/lib/Tmdb/Factory/MovieFactory.php
index dac55bc5..64e677d2 100644
--- a/lib/Tmdb/Factory/MovieFactory.php
+++ b/lib/Tmdb/Factory/MovieFactory.php
@@ -26,7 +26,8 @@
* Class MovieFactory
* @package Tmdb\Factory
*/
-class MovieFactory extends AbstractFactory {
+class MovieFactory extends AbstractFactory
+{
/**
* @var People\CastFactory
*/
@@ -83,7 +84,7 @@ public function __construct()
}
/**
- * @param array $data
+ * @param array $data
* @return Movie
*/
public function create(array $data = array())
@@ -178,7 +179,7 @@ public function createCollection(array $data = array())
$data = $data['results'];
}
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item));
}
@@ -188,27 +189,29 @@ public function createCollection(array $data = array())
/**
* Create result
*
- * @param array $data
+ * @param array $data
* @return \Tmdb\Model\AbstractModel
*/
- public function createResult(array $data = array()) {
+ public function createResult(array $data = array())
+ {
return $this->hydrate(new Result(), $data);
}
/**
* Create rating
*
- * @param array $data
+ * @param array $data
* @return \Tmdb\Model\AbstractModel
*/
- public function createRating(array $data = array()) {
+ public function createRating(array $data = array())
+ {
return $this->hydrate(new Movie\Rating(), $data);
}
/**
* Create the account states
*
- * @param array $data
+ * @param array $data
* @return \Tmdb\Model\AbstractModel
*/
public function createAccountStates(array $data = array())
@@ -225,12 +228,13 @@ public function createAccountStates(array $data = array())
}
/**
- * @param \Tmdb\Factory\People\CastFactory $castFactory
+ * @param \Tmdb\Factory\People\CastFactory $castFactory
* @return $this
*/
public function setCastFactory($castFactory)
{
$this->castFactory = $castFactory;
+
return $this;
}
@@ -243,12 +247,13 @@ public function getCastFactory()
}
/**
- * @param \Tmdb\Factory\People\CrewFactory $crewFactory
+ * @param \Tmdb\Factory\People\CrewFactory $crewFactory
* @return $this
*/
public function setCrewFactory($crewFactory)
{
$this->crewFactory = $crewFactory;
+
return $this;
}
@@ -261,12 +266,13 @@ public function getCrewFactory()
}
/**
- * @param \Tmdb\Factory\GenreFactory $genreFactory
+ * @param \Tmdb\Factory\GenreFactory $genreFactory
* @return $this
*/
public function setGenreFactory($genreFactory)
{
$this->genreFactory = $genreFactory;
+
return $this;
}
@@ -279,12 +285,13 @@ public function getGenreFactory()
}
/**
- * @param \Tmdb\Factory\ImageFactory $imageFactory
+ * @param \Tmdb\Factory\ImageFactory $imageFactory
* @return $this
*/
public function setImageFactory($imageFactory)
{
$this->imageFactory = $imageFactory;
+
return $this;
}
@@ -297,12 +304,13 @@ public function getImageFactory()
}
/**
- * @param \Tmdb\Factory\Common\ChangeFactory $changeFactory
+ * @param \Tmdb\Factory\Common\ChangeFactory $changeFactory
* @return $this
*/
public function setChangeFactory($changeFactory)
{
$this->changeFactory = $changeFactory;
+
return $this;
}
@@ -315,12 +323,13 @@ public function getChangeFactory()
}
/**
- * @param \Tmdb\Factory\ReviewFactory $reviewFactory
+ * @param \Tmdb\Factory\ReviewFactory $reviewFactory
* @return $this
*/
public function setReviewFactory($reviewFactory)
{
$this->reviewFactory = $reviewFactory;
+
return $this;
}
@@ -333,12 +342,13 @@ public function getReviewFactory()
}
/**
- * @param \Tmdb\Factory\Movie\ListItemFactory $listItemFactory
+ * @param \Tmdb\Factory\Movie\ListItemFactory $listItemFactory
* @return $this
*/
public function setListItemFactory($listItemFactory)
{
$this->listItemFactory = $listItemFactory;
+
return $this;
}
@@ -351,12 +361,13 @@ public function getListItemFactory()
}
/**
- * @param \Tmdb\Factory\KeywordFactory $keywordFactory
+ * @param \Tmdb\Factory\KeywordFactory $keywordFactory
* @return $this
*/
public function setKeywordFactory($keywordFactory)
{
$this->keywordFactory = $keywordFactory;
+
return $this;
}
@@ -367,4 +378,4 @@ public function getKeywordFactory()
{
return $this->keywordFactory;
}
-}
\ No newline at end of file
+}
diff --git a/lib/Tmdb/Factory/NetworkFactory.php b/lib/Tmdb/Factory/NetworkFactory.php
index fd2cc67f..39a6b212 100644
--- a/lib/Tmdb/Factory/NetworkFactory.php
+++ b/lib/Tmdb/Factory/NetworkFactory.php
@@ -14,7 +14,6 @@
use Tmdb\Model\Common\GenericCollection;
use Tmdb\Model\Network;
-use Tmdb\Model\Movie;
/**
* Class NetworkFactory
@@ -43,7 +42,7 @@ public function createCollection(array $data = array())
$data = $data['networks'];
}
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item));
}
diff --git a/lib/Tmdb/Factory/People/CastFactory.php b/lib/Tmdb/Factory/People/CastFactory.php
index 09300754..f1b66d16 100644
--- a/lib/Tmdb/Factory/People/CastFactory.php
+++ b/lib/Tmdb/Factory/People/CastFactory.php
@@ -39,12 +39,11 @@ public function createCollection(array $data = array(), $person = null)
if (is_object($person)) {
$class = get_class($person);
- }
- else{
+ } else {
$class = '\Tmdb\Model\Person\CastMember';
}
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item, new $class()));
}
diff --git a/lib/Tmdb/Factory/People/CrewFactory.php b/lib/Tmdb/Factory/People/CrewFactory.php
index ae9bf8ec..841cb054 100644
--- a/lib/Tmdb/Factory/People/CrewFactory.php
+++ b/lib/Tmdb/Factory/People/CrewFactory.php
@@ -39,12 +39,11 @@ public function createCollection(array $data = array(), $person = null)
if (is_object($person)) {
$class = get_class($person);
- }
- else{
+ } else {
$class = '\Tmdb\Model\Person\CrewMember';
}
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item, new $class()));
}
diff --git a/lib/Tmdb/Factory/PeopleFactory.php b/lib/Tmdb/Factory/PeopleFactory.php
index a46b8901..354cb677 100644
--- a/lib/Tmdb/Factory/PeopleFactory.php
+++ b/lib/Tmdb/Factory/PeopleFactory.php
@@ -24,7 +24,8 @@
* Class PeopleFactory
* @package Tmdb\Factory
*/
-class PeopleFactory extends AbstractFactory {
+class PeopleFactory extends AbstractFactory
+{
/**
* @var ImageFactory
*/
@@ -45,7 +46,7 @@ public function __construct()
}
/**
- * @param array $data
+ * @param array $data
* @param Person\AbstractMember|null $person
*
* @return Person|CrewMember|CastMember
@@ -97,14 +98,15 @@ public function create(array $data = array(), $person = null)
/**
* Apply credits
*
- * @param array $data
+ * @param array $data
* @param Person $person
*/
- protected function applyCredits(array $data = array(), Person $person) {
+ protected function applyCredits(array $data = array(), Person $person)
+ {
$hydrator = new ObjectHydrator();
$types = array('movie_credits', 'tv_credits', 'combined_credits');
- foreach($types as $type) {
+ foreach ($types as $type) {
if (array_key_exists($type, $data)) {
$method = $hydrator->camelize(sprintf('get_%s', $type));
@@ -114,7 +116,7 @@ protected function applyCredits(array $data = array(), Person $person) {
new Person\MovieCredit()
);
- foreach($cast as $member) {
+ foreach ($cast as $member) {
$member->setPosterImage($member->getPosterPath());
}
@@ -127,7 +129,7 @@ protected function applyCredits(array $data = array(), Person $person) {
new Person\MovieCredit()
);
- foreach($crew as $member) {
+ foreach ($crew as $member) {
$member->setPosterImage($member->getPosterPath());
}
@@ -157,24 +159,25 @@ public function createCollection(array $data = array(), $person = null, $collect
if (is_object($person)) {
$class = get_class($person);
- }
- else{
+ } else {
$class = '\Tmdb\Model\Person';
}
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item, new $class()));
}
+
return $collection;
}
/**
- * @param \Tmdb\Factory\ImageFactory $imageFactory
+ * @param \Tmdb\Factory\ImageFactory $imageFactory
* @return $this
*/
public function setImageFactory($imageFactory)
{
$this->imageFactory = $imageFactory;
+
return $this;
}
@@ -187,12 +190,13 @@ public function getImageFactory()
}
/**
- * @param \Tmdb\Factory\Common\ChangeFactory $changeFactory
+ * @param \Tmdb\Factory\Common\ChangeFactory $changeFactory
* @return $this
*/
public function setChangeFactory($changeFactory)
{
$this->changeFactory = $changeFactory;
+
return $this;
}
diff --git a/lib/Tmdb/Factory/TvEpisodeFactory.php b/lib/Tmdb/Factory/TvEpisodeFactory.php
index bc40a9a1..8b840b2f 100644
--- a/lib/Tmdb/Factory/TvEpisodeFactory.php
+++ b/lib/Tmdb/Factory/TvEpisodeFactory.php
@@ -24,7 +24,8 @@
* Class TvEpisodeFactory
* @package Tmdb\Factory
*/
-class TvEpisodeFactory extends AbstractFactory {
+class TvEpisodeFactory extends AbstractFactory
+{
/**
* @var People\CastFactory
*/
@@ -103,7 +104,7 @@ public function createCollection(array $data = array())
{
$collection = new GenericCollection();
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item));
}
@@ -111,12 +112,13 @@ public function createCollection(array $data = array())
}
/**
- * @param \Tmdb\Factory\People\CastFactory $castFactory
+ * @param \Tmdb\Factory\People\CastFactory $castFactory
* @return $this
*/
public function setCastFactory($castFactory)
{
$this->castFactory = $castFactory;
+
return $this;
}
@@ -129,12 +131,13 @@ public function getCastFactory()
}
/**
- * @param \Tmdb\Factory\People\CrewFactory $crewFactory
+ * @param \Tmdb\Factory\People\CrewFactory $crewFactory
* @return $this
*/
public function setCrewFactory($crewFactory)
{
$this->crewFactory = $crewFactory;
+
return $this;
}
@@ -147,12 +150,13 @@ public function getCrewFactory()
}
/**
- * @param \Tmdb\Factory\ImageFactory $imageFactory
+ * @param \Tmdb\Factory\ImageFactory $imageFactory
* @return $this
*/
public function setImageFactory($imageFactory)
{
$this->imageFactory = $imageFactory;
+
return $this;
}
diff --git a/lib/Tmdb/Factory/TvFactory.php b/lib/Tmdb/Factory/TvFactory.php
index 0b1d1091..8017be63 100644
--- a/lib/Tmdb/Factory/TvFactory.php
+++ b/lib/Tmdb/Factory/TvFactory.php
@@ -25,7 +25,8 @@
* Class TvFactory
* @package Tmdb\Factory
*/
-class TvFactory extends AbstractFactory {
+class TvFactory extends AbstractFactory
+{
/**
* @var People\CastFactory
*/
@@ -146,7 +147,7 @@ public function createCollection(array $data = array())
$data = $data['results'];
}
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item));
}
@@ -154,12 +155,13 @@ public function createCollection(array $data = array())
}
/**
- * @param \Tmdb\Factory\People\CastFactory $castFactory
+ * @param \Tmdb\Factory\People\CastFactory $castFactory
* @return $this
*/
public function setCastFactory($castFactory)
{
$this->castFactory = $castFactory;
+
return $this;
}
@@ -172,12 +174,13 @@ public function getCastFactory()
}
/**
- * @param \Tmdb\Factory\People\CrewFactory $crewFactory
+ * @param \Tmdb\Factory\People\CrewFactory $crewFactory
* @return $this
*/
public function setCrewFactory($crewFactory)
{
$this->crewFactory = $crewFactory;
+
return $this;
}
@@ -190,12 +193,13 @@ public function getCrewFactory()
}
/**
- * @param \Tmdb\Factory\GenreFactory $genreFactory
+ * @param \Tmdb\Factory\GenreFactory $genreFactory
* @return $this
*/
public function setGenreFactory($genreFactory)
{
$this->genreFactory = $genreFactory;
+
return $this;
}
@@ -208,12 +212,13 @@ public function getGenreFactory()
}
/**
- * @param \Tmdb\Factory\ImageFactory $imageFactory
+ * @param \Tmdb\Factory\ImageFactory $imageFactory
* @return $this
*/
public function setImageFactory($imageFactory)
{
$this->imageFactory = $imageFactory;
+
return $this;
}
@@ -226,12 +231,13 @@ public function getImageFactory()
}
/**
- * @param \Tmdb\Factory\TvSeasonFactory $tvSeasonFactory
+ * @param \Tmdb\Factory\TvSeasonFactory $tvSeasonFactory
* @return $this
*/
public function setTvSeasonFactory($tvSeasonFactory)
{
$this->tvSeasonFactory = $tvSeasonFactory;
+
return $this;
}
@@ -244,12 +250,13 @@ public function getTvSeasonFactory()
}
/**
- * @param \Tmdb\Factory\NetworkFactory $networkFactory
+ * @param \Tmdb\Factory\NetworkFactory $networkFactory
* @return $this
*/
public function setNetworkFactory($networkFactory)
{
$this->networkFactory = $networkFactory;
+
return $this;
}
diff --git a/lib/Tmdb/Factory/TvSeasonFactory.php b/lib/Tmdb/Factory/TvSeasonFactory.php
index 78fc88d1..14189045 100644
--- a/lib/Tmdb/Factory/TvSeasonFactory.php
+++ b/lib/Tmdb/Factory/TvSeasonFactory.php
@@ -24,7 +24,8 @@
* Class TvSeasonFactory
* @package Tmdb\Factory
*/
-class TvSeasonFactory extends AbstractFactory {
+class TvSeasonFactory extends AbstractFactory
+{
/**
* @var People\CastFactory
*/
@@ -108,7 +109,7 @@ public function createCollection(array $data = array())
{
$collection = new GenericCollection();
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->create($item));
}
@@ -116,12 +117,13 @@ public function createCollection(array $data = array())
}
/**
- * @param \Tmdb\Factory\People\CastFactory $castFactory
+ * @param \Tmdb\Factory\People\CastFactory $castFactory
* @return $this
*/
public function setCastFactory($castFactory)
{
$this->castFactory = $castFactory;
+
return $this;
}
@@ -134,12 +136,13 @@ public function getCastFactory()
}
/**
- * @param \Tmdb\Factory\People\CrewFactory $crewFactory
+ * @param \Tmdb\Factory\People\CrewFactory $crewFactory
* @return $this
*/
public function setCrewFactory($crewFactory)
{
$this->crewFactory = $crewFactory;
+
return $this;
}
@@ -152,12 +155,13 @@ public function getCrewFactory()
}
/**
- * @param \Tmdb\Factory\ImageFactory $imageFactory
+ * @param \Tmdb\Factory\ImageFactory $imageFactory
* @return $this
*/
public function setImageFactory($imageFactory)
{
$this->imageFactory = $imageFactory;
+
return $this;
}
@@ -170,12 +174,13 @@ public function getImageFactory()
}
/**
- * @param \Tmdb\Factory\TvEpisodeFactory $tvEpisodeFactory
+ * @param \Tmdb\Factory\TvEpisodeFactory $tvEpisodeFactory
* @return $this
*/
public function setTvEpisodeFactory($tvEpisodeFactory)
{
$this->tvEpisodeFactory = $tvEpisodeFactory;
+
return $this;
}
diff --git a/lib/Tmdb/Helper/ImageHelper.php b/lib/Tmdb/Helper/ImageHelper.php
index c5f94fce..6d2755f4 100644
--- a/lib/Tmdb/Helper/ImageHelper.php
+++ b/lib/Tmdb/Helper/ImageHelper.php
@@ -19,8 +19,8 @@
* Class ImageHelper
* @package Tmdb\Helper
*/
-class ImageHelper {
-
+class ImageHelper
+{
private $config;
public function __construct(Configuration $config)
@@ -41,11 +41,12 @@ public function getImageConfiguration()
/**
* Get the url for the image resource
*
- * @param Image $image
- * @param string $size
+ * @param Image $image
+ * @param string $size
* @return string
*/
- public function getUrl(Image $image, $size = 'original') {
+ public function getUrl(Image $image, $size = 'original')
+ {
$config = $this->getImageConfiguration();
return $config['base_url'] . $size . $image->getFilePath();
@@ -54,13 +55,14 @@ public function getUrl(Image $image, $size = 'original') {
/**
* Get an img html tag for the image in the specified size
*
- * @param Image $image
- * @param string $size
- * @param int|null $width
- * @param int|null $height
+ * @param Image $image
+ * @param string $size
+ * @param int|null $width
+ * @param int|null $height
* @return string
*/
- public function getHtml(Image $image, $size = 'original', $width = null, $height = null) {
+ public function getHtml(Image $image, $size = 'original', $width = null, $height = null)
+ {
if (null == $image->getFilePath()) {
return '';
}
diff --git a/lib/Tmdb/HttpClient/HttpClient.php b/lib/Tmdb/HttpClient/HttpClient.php
index 76554c25..25b6bb2f 100644
--- a/lib/Tmdb/HttpClient/HttpClient.php
+++ b/lib/Tmdb/HttpClient/HttpClient.php
@@ -46,8 +46,8 @@ class HttpClient
/**
* Constructor
*
- * @param string $baseUrl
- * @param array $options
+ * @param string $baseUrl
+ * @param array $options
* @param ClientInterface $client
*/
public function __construct($baseUrl, array $options, ClientInterface $client)
@@ -171,9 +171,7 @@ public function request(RequestInterface $request)
try {
$response = $request->send();
- }
- catch(\Exception $e)
- {
+ } catch (\Exception $e) {
// @TODO catch any API errors / timeouts / other specific information from Guzzle?
throw $e;
}
@@ -185,12 +183,13 @@ public function request(RequestInterface $request)
}
/**
- * @param \Guzzle\Http\ClientInterface $client
+ * @param \Guzzle\Http\ClientInterface $client
* @return $this
*/
public function setClient($client)
{
$this->client = $client;
+
return $this;
}
diff --git a/lib/Tmdb/HttpClient/HttpClientInterface.php b/lib/Tmdb/HttpClient/HttpClientInterface.php
index 1899df98..bbce4cbe 100644
--- a/lib/Tmdb/HttpClient/HttpClientInterface.php
+++ b/lib/Tmdb/HttpClient/HttpClientInterface.php
@@ -24,71 +24,71 @@ interface HttpClientInterface
/**
* Compose a GET request
*
- * @param string $path Request path
- * @param array $parameters GET Parameters
- * @param array $headers Reconfigure the request headers for this call only
+ * @param string $path Request path
+ * @param array $parameters GET Parameters
+ * @param array $headers Reconfigure the request headers for this call only
*
- * @return Response Data
+ * @return Response Data
*/
public function get($path, array $parameters = array(), array $headers = array());
/**
* Compose a POST request
*
- * @param string $path Request path
- * @param string $postBody The post BODY
- * @param array $parameters POST Parameters
- * @param array $headers Reconfigure the request headers for this call only
+ * @param string $path Request path
+ * @param string $postBody The post BODY
+ * @param array $parameters POST Parameters
+ * @param array $headers Reconfigure the request headers for this call only
*
- * @return Response Data
+ * @return Response Data
*/
public function post($path, $postBody, array $parameters = array(), array $headers = array());
/**
* Compose a POST request but json_encode the body
*
- * @param string $path Request path
- * @param array $postBody The post BODY
- * @param array $parameters POST Parameters
- * @param array $headers Reconfigure the request headers for this call only
+ * @param string $path Request path
+ * @param array $postBody The post BODY
+ * @param array $parameters POST Parameters
+ * @param array $headers Reconfigure the request headers for this call only
*
- * @return Response Data
+ * @return Response Data
*/
public function postJson($path, $postBody, array $parameters = array(), array $headers = array());
/**
* Compose a PATCH request
*
- * @param string $path Request path
- * @param string $body The body
- * @param array $parameters PATCH Parameters
- * @param array $headers Reconfigure the request headers for this call only
+ * @param string $path Request path
+ * @param string $body The body
+ * @param array $parameters PATCH Parameters
+ * @param array $headers Reconfigure the request headers for this call only
*
- * @return Response Data
+ * @return Response Data
*/
public function patch($path, $body = null, array $parameters = array(), array $headers = array());
/**
* Compose a PUT request
*
- * @param string $path Request path
- * @param string $body The body
- * @param array $parameters PUT Parameters
- * @param array $headers Reconfigure the request headers for this call only
+ * @param string $path Request path
+ * @param string $body The body
+ * @param array $parameters PUT Parameters
+ * @param array $headers Reconfigure the request headers for this call only
*
- * @return Response Data
+ * @return Response Data
*/
public function put($path, $body = null, array $parameters = array(), array $headers = array());
/**
* Compose a DELETE request
*
- * @param string $path Request path
- * @param string $body The body
- * @param array $parameters DELETE Parameters
- * @param array $headers Reconfigure the request headers for this call only
+ * @param string $path Request path
+ * @param string $body The body
+ * @param array $parameters DELETE Parameters
+ * @param array $headers Reconfigure the request headers for this call only
*
- * @return Response Data
+ * @return Response Data
*/
public function delete($path, $body = null, array $parameters = array(), array $headers = array());
@@ -99,5 +99,4 @@ public function delete($path, $body = null, array $parameters = array(), array $
* @return Response
*/
public function request(RequestInterface $request);
-
}
diff --git a/lib/Tmdb/Model/AbstractModel.php b/lib/Tmdb/Model/AbstractModel.php
index 4d40864f..6274036a 100644
--- a/lib/Tmdb/Model/AbstractModel.php
+++ b/lib/Tmdb/Model/AbstractModel.php
@@ -16,7 +16,8 @@
* Class AbstractModel
* @package Tmdb\Model
*/
-class AbstractModel {
+class AbstractModel
+{
/**
* List of properties to populate by the ObjectHydrator
*
diff --git a/lib/Tmdb/Model/Account.php b/lib/Tmdb/Model/Account.php
index a9334b51..a70fd52a 100644
--- a/lib/Tmdb/Model/Account.php
+++ b/lib/Tmdb/Model/Account.php
@@ -16,7 +16,8 @@
* Class Account
* @package Tmdb\Model
*/
-class Account extends AbstractModel {
+class Account extends AbstractModel
+{
/**
* @var integer
*/
@@ -60,12 +61,13 @@ class Account extends AbstractModel {
);
/**
- * @param int $id
+ * @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
+
return $this;
}
@@ -78,12 +80,13 @@ public function getId()
}
/**
- * @param boolean $includeAdult
+ * @param boolean $includeAdult
* @return $this
*/
public function setIncludeAdult($includeAdult)
{
$this->includeAdult = $includeAdult;
+
return $this;
}
@@ -96,12 +99,13 @@ public function getIncludeAdult()
}
/**
- * @param string $iso31661
+ * @param string $iso31661
* @return $this
*/
public function setIso31661($iso31661)
{
$this->iso31661 = $iso31661;
+
return $this;
}
@@ -114,12 +118,13 @@ public function getIso31661()
}
/**
- * @param string $iso6391
+ * @param string $iso6391
* @return $this
*/
public function setIso6391($iso6391)
{
$this->iso6391 = $iso6391;
+
return $this;
}
@@ -132,12 +137,13 @@ public function getIso6391()
}
/**
- * @param string $name
+ * @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
@@ -150,12 +156,13 @@ public function getName()
}
/**
- * @param string $username
+ * @param string $username
* @return $this
*/
public function setUsername($username)
{
$this->username = $username;
+
return $this;
}
@@ -167,5 +174,4 @@ public function getUsername()
return $this->username;
}
-
}
diff --git a/lib/Tmdb/Model/Account/ListItem.php b/lib/Tmdb/Model/Account/ListItem.php
index 7ce61239..95bf40b4 100644
--- a/lib/Tmdb/Model/Account/ListItem.php
+++ b/lib/Tmdb/Model/Account/ListItem.php
@@ -19,7 +19,8 @@
* Class ListItem
* @package Tmdb\Model\Account
*/
-class ListItem extends AbstractModel {
+class ListItem extends AbstractModel
+{
/**
* @var string
*/
@@ -80,12 +81,13 @@ class ListItem extends AbstractModel {
);
/**
- * @param string $description
+ * @param string $description
* @return $this
*/
public function setDescription($description)
{
$this->description = $description;
+
return $this;
}
@@ -98,12 +100,13 @@ public function getDescription()
}
/**
- * @param int $favoriteCount
+ * @param int $favoriteCount
* @return $this
*/
public function setFavoriteCount($favoriteCount)
{
$this->favoriteCount = $favoriteCount;
+
return $this;
}
@@ -116,12 +119,13 @@ public function getFavoriteCount()
}
/**
- * @param string $id
+ * @param string $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
+
return $this;
}
@@ -134,12 +138,13 @@ public function getId()
}
/**
- * @param string $iso6391
+ * @param string $iso6391
* @return $this
*/
public function setIso6391($iso6391)
{
$this->iso6391 = $iso6391;
+
return $this;
}
@@ -152,12 +157,13 @@ public function getIso6391()
}
/**
- * @param int $itemCount
+ * @param int $itemCount
* @return $this
*/
public function setItemCount($itemCount)
{
$this->itemCount = $itemCount;
+
return $this;
}
@@ -170,12 +176,13 @@ public function getItemCount()
}
/**
- * @param string $listType
+ * @param string $listType
* @return $this
*/
public function setListType($listType)
{
$this->listType = $listType;
+
return $this;
}
@@ -188,12 +195,13 @@ public function getListType()
}
/**
- * @param string $name
+ * @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
@@ -206,12 +214,13 @@ public function getName()
}
/**
- * @param \Tmdb\Model\Image\PosterImage $posterImage
+ * @param \Tmdb\Model\Image\PosterImage $posterImage
* @return $this
*/
public function setPosterImage($posterImage)
{
$this->posterImage = $posterImage;
+
return $this;
}
@@ -224,12 +233,13 @@ public function getPosterImage()
}
/**
- * @param string $posterPath
+ * @param string $posterPath
* @return $this
*/
public function setPosterPath($posterPath)
{
$this->posterPath = $posterPath;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Certification.php b/lib/Tmdb/Model/Certification.php
index dea8b7f6..c4d38594 100644
--- a/lib/Tmdb/Model/Certification.php
+++ b/lib/Tmdb/Model/Certification.php
@@ -18,8 +18,8 @@
* Class Certification
* @package Tmdb\Model
*/
-class Certification extends AbstractModel {
-
+class Certification extends AbstractModel
+{
/**
* @var string
*/
@@ -40,12 +40,13 @@ public function __construct()
}
/**
- * @param \Tmdb\Model\Common\GenericCollection $certifications
+ * @param \Tmdb\Model\Common\GenericCollection $certifications
* @return $this
*/
public function setCertifications($certifications)
{
$this->certifications = $certifications;
+
return $this;
}
@@ -58,12 +59,13 @@ public function getCertifications()
}
/**
- * @param string $country
+ * @param string $country
* @return $this
*/
public function setCountry($country)
{
$this->country = $country;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Certification/CountryCertification.php b/lib/Tmdb/Model/Certification/CountryCertification.php
index 479a93d1..a0d62c88 100644
--- a/lib/Tmdb/Model/Certification/CountryCertification.php
+++ b/lib/Tmdb/Model/Certification/CountryCertification.php
@@ -18,8 +18,8 @@
* Class CountryCertification
* @package Tmdb\Model\Certification
*/
-class CountryCertification extends AbstractModel {
-
+class CountryCertification extends AbstractModel
+{
/**
* @var string
*/
@@ -42,12 +42,13 @@ class CountryCertification extends AbstractModel {
);
/**
- * @param string $certification
+ * @param string $certification
* @return $this
*/
public function setCertification($certification)
{
$this->certification = $certification;
+
return $this;
}
@@ -60,12 +61,13 @@ public function getCertification()
}
/**
- * @param string $meaning
+ * @param string $meaning
* @return $this
*/
public function setMeaning($meaning)
{
$this->meaning = $meaning;
+
return $this;
}
@@ -78,12 +80,13 @@ public function getMeaning()
}
/**
- * @param int $order
+ * @param int $order
* @return $this
*/
public function setOrder($order)
{
$this->order = $order;
+
return $this;
}
@@ -95,5 +98,4 @@ public function getOrder()
return $this->order;
}
-
}
diff --git a/lib/Tmdb/Model/Change.php b/lib/Tmdb/Model/Change.php
index c3186cce..c161ed66 100644
--- a/lib/Tmdb/Model/Change.php
+++ b/lib/Tmdb/Model/Change.php
@@ -16,7 +16,8 @@
* Class Change
* @package Tmdb\Model
*/
-class Change extends AbstractModel {
+class Change extends AbstractModel
+{
/**
* @var integer
*/
@@ -36,12 +37,13 @@ class Change extends AbstractModel {
);
/**
- * @param boolean $adult
+ * @param boolean $adult
* @return $this
*/
public function setAdult($adult)
{
$this->adult = (bool) $adult;
+
return $this;
}
@@ -54,12 +56,13 @@ public function getAdult()
}
/**
- * @param int $id
+ * @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = (int) $id;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Collection.php b/lib/Tmdb/Model/Collection.php
index e11948a9..e78ac50c 100644
--- a/lib/Tmdb/Model/Collection.php
+++ b/lib/Tmdb/Model/Collection.php
@@ -21,8 +21,8 @@
* Class Collection
* @package Tmdb\Model
*/
-class Collection extends AbstractModel {
-
+class Collection extends AbstractModel
+{
/**
* @var string
*/
@@ -83,12 +83,13 @@ public function __construct()
}
/**
- * @param \Tmdb\Model\Image\BackdropImage $backdrop
+ * @param \Tmdb\Model\Image\BackdropImage $backdrop
* @return $this
*/
public function setBackdropImage(BackdropImage $backdrop)
{
$this->backdrop = $backdrop;
+
return $this;
}
@@ -101,12 +102,13 @@ public function getBackdropImage()
}
/**
- * @param string $backdropPath
+ * @param string $backdropPath
* @return $this
*/
public function setBackdropPath($backdropPath)
{
$this->backdropPath = $backdropPath;
+
return $this;
}
@@ -119,12 +121,13 @@ public function getBackdropPath()
}
/**
- * @param int $id
+ * @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = (int) $id;
+
return $this;
}
@@ -137,12 +140,13 @@ public function getId()
}
/**
- * @param \Tmdb\Model\Collection\Images $images
+ * @param \Tmdb\Model\Collection\Images $images
* @return $this
*/
public function setImages(Images $images)
{
$this->images = $images;
+
return $this;
}
@@ -155,12 +159,13 @@ public function getImages()
}
/**
- * @param string $name
+ * @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
@@ -173,12 +178,13 @@ public function getName()
}
/**
- * @param string $overview
+ * @param string $overview
* @return $this
*/
public function setOverview($overview)
{
$this->overview = $overview;
+
return $this;
}
@@ -191,12 +197,13 @@ public function getOverview()
}
/**
- * @param GenericCollection $parts
+ * @param GenericCollection $parts
* @return $this
*/
public function setParts($parts)
{
$this->parts = $parts;
+
return $this;
}
@@ -209,12 +216,13 @@ public function getParts()
}
/**
- * @param \Tmdb\Model\Image\PosterImage $poster
+ * @param \Tmdb\Model\Image\PosterImage $poster
* @return $this
*/
public function setPosterImage(PosterImage $poster)
{
$this->poster = $poster;
+
return $this;
}
@@ -227,12 +235,13 @@ public function getPosterImage()
}
/**
- * @param string $posterPath
+ * @param string $posterPath
* @return $this
*/
public function setPosterPath($posterPath)
{
$this->posterPath = $posterPath;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Collection/CreditsCollection.php b/lib/Tmdb/Model/Collection/CreditsCollection.php
index d81f57ab..69d71747 100644
--- a/lib/Tmdb/Model/Collection/CreditsCollection.php
+++ b/lib/Tmdb/Model/Collection/CreditsCollection.php
@@ -20,7 +20,8 @@
* Class CreditsCollection
* @package Tmdb\Model\Collection
*/
-class CreditsCollection {
+class CreditsCollection
+{
/**
* @var Cast
*/
@@ -41,12 +42,13 @@ public function __construct()
}
/**
- * @param Cast|GenericCollection $cast
+ * @param Cast|GenericCollection $cast
* @return $this
*/
public function setCast(GenericCollection $cast)
{
$this->cast = $cast;
+
return $this;
}
@@ -59,12 +61,13 @@ public function getCast()
}
/**
- * @param Crew|GenericCollection $crew
+ * @param Crew|GenericCollection $crew
* @return $this
*/
public function setCrew(GenericCollection $crew)
{
$this->crew = $crew;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Collection/Genres.php b/lib/Tmdb/Model/Collection/Genres.php
index 169fc1a6..7317d94a 100644
--- a/lib/Tmdb/Model/Collection/Genres.php
+++ b/lib/Tmdb/Model/Collection/Genres.php
@@ -19,8 +19,8 @@
* Class Genres
* @package Tmdb\Model\Collection
*/
-class Genres extends GenericCollection {
-
+class Genres extends GenericCollection
+{
/**
* Returns all genres
*
@@ -37,8 +37,9 @@ public function getGenres()
* @param $id
* @return Genre|null
*/
- public function getGenre($id) {
- foreach($this->data as $genre) {
+ public function getGenre($id)
+ {
+ foreach ($this->data as $genre) {
if ($id === $genre->getId()) {
return $genre;
}
diff --git a/lib/Tmdb/Model/Collection/Images.php b/lib/Tmdb/Model/Collection/Images.php
index 38525357..40cfcaec 100644
--- a/lib/Tmdb/Model/Collection/Images.php
+++ b/lib/Tmdb/Model/Collection/Images.php
@@ -20,8 +20,8 @@
* Class Images
* @package Tmdb\Model\Collection
*/
-class Images extends GenericCollection {
-
+class Images extends GenericCollection
+{
/**
* Returns all images
*
@@ -38,7 +38,8 @@ public function getImages()
* @param $id
* @return null
*/
- public function getImage($id) {
+ public function getImage($id)
+ {
return $this->filterId($id);
}
@@ -60,7 +61,7 @@ public function addImage(Image $image)
public function filterPosters()
{
return $this->filter(
- function($key, $value) {
+ function ($key, $value) {
if ($value instanceof ImageFilter && $value instanceof Image\PosterImage) { return true; }
}
);
@@ -74,7 +75,7 @@ function($key, $value) {
public function filterBackdrops()
{
return $this->filter(
- function($key, $value) {
+ function ($key, $value) {
if ($value instanceof ImageFilter && $value instanceof Image\BackdropImage) { return true; }
}
);
@@ -88,7 +89,7 @@ function($key, $value) {
public function filterProfile()
{
return $this->filter(
- function($key, $value) {
+ function ($key, $value) {
if ($value instanceof ImageFilter && $value instanceof Image\ProfileImage) { return true; }
}
);
@@ -102,7 +103,7 @@ function($key, $value) {
public function filterStills()
{
return $this->filter(
- function($key, $value) {
+ function ($key, $value) {
if ($value instanceof ImageFilter && $value instanceof Image\StillImage) { return true; }
}
);
@@ -117,7 +118,7 @@ function($key, $value) {
public function filterMaxWidth($width)
{
return $this->filter(
- function($key, $value) use ($width) {
+ function ($key, $value) use ($width) {
if ($value instanceof ImageFilter && $value->getWidth() <= $width && $value->getWidth() !== null) { return true; }
}
);
@@ -132,7 +133,7 @@ function($key, $value) use ($width) {
public function filterMinWidth($width)
{
return $this->filter(
- function($key, $value) use ($width) {
+ function ($key, $value) use ($width) {
if ($value instanceof ImageFilter && $value->getWidth() >= $width && $value->getWidth() !== null) { return true; }
}
);
@@ -147,7 +148,7 @@ function($key, $value) use ($width) {
public function filterMaxHeight($height)
{
return $this->filter(
- function($key, $value) use ($height) {
+ function ($key, $value) use ($height) {
if ($value instanceof ImageFilter && $value->getHeight() <= $height && $value->getHeight() !== null) { return true; }
}
);
@@ -162,7 +163,7 @@ function($key, $value) use ($height) {
public function filterMinHeight($height)
{
return $this->filter(
- function($key, $value) use ($height) {
+ function ($key, $value) use ($height) {
if ($value instanceof ImageFilter && $value->getHeight() >= $height && $value->getHeight() !== null) { return true; }
}
);
@@ -181,7 +182,7 @@ public function filterBestVotedImage()
/**
* @var $image Image
*/
- foreach($this->data as $image) {
+ foreach ($this->data as $image) {
if ($image->getVoteAverage() > $voteAverage) {
$voteAverage = $image->getVoteAverage();
$currentImage = $image;
diff --git a/lib/Tmdb/Model/Collection/Jobs.php b/lib/Tmdb/Model/Collection/Jobs.php
index 6f2312b6..ee9f3def 100644
--- a/lib/Tmdb/Model/Collection/Jobs.php
+++ b/lib/Tmdb/Model/Collection/Jobs.php
@@ -18,24 +18,25 @@
* Class Jobs
* @package Tmdb\Model\Collection
*/
-class Jobs extends GenericCollection {
-
+class Jobs extends GenericCollection
+{
/**
* Filter by department
*
- * @param string $department
+ * @param string $department
* @return $this
*/
public function filterByDepartment($department)
{
$result = $this->filter(
- function($key, $value) use ($department) {
+ function ($key, $value) use ($department) {
if ($value->getDepartment() == $department) { return true; }
}
);
if ($result && 1 === count($result)) {
$results = $result->toArray();
+
return array_shift($results);
}
@@ -45,13 +46,13 @@ function($key, $value) use ($department) {
/**
* Filter by department and return the jobs collection
*
- * @param string $department
+ * @param string $department
* @return $this
*/
public function filterByDepartmentAndReturnJobsList($department)
{
$result = $this->filter(
- function($key, $value) use ($department) {
+ function ($key, $value) use ($department) {
if ($value->getDepartment() == $department) { return true; }
}
);
@@ -69,16 +70,16 @@ function($key, $value) use ($department) {
/**
* Filter by job
*
- * @param string $filterByJob
+ * @param string $filterByJob
* @return $this
*/
public function filterByJob($filterByJob)
{
$result = $this->filter(
- function($key, $value) use ($filterByJob) {
+ function ($key, $value) use ($filterByJob) {
$jobList = $value->getJobList();
- foreach($jobList as $job) {
+ foreach ($jobList as $job) {
if ($filterByJob == $job) { return true; }
}
}
@@ -86,6 +87,7 @@ function($key, $value) use ($filterByJob) {
if ($result && 1 === count($result)) {
$results = $result->toArray();
+
return array_shift($results);
}
diff --git a/lib/Tmdb/Model/Collection/Keywords.php b/lib/Tmdb/Model/Collection/Keywords.php
index d6d52a90..70d80439 100644
--- a/lib/Tmdb/Model/Collection/Keywords.php
+++ b/lib/Tmdb/Model/Collection/Keywords.php
@@ -19,8 +19,8 @@
* Class Keywords
* @package Tmdb\Model\Collection
*/
-class Keywords extends GenericCollection {
-
+class Keywords extends GenericCollection
+{
/**
* Returns all keywords
*
@@ -37,7 +37,8 @@ public function getKeywords()
* @param $id
* @return Keyword
*/
- public function getKeyword($id) {
+ public function getKeyword($id)
+ {
return $this->filterId($id);
}
diff --git a/lib/Tmdb/Model/Collection/People.php b/lib/Tmdb/Model/Collection/People.php
index 65a16784..b83c97d9 100644
--- a/lib/Tmdb/Model/Collection/People.php
+++ b/lib/Tmdb/Model/Collection/People.php
@@ -20,8 +20,8 @@
* Class People
* @package Tmdb\Model\Collection
*/
-class People extends GenericCollection {
-
+class People extends GenericCollection
+{
/**
* Returns all people
*
@@ -38,7 +38,8 @@ public function getPeople()
* @param $id
* @return Person
*/
- public function getPerson($id) {
+ public function getPerson($id)
+ {
return $this->filterId($id);
}
diff --git a/lib/Tmdb/Model/Collection/People/Cast.php b/lib/Tmdb/Model/Collection/People/Cast.php
index ff4b8dbc..99a1f75a 100644
--- a/lib/Tmdb/Model/Collection/People/Cast.php
+++ b/lib/Tmdb/Model/Collection/People/Cast.php
@@ -19,7 +19,8 @@
* Class Cast
* @package Tmdb\Model\Collection\People
*/
-class Cast extends People {
+class Cast extends People
+{
/**
* Returns all people
*
@@ -36,7 +37,8 @@ public function getCast()
* @param $id
* @return Person
*/
- public function getCastMember($id) {
+ public function getCastMember($id)
+ {
return parent::getPerson($id);
}
}
diff --git a/lib/Tmdb/Model/Collection/People/Crew.php b/lib/Tmdb/Model/Collection/People/Crew.php
index d3a06649..4dce220e 100644
--- a/lib/Tmdb/Model/Collection/People/Crew.php
+++ b/lib/Tmdb/Model/Collection/People/Crew.php
@@ -19,7 +19,8 @@
* Class Crew
* @package Tmdb\Model\Collection\People
*/
-class Crew extends People {
+class Crew extends People
+{
/**
* Returns all people
*
@@ -36,7 +37,8 @@ public function getCrew()
* @param $id
* @return Person
*/
- public function getCrewMember($id) {
+ public function getCrewMember($id)
+ {
return parent::getPerson($id);
}
}
diff --git a/lib/Tmdb/Model/Collection/People/PersonInterface.php b/lib/Tmdb/Model/Collection/People/PersonInterface.php
index 4f4538c1..3d3e0ad7 100644
--- a/lib/Tmdb/Model/Collection/People/PersonInterface.php
+++ b/lib/Tmdb/Model/Collection/People/PersonInterface.php
@@ -16,11 +16,12 @@
* Interface PersonInterface
* @package Tmdb\Model\Collection\People
*/
-interface PersonInterface {
- function getName();
+interface PersonInterface
+{
+ public function getName();
/**
* @return integer
*/
- function getId();
+ public function getId();
}
diff --git a/lib/Tmdb/Model/Collection/QueryParameter/AppendToResponse.php b/lib/Tmdb/Model/Collection/QueryParameter/AppendToResponse.php
index 5523f6c2..5d70aaa2 100644
--- a/lib/Tmdb/Model/Collection/QueryParameter/AppendToResponse.php
+++ b/lib/Tmdb/Model/Collection/QueryParameter/AppendToResponse.php
@@ -18,6 +18,7 @@
* Class AppendToResponse
* @package Tmdb\Model\Collection\QueryParameter
*/
-final class AppendToResponse extends BaseAppendToResponse {
+final class AppendToResponse extends BaseAppendToResponse
+{
const IMAGES = 'images';
}
diff --git a/lib/Tmdb/Model/Collection/ResultCollection.php b/lib/Tmdb/Model/Collection/ResultCollection.php
index aa0acbcc..22e09c0d 100644
--- a/lib/Tmdb/Model/Collection/ResultCollection.php
+++ b/lib/Tmdb/Model/Collection/ResultCollection.php
@@ -18,7 +18,8 @@
* Class ResultCollection
* @package Tmdb\Model\Collection
*/
-class ResultCollection extends GenericCollection {
+class ResultCollection extends GenericCollection
+{
/**
* @var int
*/
@@ -44,12 +45,13 @@ class ResultCollection extends GenericCollection {
);
/**
- * @param int $page
+ * @param int $page
* @return $this
*/
public function setPage($page)
{
$this->page = (int) $page;
+
return $this;
}
@@ -62,12 +64,13 @@ public function getPage()
}
/**
- * @param int $totalPages
+ * @param int $totalPages
* @return $this
*/
public function setTotalPages($totalPages)
{
$this->totalPages = (int) $totalPages;
+
return $this;
}
@@ -80,12 +83,13 @@ public function getTotalPages()
}
/**
- * @param int $totalResults
+ * @param int $totalResults
* @return $this
*/
public function setTotalResults($totalResults)
{
$this->totalResults = (int) $totalResults;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Common/AbstractTrailer.php b/lib/Tmdb/Model/Common/AbstractTrailer.php
index 083a3c9e..233d461f 100644
--- a/lib/Tmdb/Model/Common/AbstractTrailer.php
+++ b/lib/Tmdb/Model/Common/AbstractTrailer.php
@@ -18,7 +18,8 @@
* Class AbstractTrailer
* @package Tmdb\Model\Common
*/
-abstract class AbstractTrailer extends AbstractModel {
+abstract class AbstractTrailer extends AbstractModel
+{
/**
* Returns the http url to the trailer
*
diff --git a/lib/Tmdb/Model/Common/Change.php b/lib/Tmdb/Model/Common/Change.php
index 2d4663f3..069f5408 100644
--- a/lib/Tmdb/Model/Common/Change.php
+++ b/lib/Tmdb/Model/Common/Change.php
@@ -18,8 +18,8 @@
* Class Change
* @package Tmdb\Model\Common
*/
-class Change extends AbstractModel {
-
+class Change extends AbstractModel
+{
/**
* @var string
*/
@@ -40,12 +40,13 @@ public function __construct()
}
/**
- * @param \Tmdb\Model\Common\GenericCollection $items
+ * @param \Tmdb\Model\Common\GenericCollection $items
* @return $this
*/
public function setItems($items)
{
$this->items = $items;
+
return $this;
}
@@ -58,12 +59,13 @@ public function getItems()
}
/**
- * @param string $key
+ * @param string $key
* @return $this
*/
public function setKey($key)
{
$this->key = $key;
+
return $this;
}
@@ -75,5 +77,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 766483a4..2a7ab014 100644
--- a/lib/Tmdb/Model/Common/Change/Item.php
+++ b/lib/Tmdb/Model/Common/Change/Item.php
@@ -18,8 +18,8 @@
* Class Item
* @package Tmdb\Model\Common\Change
*/
-class Item extends AbstractModel {
-
+class Item extends AbstractModel
+{
/**
* @var string
*/
@@ -48,12 +48,13 @@ class Item extends AbstractModel {
);
/**
- * @param string $action
+ * @param string $action
* @return $this
*/
public function setAction($action)
{
$this->action = $action;
+
return $this;
}
@@ -66,12 +67,13 @@ public function getAction()
}
/**
- * @param string $id
+ * @param string $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
+
return $this;
}
@@ -84,7 +86,7 @@ public function getId()
}
/**
- * @param string|\DateTime $time
+ * @param string|\DateTime $time
* @return $this
*/
public function setTime($time)
@@ -94,6 +96,7 @@ public function setTime($time)
}
$this->time = $time;
+
return $this;
}
@@ -106,12 +109,13 @@ public function getTime()
}
/**
- * @param array $value
+ * @param array $value
* @return $this
*/
public function setValue($value)
{
$this->value = $value;
+
return $this;
}
@@ -123,6 +127,4 @@ public function getValue()
return $this->value;
}
-
-
}
diff --git a/lib/Tmdb/Model/Common/Country.php b/lib/Tmdb/Model/Common/Country.php
index 9e0dfcd4..353adbd6 100644
--- a/lib/Tmdb/Model/Common/Country.php
+++ b/lib/Tmdb/Model/Common/Country.php
@@ -19,8 +19,8 @@
* Class Country
* @package Tmdb\Model\Common
*/
-class Country extends AbstractModel implements CountryFilter {
-
+class Country extends AbstractModel implements CountryFilter
+{
private $iso31661;
private $name;
@@ -30,12 +30,13 @@ class Country extends AbstractModel implements CountryFilter {
);
/**
- * @param string $iso31661
+ * @param string $iso31661
* @return $this
*/
public function setIso31661($iso31661)
{
$this->iso31661 = $iso31661;
+
return $this;
}
@@ -48,12 +49,13 @@ public function getIso31661()
}
/**
- * @param string $name
+ * @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Common/ExternalIds.php b/lib/Tmdb/Model/Common/ExternalIds.php
index a36a4b13..61d57838 100644
--- a/lib/Tmdb/Model/Common/ExternalIds.php
+++ b/lib/Tmdb/Model/Common/ExternalIds.php
@@ -18,8 +18,8 @@
* Class ExternalIds
* @package Tmdb\Model\Common
*/
-class ExternalIds extends AbstractModel {
-
+class ExternalIds extends AbstractModel
+{
private $imdbId;
private $freebaseId;
private $freebaseMid;
@@ -37,12 +37,13 @@ class ExternalIds extends AbstractModel {
);
/**
- * @param mixed $freebaseId
+ * @param mixed $freebaseId
* @return $this
*/
public function setFreebaseId($freebaseId)
{
$this->freebaseId = $freebaseId;
+
return $this;
}
@@ -55,12 +56,13 @@ public function getFreebaseId()
}
/**
- * @param mixed $freebaseMid
+ * @param mixed $freebaseMid
* @return $this
*/
public function setFreebaseMid($freebaseMid)
{
$this->freebaseMid = $freebaseMid;
+
return $this;
}
@@ -73,12 +75,13 @@ public function getFreebaseMid()
}
/**
- * @param mixed $id
+ * @param mixed $id
* @return $this
*/
public function setId($id)
{
$this->id = (int) $id;
+
return $this;
}
@@ -91,12 +94,13 @@ public function getId()
}
/**
- * @param mixed $imdbId
+ * @param mixed $imdbId
* @return $this
*/
public function setImdbId($imdbId)
{
$this->imdbId = $imdbId;
+
return $this;
}
@@ -109,12 +113,13 @@ public function getImdbId()
}
/**
- * @param mixed $tvdbId
+ * @param mixed $tvdbId
* @return $this
*/
public function setTvdbId($tvdbId)
{
$this->tvdbId = $tvdbId;
+
return $this;
}
@@ -127,12 +132,13 @@ public function getTvdbId()
}
/**
- * @param mixed $tvrageId
+ * @param mixed $tvrageId
* @return $this
*/
public function setTvrageId($tvrageId)
{
$this->tvrageId = $tvrageId;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Common/GenericCollection.php b/lib/Tmdb/Model/Common/GenericCollection.php
index bd9ef70c..16df46be 100644
--- a/lib/Tmdb/Model/Common/GenericCollection.php
+++ b/lib/Tmdb/Model/Common/GenericCollection.php
@@ -23,7 +23,8 @@
* Class GenericCollection
* @package Tmdb\Model\Common
*/
-class GenericCollection implements \ArrayAccess, \IteratorAggregate, \Countable {
+class GenericCollection implements \ArrayAccess, \IteratorAggregate, \Countable
+{
/** @var array Data associated with the object. */
protected $data = array();
@@ -309,13 +310,13 @@ public function offsetUnset($offset)
/**
* Filter by id
*
- * @param integer $id
+ * @param integer $id
* @return GenericCollection
*/
public function filterId($id)
{
$result = $this->filter(
- function($key, $value) use ($id) {
+ function ($key, $value) use ($id) {
if ($value->getId() == $id) { return true; }
}
);
@@ -330,13 +331,13 @@ function($key, $value) use ($id) {
/**
* Filter by language ISO 639-1 code.
*
- * @param string $language
+ * @param string $language
* @return GenericCollection
*/
public function filterLanguage($language = 'en')
{
return $this->filter(
- function($key, $value) use ($language) {
+ function ($key, $value) use ($language) {
if ($value instanceof LanguageFilter && $value->getIso6391() == $language) { return true; }
}
);
@@ -345,13 +346,13 @@ function($key, $value) use ($language) {
/**
* Filter by country ISO 3166-1 code.
*
- * @param string $country
+ * @param string $country
* @return GenericCollection
*/
public function filterCountry($country = 'US')
{
return $this->filter(
- function($key, $value) use ($country) {
+ function ($key, $value) use ($country) {
if ($value instanceof CountryFilter && $value->getIso31661() == $country) { return true; }
}
);
@@ -360,13 +361,13 @@ function($key, $value) use ($country) {
/**
* Filter by adult content
*
- * @param boolean $adult
+ * @param boolean $adult
* @return GenericCollection
*/
public function filterAdult($adult = false)
{
return $this->filter(
- function($key, $value) use ($adult) {
+ function ($key, $value) use ($adult) {
if ($value instanceof AdultFilter && $value->getAdult() == $adult) { return true; }
}
);
diff --git a/lib/Tmdb/Model/Common/QueryParameter/Adult.php b/lib/Tmdb/Model/Common/QueryParameter/Adult.php
index 5aed8bb2..7130aac9 100644
--- a/lib/Tmdb/Model/Common/QueryParameter/Adult.php
+++ b/lib/Tmdb/Model/Common/QueryParameter/Adult.php
@@ -16,8 +16,8 @@
* Class Adult
* @package Tmdb\Model\Common\QueryParameter
*/
-class Adult implements QueryParameterInterface {
-
+class Adult implements QueryParameterInterface
+{
private $adult;
public function __construct($adult)
diff --git a/lib/Tmdb/Model/Common/QueryParameter/AppendToResponse.php b/lib/Tmdb/Model/Common/QueryParameter/AppendToResponse.php
index a9c409d7..bf304e1f 100644
--- a/lib/Tmdb/Model/Common/QueryParameter/AppendToResponse.php
+++ b/lib/Tmdb/Model/Common/QueryParameter/AppendToResponse.php
@@ -18,7 +18,8 @@
* Class AppendToResponse
* @package Tmdb\Model\Common\QueryParameter
*/
-class AppendToResponse extends CollectionToCommaSeperatedString {
+class AppendToResponse extends CollectionToCommaSeperatedString
+{
/**
* @return string
*/
diff --git a/lib/Tmdb/Model/Common/QueryParameter/Language.php b/lib/Tmdb/Model/Common/QueryParameter/Language.php
index 4a91a10e..02e715be 100644
--- a/lib/Tmdb/Model/Common/QueryParameter/Language.php
+++ b/lib/Tmdb/Model/Common/QueryParameter/Language.php
@@ -16,8 +16,8 @@
* Class Language
* @package Tmdb\Model\Common\QueryParameter
*/
-class Language implements QueryParameterInterface {
-
+class Language implements QueryParameterInterface
+{
private $language;
public function __construct($language)
diff --git a/lib/Tmdb/Model/Common/QueryParameter/QueryParameterInterface.php b/lib/Tmdb/Model/Common/QueryParameter/QueryParameterInterface.php
index 87ab2154..d0e23763 100644
--- a/lib/Tmdb/Model/Common/QueryParameter/QueryParameterInterface.php
+++ b/lib/Tmdb/Model/Common/QueryParameter/QueryParameterInterface.php
@@ -16,14 +16,15 @@
* Interface QueryParameterInterface
* @package Tmdb\Model\Common\QueryParameter
*/
-interface QueryParameterInterface {
+interface QueryParameterInterface
+{
/**
* @return string
*/
- function getKey();
+ public function getKey();
/**
* @return string
*/
- function getValue();
+ public function getValue();
}
diff --git a/lib/Tmdb/Model/Common/QueryParameter/Type/CollectionToCommaSeperatedString.php b/lib/Tmdb/Model/Common/QueryParameter/Type/CollectionToCommaSeperatedString.php
index 05af7079..e6605039 100644
--- a/lib/Tmdb/Model/Common/QueryParameter/Type/CollectionToCommaSeperatedString.php
+++ b/lib/Tmdb/Model/Common/QueryParameter/Type/CollectionToCommaSeperatedString.php
@@ -19,7 +19,8 @@
* Class CollectionToCommaSeperatedString
* @package Tmdb\Model\Common\QueryParameter\Type
*/
-abstract class CollectionToCommaSeperatedString extends GenericCollection implements QueryParameterInterface {
+abstract class CollectionToCommaSeperatedString extends GenericCollection implements QueryParameterInterface
+{
/**
* @param array $collection
*/
@@ -27,7 +28,7 @@ public function __construct(array $collection = array())
{
$i = 0;
- foreach($collection as $item) {
+ foreach ($collection as $item) {
$this->add($i, $item);
$i++;
diff --git a/lib/Tmdb/Model/Common/SpokenLanguage.php b/lib/Tmdb/Model/Common/SpokenLanguage.php
index 0c441d85..ddb2d3f8 100644
--- a/lib/Tmdb/Model/Common/SpokenLanguage.php
+++ b/lib/Tmdb/Model/Common/SpokenLanguage.php
@@ -19,8 +19,8 @@
* Class SpokenLanguage
* @package Tmdb\Model\Common
*/
-class SpokenLanguage extends AbstractModel implements LanguageFilter {
-
+class SpokenLanguage extends AbstractModel implements LanguageFilter
+{
private $iso6391;
private $name;
@@ -30,12 +30,13 @@ class SpokenLanguage extends AbstractModel implements LanguageFilter {
);
/**
- * @param string $iso6391
+ * @param string $iso6391
* @return $this
*/
public function setIso6391($iso6391)
{
$this->iso6391 = $iso6391;
+
return $this;
}
@@ -48,12 +49,13 @@ public function getIso6391()
}
/**
- * @param string $name
+ * @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Common/Trailer/Youtube.php b/lib/Tmdb/Model/Common/Trailer/Youtube.php
index bc00660b..ef4faf76 100644
--- a/lib/Tmdb/Model/Common/Trailer/Youtube.php
+++ b/lib/Tmdb/Model/Common/Trailer/Youtube.php
@@ -18,8 +18,8 @@
* Class Youtube
* @package Tmdb\Model\Common\Trailer
*/
-class Youtube extends AbstractTrailer {
-
+class Youtube extends AbstractTrailer
+{
const URL = 'http://www.youtube.com/watch?v=%s';
private $name;
@@ -47,12 +47,13 @@ public function getUrl()
}
/**
- * @param string $name
+ * @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
@@ -65,12 +66,13 @@ public function getName()
}
/**
- * @param string $size
+ * @param string $size
* @return $this
*/
public function setSize($size)
{
$this->size = $size;
+
return $this;
}
@@ -83,12 +85,13 @@ public function getSize()
}
/**
- * @param string $source
+ * @param string $source
* @return $this
*/
public function setSource($source)
{
$this->source = $source;
+
return $this;
}
@@ -101,12 +104,13 @@ public function getSource()
}
/**
- * @param string $type
+ * @param string $type
* @return $this
*/
public function setType($type)
{
$this->type = $type;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Common/Translation.php b/lib/Tmdb/Model/Common/Translation.php
index 6d0f9a64..c75e52c7 100644
--- a/lib/Tmdb/Model/Common/Translation.php
+++ b/lib/Tmdb/Model/Common/Translation.php
@@ -18,8 +18,8 @@
* Class Translation
* @package Tmdb\Model\Common
*/
-class Translation extends SpokenLanguage implements LanguageFilter {
-
+class Translation extends SpokenLanguage implements LanguageFilter
+{
private $englishName;
public static $_properties = array(
@@ -29,12 +29,13 @@ class Translation extends SpokenLanguage implements LanguageFilter {
);
/**
- * @param string $englishName
+ * @param string $englishName
* @return $this
*/
public function setEnglishName($englishName)
{
$this->englishName = $englishName;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Company.php b/lib/Tmdb/Model/Company.php
index 79b8a351..41c26b9c 100644
--- a/lib/Tmdb/Model/Company.php
+++ b/lib/Tmdb/Model/Company.php
@@ -18,8 +18,8 @@
* Class Company
* @package Tmdb\Model
*/
-class Company extends AbstractModel {
-
+class Company extends AbstractModel
+{
private $description;
private $headquarters;
private $homepage;
@@ -40,12 +40,13 @@ class Company extends AbstractModel {
);
/**
- * @param mixed $description
+ * @param mixed $description
* @return $this
*/
public function setDescription($description)
{
$this->description = $description;
+
return $this;
}
@@ -58,12 +59,13 @@ public function getDescription()
}
/**
- * @param mixed $headquarters
+ * @param mixed $headquarters
* @return $this
*/
public function setHeadquarters($headquarters)
{
$this->headquarters = $headquarters;
+
return $this;
}
@@ -76,12 +78,13 @@ public function getHeadquarters()
}
/**
- * @param mixed $homepage
+ * @param mixed $homepage
* @return $this
*/
public function setHomepage($homepage)
{
$this->homepage = $homepage;
+
return $this;
}
@@ -94,12 +97,13 @@ public function getHomepage()
}
/**
- * @param mixed $id
+ * @param mixed $id
* @return $this
*/
public function setId($id)
{
$this->id = (int) $id;
+
return $this;
}
@@ -112,12 +116,13 @@ public function getId()
}
/**
- * @param LogoImage $logo
+ * @param LogoImage $logo
* @return $this
*/
public function setLogoImage(LogoImage $logo)
{
$this->logo = $logo;
+
return $this;
}
@@ -130,12 +135,13 @@ public function getLogoImage()
}
/**
- * @param mixed $logoPath
+ * @param mixed $logoPath
* @return $this
*/
public function setLogoPath($logoPath)
{
$this->logoPath = $logoPath;
+
return $this;
}
@@ -148,12 +154,13 @@ public function getLogoPath()
}
/**
- * @param mixed $name
+ * @param mixed $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
@@ -166,12 +173,13 @@ public function getName()
}
/**
- * @param mixed $parentCompany
+ * @param mixed $parentCompany
* @return $this
*/
public function setParentCompany($parentCompany)
{
$this->parentCompany = $parentCompany;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Configuration.php b/lib/Tmdb/Model/Configuration.php
index 699dfeb7..8badb84b 100644
--- a/lib/Tmdb/Model/Configuration.php
+++ b/lib/Tmdb/Model/Configuration.php
@@ -16,8 +16,8 @@
* Class Configuration
* @package Tmdb\Model
*/
-class Configuration extends AbstractModel {
-
+class Configuration extends AbstractModel
+{
/**
* @var array
*/
@@ -34,12 +34,13 @@ class Configuration extends AbstractModel {
);
/**
- * @param array $change_keys
+ * @param array $change_keys
* @return $this
*/
public function setChangeKeys(array $change_keys = array())
{
$this->change_keys = $change_keys;
+
return $this;
}
@@ -52,12 +53,13 @@ public function getChangeKeys()
}
/**
- * @param array $images
+ * @param array $images
* @return $this
*/
public function setImages(array $images = array())
{
$this->images = $images;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Credits.php b/lib/Tmdb/Model/Credits.php
index 72688a31..3b6a6cf4 100644
--- a/lib/Tmdb/Model/Credits.php
+++ b/lib/Tmdb/Model/Credits.php
@@ -18,7 +18,8 @@
* Class Credits
* @package Tmdb\Model
*/
-class Credits extends AbstractModel {
+class Credits extends AbstractModel
+{
/**
* @var string
*/
@@ -71,12 +72,13 @@ public function __construct()
}
/**
- * @param string $creditType
+ * @param string $creditType
* @return $this
*/
public function setCreditType($creditType)
{
$this->creditType = $creditType;
+
return $this;
}
@@ -89,12 +91,13 @@ public function getCreditType()
}
/**
- * @param string $department
+ * @param string $department
* @return $this
*/
public function setDepartment($department)
{
$this->department = $department;
+
return $this;
}
@@ -107,12 +110,13 @@ public function getDepartment()
}
/**
- * @param string $id
+ * @param string $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
+
return $this;
}
@@ -125,12 +129,13 @@ public function getId()
}
/**
- * @param string $job
+ * @param string $job
* @return $this
*/
public function setJob($job)
{
$this->job = $job;
+
return $this;
}
@@ -143,12 +148,13 @@ public function getJob()
}
/**
- * @param \Tmdb\Model\Credits\Media $media
+ * @param \Tmdb\Model\Credits\Media $media
* @return $this
*/
public function setMedia($media)
{
$this->media = $media;
+
return $this;
}
@@ -161,12 +167,13 @@ public function getMedia()
}
/**
- * @param string $mediaType
+ * @param string $mediaType
* @return $this
*/
public function setMediaType($mediaType)
{
$this->mediaType = $mediaType;
+
return $this;
}
@@ -179,12 +186,13 @@ public function getMediaType()
}
/**
- * @param \Tmdb\Model\Person $person
+ * @param \Tmdb\Model\Person $person
* @return $this
*/
public function setPerson($person)
{
$this->person = $person;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Credits/Media.php b/lib/Tmdb/Model/Credits/Media.php
index 24b0e4b7..c19d0281 100644
--- a/lib/Tmdb/Model/Credits/Media.php
+++ b/lib/Tmdb/Model/Credits/Media.php
@@ -19,7 +19,8 @@
* Class Media
* @package Tmdb\Model\Credits
*/
-class Media extends AbstractModel {
+class Media extends AbstractModel
+{
/**
* @var integer
*/
@@ -58,12 +59,13 @@ class Media extends AbstractModel {
);
/**
- * @param string $character
+ * @param string $character
* @return $this
*/
public function setCharacter($character)
{
$this->character = $character;
+
return $this;
}
@@ -76,12 +78,13 @@ public function getCharacter()
}
/**
- * @param \Tmdb\Model\Common\GenericCollection $episodes
+ * @param \Tmdb\Model\Common\GenericCollection $episodes
* @return $this
*/
public function setEpisodes($episodes)
{
$this->episodes = $episodes;
+
return $this;
}
@@ -94,12 +97,13 @@ public function getEpisodes()
}
/**
- * @param int $id
+ * @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
+
return $this;
}
@@ -112,12 +116,13 @@ public function getId()
}
/**
- * @param string $name
+ * @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
@@ -130,12 +135,13 @@ public function getName()
}
/**
- * @param string $originalName
+ * @param string $originalName
* @return $this
*/
public function setOriginalName($originalName)
{
$this->originalName = $originalName;
+
return $this;
}
@@ -148,12 +154,13 @@ public function getOriginalName()
}
/**
- * @param \Tmdb\Model\Common\GenericCollection $seasons
+ * @param \Tmdb\Model\Common\GenericCollection $seasons
* @return $this
*/
public function setSeasons($seasons)
{
$this->seasons = $seasons;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Filter/AdultFilter.php b/lib/Tmdb/Model/Filter/AdultFilter.php
index 71a612a8..0bf4020f 100644
--- a/lib/Tmdb/Model/Filter/AdultFilter.php
+++ b/lib/Tmdb/Model/Filter/AdultFilter.php
@@ -16,6 +16,7 @@
* Interface AdultFilter
* @package Tmdb\Model\Filter
*/
-interface AdultFilter {
+interface AdultFilter
+{
public function getAdult();
}
diff --git a/lib/Tmdb/Model/Filter/CountryFilter.php b/lib/Tmdb/Model/Filter/CountryFilter.php
index 4d6645f4..ddd8936f 100644
--- a/lib/Tmdb/Model/Filter/CountryFilter.php
+++ b/lib/Tmdb/Model/Filter/CountryFilter.php
@@ -16,8 +16,8 @@
* Interface CountryFilter
* @package Tmdb\Model\Filter
*/
-interface CountryFilter {
-
+interface CountryFilter
+{
/**
* @return string
*/
diff --git a/lib/Tmdb/Model/Filter/ImageFilter.php b/lib/Tmdb/Model/Filter/ImageFilter.php
index 593a8581..c4c307d0 100644
--- a/lib/Tmdb/Model/Filter/ImageFilter.php
+++ b/lib/Tmdb/Model/Filter/ImageFilter.php
@@ -16,5 +16,6 @@
* Interface ImageFilter
* @package Tmdb\Model\Filter
*/
-interface ImageFilter {
+interface ImageFilter
+{
}
diff --git a/lib/Tmdb/Model/Filter/LanguageFilter.php b/lib/Tmdb/Model/Filter/LanguageFilter.php
index cc1d8d31..69b27e75 100644
--- a/lib/Tmdb/Model/Filter/LanguageFilter.php
+++ b/lib/Tmdb/Model/Filter/LanguageFilter.php
@@ -16,6 +16,7 @@
* Interface LanguageFilter
* @package Tmdb\Model\Filter
*/
-interface LanguageFilter {
+interface LanguageFilter
+{
public function getIso6391();
}
diff --git a/lib/Tmdb/Model/Find.php b/lib/Tmdb/Model/Find.php
index 4812265b..7512f34f 100644
--- a/lib/Tmdb/Model/Find.php
+++ b/lib/Tmdb/Model/Find.php
@@ -19,8 +19,8 @@
* Class Find
* @package Tmdb\Model
*/
-class Find extends AbstractModel {
-
+class Find extends AbstractModel
+{
/**
* @var GenericCollection
*/
@@ -37,12 +37,13 @@ class Find extends AbstractModel {
private $tvResults;
/**
- * @param \Tmdb\Model\Common\GenericCollection $movieResults
+ * @param \Tmdb\Model\Common\GenericCollection $movieResults
* @return $this
*/
public function setMovieResults($movieResults)
{
$this->movieResults = $movieResults;
+
return $this;
}
@@ -55,12 +56,13 @@ public function getMovieResults()
}
/**
- * @param \Tmdb\Model\Collection\People $personResults
+ * @param \Tmdb\Model\Collection\People $personResults
* @return $this
*/
public function setPersonResults($personResults)
{
$this->personResults = $personResults;
+
return $this;
}
@@ -73,12 +75,13 @@ public function getPersonResults()
}
/**
- * @param \Tmdb\Model\Common\GenericCollection $tvResults
+ * @param \Tmdb\Model\Common\GenericCollection $tvResults
* @return $this
*/
public function setTvResults($tvResults)
{
$this->tvResults = $tvResults;
+
return $this;
}
@@ -90,5 +93,4 @@ public function getTvResults()
return $this->tvResults;
}
-
}
diff --git a/lib/Tmdb/Model/Genre.php b/lib/Tmdb/Model/Genre.php
index 44569c02..484ad4fc 100644
--- a/lib/Tmdb/Model/Genre.php
+++ b/lib/Tmdb/Model/Genre.php
@@ -16,8 +16,8 @@
* Class Genre
* @package Tmdb\Model
*/
-class Genre extends AbstractModel {
-
+class Genre extends AbstractModel
+{
private $id;
private $name;
@@ -27,12 +27,13 @@ class Genre extends AbstractModel {
);
/**
- * @param mixed $id
+ * @param mixed $id
* @return $this
*/
public function setId($id)
{
$this->id = (int) $id;
+
return $this;
}
@@ -45,12 +46,13 @@ public function getId()
}
/**
- * @param mixed $name
+ * @param mixed $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Image.php b/lib/Tmdb/Model/Image.php
index 28a77e4f..b1237257 100644
--- a/lib/Tmdb/Model/Image.php
+++ b/lib/Tmdb/Model/Image.php
@@ -19,8 +19,8 @@
* Class Image
* @package Tmdb\Model
*/
-class Image extends AbstractModel implements ImageFilter, LanguageFilter {
-
+class Image extends AbstractModel implements ImageFilter, LanguageFilter
+{
const FORMAT_POSTER = 'poster';
const FORMAT_BACKDROP = 'backdrop';
const FORMAT_PROFILE = 'profile';
@@ -70,12 +70,13 @@ public static function getTypeFromCollectionName($name)
}
/**
- * @param float $aspectRatio
+ * @param float $aspectRatio
* @return $this
*/
public function setAspectRatio($aspectRatio)
{
$this->aspectRatio = (float) $aspectRatio;
+
return $this;
}
@@ -88,12 +89,13 @@ public function getAspectRatio()
}
/**
- * @param mixed $filePath
+ * @param mixed $filePath
* @return $this
*/
public function setFilePath($filePath)
{
$this->filePath = $filePath;
+
return $this;
}
@@ -106,12 +108,13 @@ public function getFilePath()
}
/**
- * @param mixed $height
+ * @param mixed $height
* @return $this
*/
public function setHeight($height)
{
$this->height = (int) $height;
+
return $this;
}
@@ -124,12 +127,13 @@ public function getHeight()
}
/**
- * @param mixed $iso6391
+ * @param mixed $iso6391
* @return $this
*/
public function setIso6391($iso6391)
{
$this->iso6391 = $iso6391;
+
return $this;
}
@@ -142,12 +146,13 @@ public function getIso6391()
}
/**
- * @param float $voteAverage
+ * @param float $voteAverage
* @return $this
*/
public function setVoteAverage($voteAverage)
{
$this->voteAverage = (float) $voteAverage;
+
return $this;
}
@@ -160,12 +165,13 @@ public function getVoteAverage()
}
/**
- * @param int $voteCount
+ * @param int $voteCount
* @return $this
*/
public function setVoteCount($voteCount)
{
$this->voteCount = (int) $voteCount;
+
return $this;
}
@@ -178,12 +184,13 @@ public function getVoteCount()
}
/**
- * @param int $width
+ * @param int $width
* @return $this
*/
public function setWidth($width)
{
$this->width = (int) $width;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Job.php b/lib/Tmdb/Model/Job.php
index c7876538..310e37fb 100644
--- a/lib/Tmdb/Model/Job.php
+++ b/lib/Tmdb/Model/Job.php
@@ -16,8 +16,8 @@
* Class Job
* @package Tmdb\Model
*/
-class Job extends AbstractModel {
-
+class Job extends AbstractModel
+{
public static $_properties = array(
'department',
'job_list'
@@ -34,7 +34,7 @@ class Job extends AbstractModel {
private $jobList;
/**
- * @param string $department
+ * @param string $department
* @return $this
*/
public function setDepartment($department)
@@ -51,7 +51,7 @@ public function getDepartment()
}
/**
- * @param array $jobList
+ * @param array $jobList
* @return $this
*/
public function setJobList(array $jobList)
diff --git a/lib/Tmdb/Model/Keyword.php b/lib/Tmdb/Model/Keyword.php
index 7c2755f8..f6fb0323 100644
--- a/lib/Tmdb/Model/Keyword.php
+++ b/lib/Tmdb/Model/Keyword.php
@@ -16,8 +16,8 @@
* Class Keyword
* @package Tmdb\Model
*/
-class Keyword extends AbstractModel {
-
+class Keyword extends AbstractModel
+{
private $id;
private $name;
@@ -27,12 +27,13 @@ class Keyword extends AbstractModel {
);
/**
- * @param mixed $id
+ * @param mixed $id
* @return $this
*/
public function setId($id)
{
$this->id = (int) $id;
+
return $this;
}
@@ -45,12 +46,13 @@ public function getId()
}
/**
- * @param mixed $name
+ * @param mixed $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Lists.php b/lib/Tmdb/Model/Lists.php
index 722c31f3..8047e44a 100644
--- a/lib/Tmdb/Model/Lists.php
+++ b/lib/Tmdb/Model/Lists.php
@@ -19,8 +19,8 @@
* Class Lists
* @package Tmdb\Model
*/
-class Lists extends AbstractModel {
-
+class Lists extends AbstractModel
+{
/**
* @var string
*/
@@ -88,12 +88,13 @@ public function __construct()
}
/**
- * @param string $createdBy
+ * @param string $createdBy
* @return $this
*/
public function setCreatedBy($createdBy)
{
$this->createdBy = $createdBy;
+
return $this;
}
@@ -106,12 +107,13 @@ public function getCreatedBy()
}
/**
- * @param string $description
+ * @param string $description
* @return $this
*/
public function setDescription($description)
{
$this->description = $description;
+
return $this;
}
@@ -124,12 +126,13 @@ public function getDescription()
}
/**
- * @param int $favoriteCount
+ * @param int $favoriteCount
* @return $this
*/
public function setFavoriteCount($favoriteCount)
{
$this->favoriteCount = $favoriteCount;
+
return $this;
}
@@ -142,12 +145,13 @@ public function getFavoriteCount()
}
/**
- * @param string $id
+ * @param string $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
+
return $this;
}
@@ -160,12 +164,13 @@ public function getId()
}
/**
- * @param string $iso6391
+ * @param string $iso6391
* @return $this
*/
public function setIso6391($iso6391)
{
$this->iso6391 = $iso6391;
+
return $this;
}
@@ -178,12 +183,13 @@ public function getIso6391()
}
/**
- * @param int $itemCount
+ * @param int $itemCount
* @return $this
*/
public function setItemCount($itemCount)
{
$this->itemCount = $itemCount;
+
return $this;
}
@@ -196,12 +202,13 @@ public function getItemCount()
}
/**
- * @param \Tmdb\Model\Common\GenericCollection $items
+ * @param \Tmdb\Model\Common\GenericCollection $items
* @return $this
*/
public function setItems($items)
{
$this->items = $items;
+
return $this;
}
@@ -214,12 +221,13 @@ public function getItems()
}
/**
- * @param string $name
+ * @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
@@ -232,12 +240,13 @@ public function getName()
}
/**
- * @param \Tmdb\Model\Image\PosterImage $posterImage
+ * @param \Tmdb\Model\Image\PosterImage $posterImage
* @return $this
*/
public function setPosterImage($posterImage)
{
$this->posterImage = $posterImage;
+
return $this;
}
@@ -250,12 +259,13 @@ public function getPosterImage()
}
/**
- * @param string $posterPath
+ * @param string $posterPath
* @return $this
*/
public function setPosterPath($posterPath)
{
$this->posterPath = $posterPath;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Lists/ItemStatus.php b/lib/Tmdb/Model/Lists/ItemStatus.php
index 44187e05..79f5a614 100644
--- a/lib/Tmdb/Model/Lists/ItemStatus.php
+++ b/lib/Tmdb/Model/Lists/ItemStatus.php
@@ -18,7 +18,8 @@
* Class ItemStatus
* @package Tmdb\Model\Lists
*/
-class ItemStatus extends AbstractModel {
+class ItemStatus extends AbstractModel
+{
/**
* @var string
*/
@@ -38,12 +39,13 @@ class ItemStatus extends AbstractModel {
);
/**
- * @param string $id
+ * @param string $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
+
return $this;
}
@@ -56,12 +58,13 @@ public function getId()
}
/**
- * @param boolean $itemPresent
+ * @param boolean $itemPresent
* @return $this
*/
public function setItemPresent($itemPresent)
{
$this->itemPresent = $itemPresent;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Lists/ListItem.php b/lib/Tmdb/Model/Lists/ListItem.php
index fdc0a142..8591a93e 100644
--- a/lib/Tmdb/Model/Lists/ListItem.php
+++ b/lib/Tmdb/Model/Lists/ListItem.php
@@ -20,7 +20,8 @@
* Class ListItem
* @package Tmdb\Model\Lists
*/
-class ListItem extends AbstractModel {
+class ListItem extends AbstractModel
+{
/**
* @var string
*/
@@ -86,12 +87,13 @@ class ListItem extends AbstractModel {
);
/**
- * @param \Tmdb\Model\Image\BackdropImage $backdropImage
+ * @param \Tmdb\Model\Image\BackdropImage $backdropImage
* @return $this
*/
public function setBackdropImage($backdropImage)
{
$this->backdropImage = $backdropImage;
+
return $this;
}
@@ -104,12 +106,13 @@ public function getBackdropImage()
}
/**
- * @param string $backdropPath
+ * @param string $backdropPath
* @return $this
*/
public function setBackdropPath($backdropPath)
{
$this->backdropPath = $backdropPath;
+
return $this;
}
@@ -122,12 +125,13 @@ public function getBackdropPath()
}
/**
- * @param int $id
+ * @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
+
return $this;
}
@@ -140,12 +144,13 @@ public function getId()
}
/**
- * @param string $originalTitle
+ * @param string $originalTitle
* @return $this
*/
public function setOriginalTitle($originalTitle)
{
$this->originalTitle = $originalTitle;
+
return $this;
}
@@ -158,12 +163,13 @@ public function getOriginalTitle()
}
/**
- * @param \Tmdb\Model\Image\PosterImage $posterImage
+ * @param \Tmdb\Model\Image\PosterImage $posterImage
* @return $this
*/
public function setPosterImage($posterImage)
{
$this->posterImage = $posterImage;
+
return $this;
}
@@ -176,12 +182,13 @@ public function getPosterImage()
}
/**
- * @param string $posterPath
+ * @param string $posterPath
* @return $this
*/
public function setPosterPath($posterPath)
{
$this->posterPath = $posterPath;
+
return $this;
}
@@ -194,12 +201,13 @@ public function getPosterPath()
}
/**
- * @param \DateTime $releaseDate
+ * @param \DateTime $releaseDate
* @return $this
*/
public function setReleaseDate($releaseDate)
{
$this->releaseDate = $releaseDate;
+
return $this;
}
@@ -212,12 +220,13 @@ public function getReleaseDate()
}
/**
- * @param string $title
+ * @param string $title
* @return $this
*/
public function setTitle($title)
{
$this->title = $title;
+
return $this;
}
@@ -230,12 +239,13 @@ public function getTitle()
}
/**
- * @param float $voteAverage
+ * @param float $voteAverage
* @return $this
*/
public function setVoteAverage($voteAverage)
{
$this->voteAverage = $voteAverage;
+
return $this;
}
@@ -248,12 +258,13 @@ public function getVoteAverage()
}
/**
- * @param int $voteCount
+ * @param int $voteCount
* @return $this
*/
public function setVoteCount($voteCount)
{
$this->voteCount = $voteCount;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Lists/Result.php b/lib/Tmdb/Model/Lists/Result.php
index 814ed7d5..35a7ee71 100644
--- a/lib/Tmdb/Model/Lists/Result.php
+++ b/lib/Tmdb/Model/Lists/Result.php
@@ -18,7 +18,8 @@
* Class Result
* @package Tmdb\Model\Lists
*/
-class Result extends AbstractModel {
+class Result extends AbstractModel
+{
/**
* @var int
*/
@@ -38,12 +39,13 @@ class Result extends AbstractModel {
);
/**
- * @param int $statusCode
+ * @param int $statusCode
* @return $this
*/
public function setStatusCode($statusCode)
{
$this->statusCode = $statusCode;
+
return $this;
}
@@ -56,12 +58,13 @@ public function getStatusCode()
}
/**
- * @param string $statusMessage
+ * @param string $statusMessage
* @return $this
*/
public function setStatusMessage($statusMessage)
{
$this->statusMessage = $statusMessage;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Lists/ResultWithListId.php b/lib/Tmdb/Model/Lists/ResultWithListId.php
index 8048496c..113f6dd5 100644
--- a/lib/Tmdb/Model/Lists/ResultWithListId.php
+++ b/lib/Tmdb/Model/Lists/ResultWithListId.php
@@ -16,7 +16,8 @@
* Class ResultWithListId
* @package Tmdb\Model\Lists
*/
-class ResultWithListId extends Result {
+class ResultWithListId extends Result
+{
/**
* @var string
*/
@@ -32,12 +33,13 @@ class ResultWithListId extends Result {
);
/**
- * @param string $listId
+ * @param string $listId
* @return $this
*/
public function setListId($listId)
{
$this->listId = $listId;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Movie.php b/lib/Tmdb/Model/Movie.php
index 94622f4c..73151b03 100644
--- a/lib/Tmdb/Model/Movie.php
+++ b/lib/Tmdb/Model/Movie.php
@@ -17,7 +17,6 @@
use Tmdb\Model\Collection\CreditsCollection;
use Tmdb\Model\Collection\Genres;
use Tmdb\Model\Collection\Images;
-use Tmdb\Model\Collection\People;
use Tmdb\Model\Common\Country;
use Tmdb\Model\Common\SpokenLanguage;
use Tmdb\Model\Common\Translation;
@@ -28,7 +27,8 @@
* Class Movie
* @package Tmdb\Model
*/
-class Movie extends AbstractModel {
+class Movie extends AbstractModel
+{
/**
* @var bool
*/
@@ -266,12 +266,13 @@ public function __construct()
}
/**
- * @param boolean $adult
+ * @param boolean $adult
* @return $this
*/
public function setAdult($adult)
{
$this->adult = (bool) $adult;
+
return $this;
}
@@ -284,12 +285,13 @@ public function getAdult()
}
/**
- * @param mixed $backdropPath
+ * @param mixed $backdropPath
* @return $this
*/
public function setBackdropPath($backdropPath)
{
$this->backdropPath = $backdropPath;
+
return $this;
}
@@ -302,12 +304,13 @@ public function getBackdropPath()
}
/**
- * @param null $belongsToCollection
+ * @param null $belongsToCollection
* @return $this
*/
public function setBelongsToCollection($belongsToCollection)
{
$this->belongsToCollection = $belongsToCollection;
+
return $this;
}
@@ -320,12 +323,13 @@ public function getBelongsToCollection()
}
/**
- * @param GenericCollection $changes
+ * @param GenericCollection $changes
* @return $this
*/
public function setChanges(GenericCollection $changes)
{
$this->changes = $changes;
+
return $this;
}
@@ -338,12 +342,13 @@ public function getChanges()
}
/**
- * @param Genres $genres
+ * @param Genres $genres
* @return $this
*/
public function setGenres(Genres $genres)
{
$this->genres = $genres;
+
return $this;
}
@@ -356,12 +361,13 @@ public function getGenres()
}
/**
- * @param mixed $homepage
+ * @param mixed $homepage
* @return $this
*/
public function setHomepage($homepage)
{
$this->homepage = $homepage;
+
return $this;
}
@@ -374,12 +380,13 @@ public function getHomepage()
}
/**
- * @param mixed $id
+ * @param mixed $id
* @return $this
*/
public function setId($id)
{
$this->id = (int) $id;
+
return $this;
}
@@ -392,12 +399,13 @@ public function getId()
}
/**
- * @param Images $images
+ * @param Images $images
* @return $this
*/
public function setImages(Images $images)
{
$this->images = $images;
+
return $this;
}
@@ -410,12 +418,13 @@ public function getImages()
}
/**
- * @param mixed $imdbId
+ * @param mixed $imdbId
* @return $this
*/
public function setImdbId($imdbId)
{
$this->imdbId = $imdbId;
+
return $this;
}
@@ -428,12 +437,13 @@ public function getImdbId()
}
/**
- * @param mixed $originalTitle
+ * @param mixed $originalTitle
* @return $this
*/
public function setOriginalTitle($originalTitle)
{
$this->originalTitle = $originalTitle;
+
return $this;
}
@@ -446,12 +456,13 @@ public function getOriginalTitle()
}
/**
- * @param mixed $overview
+ * @param mixed $overview
* @return $this
*/
public function setOverview($overview)
{
$this->overview = $overview;
+
return $this;
}
@@ -464,12 +475,13 @@ public function getOverview()
}
/**
- * @param mixed $popularity
+ * @param mixed $popularity
* @return $this
*/
public function setPopularity($popularity)
{
$this->popularity = (float) $popularity;
+
return $this;
}
@@ -482,12 +494,13 @@ public function getPopularity()
}
/**
- * @param mixed $posterPath
+ * @param mixed $posterPath
* @return $this
*/
public function setPosterPath($posterPath)
{
$this->posterPath = $posterPath;
+
return $this;
}
@@ -500,12 +513,13 @@ public function getPosterPath()
}
/**
- * @param GenericCollection $productionCompanies
+ * @param GenericCollection $productionCompanies
* @return $this
*/
public function setProductionCompanies(GenericCollection $productionCompanies)
{
$this->productionCompanies = $productionCompanies;
+
return $this;
}
@@ -518,12 +532,13 @@ public function getProductionCompanies()
}
/**
- * @param GenericCollection $productionCountries
+ * @param GenericCollection $productionCountries
* @return $this
*/
public function setProductionCountries(GenericCollection $productionCountries)
{
$this->productionCountries = $productionCountries;
+
return $this;
}
@@ -536,7 +551,7 @@ public function getProductionCountries()
}
/**
- * @param string $releaseDate
+ * @param string $releaseDate
* @return $this
*/
public function setReleaseDate($releaseDate)
@@ -546,6 +561,7 @@ public function setReleaseDate($releaseDate)
}
$this->releaseDate = $releaseDate;
+
return $this;
}
@@ -558,12 +574,13 @@ public function getReleaseDate()
}
/**
- * @param mixed $revenue
+ * @param mixed $revenue
* @return $this
*/
public function setRevenue($revenue)
{
$this->revenue = (int) $revenue;
+
return $this;
}
@@ -576,12 +593,13 @@ public function getRevenue()
}
/**
- * @param mixed $runtime
+ * @param mixed $runtime
* @return $this
*/
public function setRuntime($runtime)
{
$this->runtime = (int) $runtime;
+
return $this;
}
@@ -594,12 +612,13 @@ public function getRuntime()
}
/**
- * @param GenericCollection $spokenLanguages
+ * @param GenericCollection $spokenLanguages
* @return $this
*/
public function setSpokenLanguages(GenericCollection $spokenLanguages)
{
$this->spokenLanguages = $spokenLanguages;
+
return $this;
}
@@ -612,12 +631,13 @@ public function getSpokenLanguages()
}
/**
- * @param mixed $status
+ * @param mixed $status
* @return $this
*/
public function setStatus($status)
{
$this->status = $status;
+
return $this;
}
@@ -630,12 +650,13 @@ public function getStatus()
}
/**
- * @param mixed $tagline
+ * @param mixed $tagline
* @return $this
*/
public function setTagline($tagline)
{
$this->tagline = $tagline;
+
return $this;
}
@@ -648,12 +669,13 @@ public function getTagline()
}
/**
- * @param mixed $title
+ * @param mixed $title
* @return $this
*/
public function setTitle($title)
{
$this->title = $title;
+
return $this;
}
@@ -666,12 +688,13 @@ public function getTitle()
}
/**
- * @param mixed $voteAverage
+ * @param mixed $voteAverage
* @return $this
*/
public function setVoteAverage($voteAverage)
{
$this->voteAverage = (float) $voteAverage;
+
return $this;
}
@@ -684,12 +707,13 @@ public function getVoteAverage()
}
/**
- * @param mixed $voteCount
+ * @param mixed $voteCount
* @return $this
*/
public function setVoteCount($voteCount)
{
$this->voteCount = (int) $voteCount;
+
return $this;
}
@@ -702,12 +726,13 @@ public function getVoteCount()
}
/**
- * @param GenericCollection $alternativeTitles
+ * @param GenericCollection $alternativeTitles
* @return $this
*/
public function setAlternativeTitles($alternativeTitles)
{
$this->alternativeTitles = $alternativeTitles;
+
return $this;
}
@@ -720,12 +745,13 @@ public function getAlternativeTitles()
}
/**
- * @param int $budget
+ * @param int $budget
* @return $this
*/
public function setBudget($budget)
{
$this->budget = $budget;
+
return $this;
}
@@ -738,12 +764,13 @@ public function getBudget()
}
/**
- * @param CreditsCollection $credits
+ * @param CreditsCollection $credits
* @return $this
*/
public function setCredits(CreditsCollection $credits)
{
$this->credits = $credits;
+
return $this;
}
@@ -756,12 +783,13 @@ public function getCredits()
}
/**
- * @param GenericCollection $keywords
+ * @param GenericCollection $keywords
* @return $this
*/
public function setKeywords($keywords)
{
$this->keywords = $keywords;
+
return $this;
}
@@ -774,12 +802,13 @@ public function getKeywords()
}
/**
- * @param GenericCollection $lists
+ * @param GenericCollection $lists
* @return $this
*/
public function setLists($lists)
{
$this->lists = $lists;
+
return $this;
}
@@ -792,12 +821,13 @@ public function getLists()
}
/**
- * @param GenericCollection $releases
+ * @param GenericCollection $releases
* @return $this
*/
public function setReleases(GenericCollection $releases)
{
$this->releases = $releases;
+
return $this;
}
@@ -810,12 +840,13 @@ public function getReleases()
}
/**
- * @param GenericCollection $similarMovies
+ * @param GenericCollection $similarMovies
* @return $this
*/
public function setSimilarMovies($similarMovies)
{
$this->similarMovies = $similarMovies;
+
return $this;
}
@@ -828,12 +859,13 @@ public function getSimilarMovies()
}
/**
- * @param GenericCollection $trailers
+ * @param GenericCollection $trailers
* @return $this
*/
public function setTrailers($trailers)
{
$this->trailers = $trailers;
+
return $this;
}
@@ -846,12 +878,13 @@ public function getTrailers()
}
/**
- * @param GenericCollection $translations
+ * @param GenericCollection $translations
* @return $this
*/
public function setTranslations($translations)
{
$this->translations = $translations;
+
return $this;
}
@@ -864,12 +897,13 @@ public function getTranslations()
}
/**
- * @param \Tmdb\Model\Image $backdrop
+ * @param \Tmdb\Model\Image $backdrop
* @return $this
*/
public function setBackdropImage($backdrop)
{
$this->backdrop = $backdrop;
+
return $this;
}
@@ -882,12 +916,13 @@ public function getBackdropImage()
}
/**
- * @param \Tmdb\Model\Image $poster
+ * @param \Tmdb\Model\Image $poster
* @return $this
*/
public function setPosterImage($poster)
{
$this->poster = $poster;
+
return $this;
}
@@ -900,12 +935,13 @@ public function getPosterImage()
}
/**
- * @param \Tmdb\Model\Collection\ResultCollection $reviews
+ * @param \Tmdb\Model\Collection\ResultCollection $reviews
* @return $this
*/
public function setReviews($reviews)
{
$this->reviews = $reviews;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Movie/AccountStates.php b/lib/Tmdb/Model/Movie/AccountStates.php
index 062011b2..d48b4e1b 100644
--- a/lib/Tmdb/Model/Movie/AccountStates.php
+++ b/lib/Tmdb/Model/Movie/AccountStates.php
@@ -18,8 +18,8 @@
* Class AccountStates
* @package Tmdb\Model\Movie
*/
-class AccountStates extends AbstractModel {
-
+class AccountStates extends AbstractModel
+{
/**
* @var integer
*/
@@ -47,12 +47,13 @@ class AccountStates extends AbstractModel {
);
/**
- * @param boolean $favorite
+ * @param boolean $favorite
* @return $this
*/
public function setFavorite($favorite)
{
$this->favorite = $favorite;
+
return $this;
}
@@ -65,12 +66,13 @@ public function getFavorite()
}
/**
- * @param int $id
+ * @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
+
return $this;
}
@@ -83,12 +85,13 @@ public function getId()
}
/**
- * @param \Tmdb\Model\Movie\Rating $rated
+ * @param \Tmdb\Model\Movie\Rating $rated
* @return $this
*/
public function setRated($rated)
{
$this->rated = $rated;
+
return $this;
}
@@ -101,12 +104,13 @@ public function getRated()
}
/**
- * @param boolean $watchlist
+ * @param boolean $watchlist
* @return $this
*/
public function setWatchlist($watchlist)
{
$this->watchlist = $watchlist;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Movie/AlternativeTitle.php b/lib/Tmdb/Model/Movie/AlternativeTitle.php
index d8b388df..4dbb0acf 100644
--- a/lib/Tmdb/Model/Movie/AlternativeTitle.php
+++ b/lib/Tmdb/Model/Movie/AlternativeTitle.php
@@ -19,8 +19,8 @@
* Class AlternativeTitle
* @package Tmdb\Model\Movie
*/
-class AlternativeTitle extends AbstractModel implements CountryFilter {
-
+class AlternativeTitle extends AbstractModel implements CountryFilter
+{
private $iso31661;
private $title;
@@ -30,12 +30,13 @@ class AlternativeTitle extends AbstractModel implements CountryFilter {
);
/**
- * @param string $iso31661
+ * @param string $iso31661
* @return $this
*/
public function setIso31661($iso31661)
{
$this->iso31661 = $iso31661;
+
return $this;
}
@@ -48,12 +49,13 @@ public function getIso31661()
}
/**
- * @param string $title
+ * @param string $title
* @return $this
*/
public function setTitle($title)
{
$this->title = $title;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Movie/ListItem.php b/lib/Tmdb/Model/Movie/ListItem.php
index 1eda953b..79e09680 100644
--- a/lib/Tmdb/Model/Movie/ListItem.php
+++ b/lib/Tmdb/Model/Movie/ListItem.php
@@ -19,8 +19,8 @@
* Class ListItem
* @package Tmdb\Model\Movie
*/
-class ListItem extends AbstractModel {
-
+class ListItem extends AbstractModel
+{
/**
* @var string
*/
@@ -72,12 +72,13 @@ class ListItem extends AbstractModel {
);
/**
- * @param string $description
+ * @param string $description
* @return $this
*/
public function setDescription($description)
{
$this->description = $description;
+
return $this;
}
@@ -90,12 +91,13 @@ public function getDescription()
}
/**
- * @param int $favoriteCount
+ * @param int $favoriteCount
* @return $this
*/
public function setFavoriteCount($favoriteCount)
{
$this->favoriteCount = $favoriteCount;
+
return $this;
}
@@ -108,12 +110,13 @@ public function getFavoriteCount()
}
/**
- * @param string $id
+ * @param string $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
+
return $this;
}
@@ -126,12 +129,13 @@ public function getId()
}
/**
- * @param string $iso6391
+ * @param string $iso6391
* @return $this
*/
public function setIso6391($iso6391)
{
$this->iso6391 = $iso6391;
+
return $this;
}
@@ -144,12 +148,13 @@ public function getIso6391()
}
/**
- * @param int $itemCount
+ * @param int $itemCount
* @return $this
*/
public function setItemCount($itemCount)
{
$this->itemCount = $itemCount;
+
return $this;
}
@@ -162,12 +167,13 @@ public function getItemCount()
}
/**
- * @param string $name
+ * @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
@@ -180,12 +186,13 @@ public function getName()
}
/**
- * @param \Tmdb\Model\Image\PosterImage $posterImage
+ * @param \Tmdb\Model\Image\PosterImage $posterImage
* @return $this
*/
public function setPosterImage($posterImage)
{
$this->posterImage = $posterImage;
+
return $this;
}
@@ -198,12 +205,13 @@ public function getPosterImage()
}
/**
- * @param string $posterPath
+ * @param string $posterPath
* @return $this
*/
public function setPosterPath($posterPath)
{
$this->posterPath = $posterPath;
+
return $this;
}
@@ -215,5 +223,4 @@ public function getPosterPath()
return $this->posterPath;
}
-
}
diff --git a/lib/Tmdb/Model/Movie/QueryParameter/AppendToResponse.php b/lib/Tmdb/Model/Movie/QueryParameter/AppendToResponse.php
index 532af7cc..433c6086 100644
--- a/lib/Tmdb/Model/Movie/QueryParameter/AppendToResponse.php
+++ b/lib/Tmdb/Model/Movie/QueryParameter/AppendToResponse.php
@@ -18,7 +18,8 @@
* Class AppendToResponse
* @package Tmdb\Model\Movie\QueryParameter
*/
-final class AppendToResponse extends BaseAppendToResponse {
+final class AppendToResponse extends BaseAppendToResponse
+{
const ALTERNATIVE_TITLES = 'alternative_titles';
const CREDITS = 'credits';
const IMAGES = 'images';
diff --git a/lib/Tmdb/Model/Movie/Rating.php b/lib/Tmdb/Model/Movie/Rating.php
index a9d11b9e..75e60e9b 100644
--- a/lib/Tmdb/Model/Movie/Rating.php
+++ b/lib/Tmdb/Model/Movie/Rating.php
@@ -18,8 +18,8 @@
* Class Rating
* @package Tmdb\Model\Movie
*/
-class Rating extends AbstractModel {
-
+class Rating extends AbstractModel
+{
/**
* @var float
*/
@@ -30,12 +30,13 @@ class Rating extends AbstractModel {
);
/**
- * @param float $value
+ * @param float $value
* @return $this
*/
public function setValue($value)
{
$this->value = $value;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Movie/Release.php b/lib/Tmdb/Model/Movie/Release.php
index 2b739301..28bbd902 100644
--- a/lib/Tmdb/Model/Movie/Release.php
+++ b/lib/Tmdb/Model/Movie/Release.php
@@ -19,8 +19,8 @@
* Class Release
* @package Tmdb\Model\Movie
*/
-class Release extends AbstractModel implements CountryFilter {
-
+class Release extends AbstractModel implements CountryFilter
+{
private $iso31661;
private $certification;
private $releaseDate;
@@ -32,12 +32,13 @@ class Release extends AbstractModel implements CountryFilter {
);
/**
- * @param mixed $certification
+ * @param mixed $certification
* @return $this
*/
public function setCertification($certification)
{
$this->certification = $certification;
+
return $this;
}
@@ -50,12 +51,13 @@ public function getCertification()
}
/**
- * @param string $iso31661
+ * @param string $iso31661
* @return $this
*/
public function setIso31661($iso31661)
{
$this->iso31661 = $iso31661;
+
return $this;
}
@@ -68,7 +70,7 @@ public function getIso31661()
}
/**
- * @param string|\DateTime $releaseDate
+ * @param string|\DateTime $releaseDate
* @return $this
*/
public function setReleaseDate($releaseDate)
@@ -78,6 +80,7 @@ public function setReleaseDate($releaseDate)
}
$this->releaseDate = $releaseDate;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Network.php b/lib/Tmdb/Model/Network.php
index db2f1d1e..cae40ecf 100644
--- a/lib/Tmdb/Model/Network.php
+++ b/lib/Tmdb/Model/Network.php
@@ -16,8 +16,8 @@
* Class Network
* @package Tmdb\Model
*/
-class Network extends AbstractModel {
-
+class Network extends AbstractModel
+{
private $id;
private $name;
@@ -27,12 +27,13 @@ class Network extends AbstractModel {
);
/**
- * @param mixed $id
+ * @param mixed $id
* @return $this
*/
public function setId($id)
{
$this->id = (int) $id;
+
return $this;
}
@@ -45,12 +46,13 @@ public function getId()
}
/**
- * @param mixed $name
+ * @param mixed $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Person.php b/lib/Tmdb/Model/Person.php
index ced88646..9aee9981 100644
--- a/lib/Tmdb/Model/Person.php
+++ b/lib/Tmdb/Model/Person.php
@@ -23,8 +23,8 @@
* Class Person
* @package Tmdb\Model
*/
-class Person extends AbstractModel implements PersonInterface {
-
+class Person extends AbstractModel implements PersonInterface
+{
/**
* @var bool
*/
@@ -147,12 +147,13 @@ public function __construct()
}
/**
- * @param mixed $adult
+ * @param mixed $adult
* @return $this
*/
public function setAdult($adult)
{
$this->adult = $adult;
+
return $this;
}
@@ -165,12 +166,13 @@ public function getAdult()
}
/**
- * @param mixed $alsoKnownAs
+ * @param mixed $alsoKnownAs
* @return $this
*/
public function setAlsoKnownAs($alsoKnownAs)
{
$this->alsoKnownAs = $alsoKnownAs;
+
return $this;
}
@@ -183,12 +185,13 @@ public function getAlsoKnownAs()
}
/**
- * @param mixed $biography
+ * @param mixed $biography
* @return $this
*/
public function setBiography($biography)
{
$this->biography = $biography;
+
return $this;
}
@@ -201,7 +204,7 @@ public function getBiography()
}
/**
- * @param mixed $birthday
+ * @param mixed $birthday
* @return $this
*/
public function setBirthday($birthday)
@@ -211,6 +214,7 @@ public function setBirthday($birthday)
}
$this->birthday = $birthday;
+
return $this;
}
@@ -223,12 +227,13 @@ public function getBirthday()
}
/**
- * @param mixed $changes
+ * @param mixed $changes
* @return $this
*/
public function setChanges($changes)
{
$this->changes = $changes;
+
return $this;
}
@@ -241,12 +246,13 @@ public function getChanges()
}
/**
- * @param mixed $credits
+ * @param mixed $credits
* @return $this
*/
public function setCredits($credits)
{
$this->credits = $credits;
+
return $this;
}
@@ -259,7 +265,7 @@ public function getCredits()
}
/**
- * @param mixed $deathday
+ * @param mixed $deathday
* @return $this
*/
public function setDeathday($deathday)
@@ -273,6 +279,7 @@ public function setDeathday($deathday)
}
$this->deathday = $deathday;
+
return $this;
}
@@ -285,12 +292,13 @@ public function getDeathday()
}
/**
- * @param mixed $homepage
+ * @param mixed $homepage
* @return $this
*/
public function setHomepage($homepage)
{
$this->homepage = $homepage;
+
return $this;
}
@@ -303,12 +311,13 @@ public function getHomepage()
}
/**
- * @param mixed $id
+ * @param mixed $id
* @return $this
*/
public function setId($id)
{
$this->id = (int) $id;
+
return $this;
}
@@ -321,12 +330,13 @@ public function getId()
}
/**
- * @param Images $images
+ * @param Images $images
* @return $this
*/
public function setImages($images)
{
$this->images = $images;
+
return $this;
}
@@ -339,12 +349,13 @@ public function getImages()
}
/**
- * @param mixed $name
+ * @param mixed $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
@@ -357,12 +368,13 @@ public function getName()
}
/**
- * @param mixed $placeOfBirth
+ * @param mixed $placeOfBirth
* @return $this
*/
public function setPlaceOfBirth($placeOfBirth)
{
$this->placeOfBirth = $placeOfBirth;
+
return $this;
}
@@ -375,12 +387,13 @@ public function getPlaceOfBirth()
}
/**
- * @param mixed $profilePath
+ * @param mixed $profilePath
* @return $this
*/
public function setProfilePath($profilePath)
{
$this->profilePath = $profilePath;
+
return $this;
}
@@ -393,12 +406,13 @@ public function getProfilePath()
}
/**
- * @param ProfileImage $profileImage
+ * @param ProfileImage $profileImage
* @return $this
*/
public function setProfileImage(ProfileImage $profileImage)
{
$this->profileImage = $profileImage;
+
return $this;
}
@@ -411,12 +425,13 @@ public function getProfileImage()
}
/**
- * @param \Tmdb\Model\Collection\CreditsCollection\CombinedCredits $combinedCredits
+ * @param \Tmdb\Model\Collection\CreditsCollection\CombinedCredits $combinedCredits
* @return $this
*/
public function setCombinedCredits($combinedCredits)
{
$this->combinedCredits = $combinedCredits;
+
return $this;
}
@@ -429,12 +444,13 @@ public function getCombinedCredits()
}
/**
- * @param \Tmdb\Model\Collection\CreditsCollection\MovieCredits $movieCredits
+ * @param \Tmdb\Model\Collection\CreditsCollection\MovieCredits $movieCredits
* @return $this
*/
public function setMovieCredits($movieCredits)
{
$this->movieCredits = $movieCredits;
+
return $this;
}
@@ -447,12 +463,13 @@ public function getMovieCredits()
}
/**
- * @param \Tmdb\Model\Collection\CreditsCollection\TvCredits $tvCredits
+ * @param \Tmdb\Model\Collection\CreditsCollection\TvCredits $tvCredits
* @return $this
*/
public function setTvCredits($tvCredits)
{
$this->tvCredits = $tvCredits;
+
return $this;
}
@@ -465,12 +482,13 @@ public function getTvCredits()
}
/**
- * @param \Tmdb\Model\Common\ExternalIds $externalIds
+ * @param \Tmdb\Model\Common\ExternalIds $externalIds
* @return $this
*/
public function setExternalIds($externalIds)
{
$this->externalIds = $externalIds;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Person/AbstractMember.php b/lib/Tmdb/Model/Person/AbstractMember.php
index 283c2af5..f6726820 100644
--- a/lib/Tmdb/Model/Person/AbstractMember.php
+++ b/lib/Tmdb/Model/Person/AbstractMember.php
@@ -19,8 +19,8 @@
* Class AbstractMember
* @package Tmdb\Model\Person
*/
-abstract class AbstractMember extends AbstractModel {
-
+abstract class AbstractMember extends AbstractModel
+{
/**
* @var int
*/
@@ -48,12 +48,13 @@ abstract class AbstractMember extends AbstractModel {
);
/**
- * @param mixed $id
+ * @param mixed $id
* @return $this
*/
public function setId($id)
{
$this->id = (int) $id;
+
return $this;
}
@@ -66,12 +67,13 @@ public function getId()
}
/**
- * @param mixed $name
+ * @param mixed $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
@@ -84,12 +86,13 @@ public function getName()
}
/**
- * @param mixed $profilePath
+ * @param mixed $profilePath
* @return $this
*/
public function setProfilePath($profilePath)
{
$this->profilePath = $profilePath;
+
return $this;
}
@@ -102,12 +105,13 @@ public function getProfilePath()
}
/**
- * @param Image\ProfileImage $profile
+ * @param Image\ProfileImage $profile
* @return $this
*/
public function setProfileImage($profile = null)
{
$this->profile = $profile;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Person/CastMember.php b/lib/Tmdb/Model/Person/CastMember.php
index bbf47e10..78d41d13 100644
--- a/lib/Tmdb/Model/Person/CastMember.php
+++ b/lib/Tmdb/Model/Person/CastMember.php
@@ -18,8 +18,8 @@
* Class CastMember
* @package Tmdb\Model\Person
*/
-class CastMember extends AbstractMember implements PersonInterface {
-
+class CastMember extends AbstractMember implements PersonInterface
+{
/**
* @var string
*/
@@ -45,12 +45,13 @@ class CastMember extends AbstractMember implements PersonInterface {
);
/**
- * @param mixed $character
+ * @param mixed $character
* @return $this
*/
public function setCharacter($character)
{
$this->character = $character;
+
return $this;
}
@@ -63,12 +64,13 @@ public function getCharacter()
}
/**
- * @param int $order
+ * @param int $order
* @return $this
*/
public function setOrder($order)
{
$this->order = (int) $order;
+
return $this;
}
@@ -81,12 +83,13 @@ public function getOrder()
}
/**
- * @param mixed $castId
+ * @param mixed $castId
* @return $this
*/
public function setCastId($castId)
{
$this->castId = (int) $castId;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Person/CrewMember.php b/lib/Tmdb/Model/Person/CrewMember.php
index 83b395a4..fc0bf915 100644
--- a/lib/Tmdb/Model/Person/CrewMember.php
+++ b/lib/Tmdb/Model/Person/CrewMember.php
@@ -18,8 +18,8 @@
* Class CrewMember
* @package Tmdb\Model\Person
*/
-class CrewMember extends AbstractMember implements PersonInterface {
-
+class CrewMember extends AbstractMember implements PersonInterface
+{
/**
* @var string
*/
@@ -39,12 +39,13 @@ class CrewMember extends AbstractMember implements PersonInterface {
);
/**
- * @param mixed $department
+ * @param mixed $department
* @return $this
*/
public function setDepartment($department)
{
$this->department = $department;
+
return $this;
}
@@ -57,12 +58,13 @@ public function getDepartment()
}
/**
- * @param mixed $job
+ * @param mixed $job
* @return $this
*/
public function setJob($job)
{
$this->job = $job;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Person/MovieCredit.php b/lib/Tmdb/Model/Person/MovieCredit.php
index afb232ea..8c97815d 100644
--- a/lib/Tmdb/Model/Person/MovieCredit.php
+++ b/lib/Tmdb/Model/Person/MovieCredit.php
@@ -19,8 +19,8 @@
* Class MovieCredit
* @package Tmdb\Model\Person
*/
-class MovieCredit extends AbstractModel {
-
+class MovieCredit extends AbstractModel
+{
/**
* @var bool
*/
@@ -78,12 +78,13 @@ class MovieCredit extends AbstractModel {
);
/**
- * @param boolean $adult
+ * @param boolean $adult
* @return $this
*/
public function setAdult($adult)
{
$this->adult = $adult;
+
return $this;
}
@@ -96,12 +97,13 @@ public function getAdult()
}
/**
- * @param string $character
+ * @param string $character
* @return $this
*/
public function setCharacter($character)
{
$this->character = $character;
+
return $this;
}
@@ -114,12 +116,13 @@ public function getCharacter()
}
/**
- * @param string $creditId
+ * @param string $creditId
* @return $this
*/
public function setCreditId($creditId)
{
$this->creditId = $creditId;
+
return $this;
}
@@ -132,12 +135,13 @@ public function getCreditId()
}
/**
- * @param int $id
+ * @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
+
return $this;
}
@@ -150,12 +154,13 @@ public function getId()
}
/**
- * @param string $originalTitle
+ * @param string $originalTitle
* @return $this
*/
public function setOriginalTitle($originalTitle)
{
$this->originalTitle = $originalTitle;
+
return $this;
}
@@ -168,12 +173,13 @@ public function getOriginalTitle()
}
/**
- * @param \Tmdb\Model\Image\PosterImage $posterImage
+ * @param \Tmdb\Model\Image\PosterImage $posterImage
* @return $this
*/
public function setPosterImage($posterImage)
{
$this->posterImage = $posterImage;
+
return $this;
}
@@ -186,12 +192,13 @@ public function getPosterImage()
}
/**
- * @param string $posterPath
+ * @param string $posterPath
* @return $this
*/
public function setPosterPath($posterPath)
{
$this->posterPath = $posterPath;
+
return $this;
}
@@ -204,7 +211,7 @@ public function getPosterPath()
}
/**
- * @param \DateTime $releaseDate
+ * @param \DateTime $releaseDate
* @return $this
*/
public function setReleaseDate($releaseDate)
@@ -214,6 +221,7 @@ public function setReleaseDate($releaseDate)
}
$this->releaseDate = $releaseDate;
+
return $this;
}
@@ -226,12 +234,13 @@ public function getReleaseDate()
}
/**
- * @param string $title
+ * @param string $title
* @return $this
*/
public function setTitle($title)
{
$this->title = $title;
+
return $this;
}
@@ -243,5 +252,4 @@ public function getTitle()
return $this->title;
}
-
}
diff --git a/lib/Tmdb/Model/Person/QueryParameter/AppendToResponse.php b/lib/Tmdb/Model/Person/QueryParameter/AppendToResponse.php
index 8d851d26..9ecb80c1 100644
--- a/lib/Tmdb/Model/Person/QueryParameter/AppendToResponse.php
+++ b/lib/Tmdb/Model/Person/QueryParameter/AppendToResponse.php
@@ -18,7 +18,8 @@
* Class AppendToResponse
* @package Tmdb\Model\Person\QueryParameter
*/
-final class AppendToResponse extends BaseAppendToResponse {
+final class AppendToResponse extends BaseAppendToResponse
+{
const MOVIE_CREDITS = 'movie_credits';
const TV_CREDITS = 'tv_credits';
const COMBINED_CREDITS = 'combined_credits';
diff --git a/lib/Tmdb/Model/Query/ChangesQuery.php b/lib/Tmdb/Model/Query/ChangesQuery.php
index 513593e9..886a047e 100644
--- a/lib/Tmdb/Model/Query/ChangesQuery.php
+++ b/lib/Tmdb/Model/Query/ChangesQuery.php
@@ -18,12 +18,12 @@
* Class ChangesQuery
* @package Tmdb\Model\Query
*/
-class ChangesQuery extends QueryParametersCollection {
-
+class ChangesQuery extends QueryParametersCollection
+{
/**
* Set the from parameter
*
- * @param \DateTime $date
+ * @param \DateTime $date
* @return $this
*/
public function from(\DateTime $date)
@@ -36,7 +36,7 @@ public function from(\DateTime $date)
/**
* Set the to parameter
*
- * @param \DateTime $date
+ * @param \DateTime $date
* @return $this
*/
public function to(\DateTime $date)
@@ -49,10 +49,11 @@ public function to(\DateTime $date)
/**
* Set the page parameter
*
- * @param int $page
+ * @param int $page
* @return $this
*/
- public function page($page = 1) {
+ public function page($page = 1)
+ {
$this->set('page', (int) $page);
return $this;
diff --git a/lib/Tmdb/Model/Query/Discover/DiscoverMoviesQuery.php b/lib/Tmdb/Model/Query/Discover/DiscoverMoviesQuery.php
index 68b3b6eb..0ab1369b 100644
--- a/lib/Tmdb/Model/Query/Discover/DiscoverMoviesQuery.php
+++ b/lib/Tmdb/Model/Query/Discover/DiscoverMoviesQuery.php
@@ -18,11 +18,12 @@
* Class DiscoverMoviesQuery
* @package Tmdb\Model\Query\Discover
*/
-class DiscoverMoviesQuery extends QueryParametersCollection {
+class DiscoverMoviesQuery extends QueryParametersCollection
+{
/**
* Minimum value is 1, expected value is an integer.
*
- * @param integer $page
+ * @param integer $page
* @return $this
*/
public function page($page = 1)
@@ -35,7 +36,7 @@ public function page($page = 1)
/**
* ISO 639-1 code.
*
- * @param string $language
+ * @param string $language
* @return $this
*/
public function language($language)
@@ -48,7 +49,7 @@ public function language($language)
/**
* Available options are vote_average.desc, vote_average.asc, release_date.desc, release_date.asc, popularity.desc, popularity.asc
*
- * @param string $option
+ * @param string $option
* @return $this
*/
public function sortBy($option)
@@ -61,7 +62,7 @@ public function sortBy($option)
/**
* Toggle the inclusion of adult titles. Expected value is a boolean, true or false
*
- * @param boolean $allow
+ * @param boolean $allow
* @return $this
*/
public function includeAdult($allow = true)
@@ -74,7 +75,7 @@ public function includeAdult($allow = true)
/**
* Filter the results release dates to matches that include this value. Expected value is a year.
*
- * @param \DateTime|integer $year
+ * @param \DateTime|integer $year
* @return $this
*/
public function year($year)
@@ -91,7 +92,7 @@ public function year($year)
/**
* Filter the results so that only the primary release date year has this value. Expected value is a year.
*
- * @param \DateTime|integer $year
+ * @param \DateTime|integer $year
* @return $this
*/
public function primaryReleaseYear($year)
@@ -108,7 +109,7 @@ 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.
*
- * @param integer $count
+ * @param integer $count
* @return $this
*/
public function voteCountGte($count)
@@ -121,7 +122,7 @@ 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.
*
- * @param float $average
+ * @param float $average
* @return $this
*/
public function voteAverageGte($average)
@@ -139,7 +140,7 @@ public function voteAverageGte($average)
*
* If an array is supplied this defaults to an AND query
*
- * @param array|string $genres
+ * @param array|string $genres
* @return $this
*/
public function withGenres($genres)
@@ -156,7 +157,7 @@ public function withGenres($genres)
/**
* Creates an or query for genres
*
- * @param array $genres
+ * @param array $genres
* @return $this
*/
public function withGenresOr(array $genres = array())
@@ -169,7 +170,7 @@ public function withGenresOr(array $genres = array())
/**
* Creates an and query for genres
*
- * @param array $genres
+ * @param array $genres
* @return $this
*/
public function withGenresAnd(array $genres = array())
@@ -182,7 +183,7 @@ public function withGenresAnd(array $genres = array())
/**
* The minimum release to include.
*
- * @param \DateTime|string $date
+ * @param \DateTime|string $date
* @return $this
*/
public function releaseDateGte($date)
@@ -199,7 +200,7 @@ public function releaseDateGte($date)
/**
* The maximum release to include.
*
- * @param \DateTime $date
+ * @param \DateTime $date
* @return $this
*/
public function releaseDateLte(\DateTime $date)
@@ -218,7 +219,7 @@ public function releaseDateLte(\DateTime $date)
*
* When this value is specified, 'certification.lte' is required. A ISO 3166-1 is expected.
*
- * @param string $country
+ * @param string $country
* @return $this
*/
public function certificationCountry($country)
@@ -233,7 +234,7 @@ public function certificationCountry($country)
*
* Expected value is a valid certification for the specificed 'certification_country'.
*
- * @param mixed $value
+ * @param mixed $value
* @return $this
*/
public function certificationLte($value)
@@ -249,7 +250,7 @@ public function certificationLte($value)
* Expected value is an integer (the id of a company).
* They can be comma separated to indicate an 'AND' query.
*
- * @param array|string $companies
+ * @param array|string $companies
* @return $this
*/
public function withCompanies($companies)
@@ -266,7 +267,7 @@ public function withCompanies($companies)
/**
* Creates an and query for companies
*
- * @param array $companies
+ * @param array $companies
* @return $this
*/
public function withCompaniesAnd(array $companies = array())
diff --git a/lib/Tmdb/Model/Query/Discover/DiscoverTvQuery.php b/lib/Tmdb/Model/Query/Discover/DiscoverTvQuery.php
index 6066e637..46660b35 100644
--- a/lib/Tmdb/Model/Query/Discover/DiscoverTvQuery.php
+++ b/lib/Tmdb/Model/Query/Discover/DiscoverTvQuery.php
@@ -18,11 +18,12 @@
* Class DiscoverTvQuery
* @package Tmdb\Model\Query\Discover
*/
-class DiscoverTvQuery extends QueryParametersCollection {
+class DiscoverTvQuery extends QueryParametersCollection
+{
/**
* Minimum value is 1, expected value is an integer.
*
- * @param integer $page
+ * @param integer $page
* @return $this
*/
public function page($page = 1)
@@ -35,7 +36,7 @@ public function page($page = 1)
/**
* ISO 639-1 code.
*
- * @param string $language
+ * @param string $language
* @return $this
*/
public function language($language)
@@ -48,7 +49,7 @@ 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
*
- * @param string $option
+ * @param string $option
* @return $this
*/
public function sortBy($option)
@@ -61,7 +62,7 @@ public function sortBy($option)
/**
* Filter the results release dates to matches that include this value. Expected value is a year.
*
- * @param \DateTime|integer $year
+ * @param \DateTime|integer $year
* @return $this
*/
public function firstAirDateYear($year)
@@ -78,7 +79,7 @@ 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.
*
- * @param integer $count
+ * @param integer $count
* @return $this
*/
public function voteCountGte($count)
@@ -91,7 +92,7 @@ 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.
*
- * @param float $average
+ * @param float $average
* @return $this
*/
public function voteAverageGte($average)
@@ -107,7 +108,7 @@ public function voteAverageGte($average)
* Multiple values can be specified.
* Comma separated indicates an 'AND' query, while a pipe (|) separated value indicates an 'OR'.
*
- * @param array|string $genres
+ * @param array|string $genres
* @return $this
*/
public function withGenres($genres)
@@ -124,7 +125,7 @@ public function withGenres($genres)
/**
* Creates an OR query for genres
*
- * @param array $genres
+ * @param array $genres
* @return $this
*/
public function withGenresOr(array $genres = array())
@@ -137,7 +138,7 @@ public function withGenresOr(array $genres = array())
/**
* Creates an AND query for genres
*
- * @param array $genres
+ * @param array $genres
* @return $this
*/
public function withGenresAnd(array $genres = array())
@@ -150,7 +151,7 @@ public function withGenresAnd(array $genres = array())
/**
* The minimum release to include. Expected format is YYYY-MM-DD.
*
- * @param \DateTime|string $date
+ * @param \DateTime|string $date
* @return $this
*/
public function firstAirDateGte($date)
@@ -167,7 +168,7 @@ public function firstAirDateGte($date)
/**
* The maximum release to include. Expected format is YYYY-MM-DD.
*
- * @param \DateTime|string $date
+ * @param \DateTime|string $date
* @return $this
*/
public function firstAirDateLte($date)
@@ -181,7 +182,6 @@ public function firstAirDateLte($date)
return $this;
}
-
/**
* Filter TV shows to include a specific network.
*
@@ -190,7 +190,7 @@ public function firstAirDateLte($date)
* Expected value is an integer (the id of a company).
* They can be comma separated to indicate an 'AND' query.
*
- * @param array|string $networks
+ * @param array|string $networks
* @return $this
*/
public function withNetworks($networks)
@@ -207,7 +207,7 @@ public function withNetworks($networks)
/**
* Creates an and query for networks
*
- * @param array $networks
+ * @param array $networks
* @return $this
*/
public function withNetworksAnd(array $networks = array())
diff --git a/lib/Tmdb/Model/Query/FindQuery.php b/lib/Tmdb/Model/Query/FindQuery.php
index eadfdc2b..c48ba393 100644
--- a/lib/Tmdb/Model/Query/FindQuery.php
+++ b/lib/Tmdb/Model/Query/FindQuery.php
@@ -19,6 +19,6 @@
* Class FindQuery
* @package Tmdb\Model\Query
*/
-class FindQuery extends QueryParametersCollection {
-
+class FindQuery extends QueryParametersCollection
+{
}
diff --git a/lib/Tmdb/Model/Review.php b/lib/Tmdb/Model/Review.php
index f56e2f89..44371245 100644
--- a/lib/Tmdb/Model/Review.php
+++ b/lib/Tmdb/Model/Review.php
@@ -16,8 +16,8 @@
* Class Review
* @package Tmdb\Model
*/
-class Review extends AbstractModel {
-
+class Review extends AbstractModel
+{
private $id;
private $author;
private $content;
@@ -39,12 +39,13 @@ class Review extends AbstractModel {
);
/**
- * @param mixed $author
+ * @param mixed $author
* @return $this
*/
public function setAuthor($author)
{
$this->author = $author;
+
return $this;
}
@@ -57,12 +58,13 @@ public function getAuthor()
}
/**
- * @param mixed $content
+ * @param mixed $content
* @return $this
*/
public function setContent($content)
{
$this->content = $content;
+
return $this;
}
@@ -75,12 +77,13 @@ public function getContent()
}
/**
- * @param mixed $id
+ * @param mixed $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
+
return $this;
}
@@ -93,12 +96,13 @@ public function getId()
}
/**
- * @param mixed $iso6391
+ * @param mixed $iso6391
* @return $this
*/
public function setIso6391($iso6391)
{
$this->iso6391 = $iso6391;
+
return $this;
}
@@ -111,12 +115,13 @@ public function getIso6391()
}
/**
- * @param mixed $mediaId
+ * @param mixed $mediaId
* @return $this
*/
public function setMediaId($mediaId)
{
$this->mediaId = $mediaId;
+
return $this;
}
@@ -129,12 +134,13 @@ public function getMediaId()
}
/**
- * @param mixed $mediaTitle
+ * @param mixed $mediaTitle
* @return $this
*/
public function setMediaTitle($mediaTitle)
{
$this->mediaTitle = $mediaTitle;
+
return $this;
}
@@ -147,12 +153,13 @@ public function getMediaTitle()
}
/**
- * @param mixed $mediaType
+ * @param mixed $mediaType
* @return $this
*/
public function setMediaType($mediaType)
{
$this->mediaType = $mediaType;
+
return $this;
}
@@ -165,12 +172,13 @@ public function getMediaType()
}
/**
- * @param mixed $url
+ * @param mixed $url
* @return $this
*/
public function setUrl($url)
{
$this->url = $url;
+
return $this;
}
@@ -182,5 +190,4 @@ public function getUrl()
return $this->url;
}
-
}
diff --git a/lib/Tmdb/Model/Search/SearchQuery.php b/lib/Tmdb/Model/Search/SearchQuery.php
index e32b95f8..1dcb94ce 100644
--- a/lib/Tmdb/Model/Search/SearchQuery.php
+++ b/lib/Tmdb/Model/Search/SearchQuery.php
@@ -18,7 +18,8 @@
* Class SearchQuery
* @package Tmdb\Model\Search
*/
-class SearchQuery extends QueryParametersCollection {
+class SearchQuery extends QueryParametersCollection
+{
/**
* CGI escaped string
*
diff --git a/lib/Tmdb/Model/Search/SearchQuery/CollectionSearchQuery.php b/lib/Tmdb/Model/Search/SearchQuery/CollectionSearchQuery.php
index db513d7f..5de738d8 100644
--- a/lib/Tmdb/Model/Search/SearchQuery/CollectionSearchQuery.php
+++ b/lib/Tmdb/Model/Search/SearchQuery/CollectionSearchQuery.php
@@ -18,7 +18,8 @@
* Class CollectionSearchQuery
* @package Tmdb\Model\Search\SearchQuery
*/
-class CollectionSearchQuery extends SearchQuery {
+class CollectionSearchQuery extends SearchQuery
+{
/**
* ISO 639-1 code.
*
diff --git a/lib/Tmdb/Model/Search/SearchQuery/ListSearchQuery.php b/lib/Tmdb/Model/Search/SearchQuery/ListSearchQuery.php
index 05206313..28ddb761 100644
--- a/lib/Tmdb/Model/Search/SearchQuery/ListSearchQuery.php
+++ b/lib/Tmdb/Model/Search/SearchQuery/ListSearchQuery.php
@@ -18,8 +18,8 @@
* Class ListSearchQuery
* @package Tmdb\Model\Search\SearchQuery
*/
-class ListSearchQuery extends SearchQuery {
-
+class ListSearchQuery extends SearchQuery
+{
/**
* Toggle the inclusion of adult titles. Expected value is: true or false
*
diff --git a/lib/Tmdb/Model/Search/SearchQuery/MovieSearchQuery.php b/lib/Tmdb/Model/Search/SearchQuery/MovieSearchQuery.php
index 58fc7e0b..7ebe7f82 100644
--- a/lib/Tmdb/Model/Search/SearchQuery/MovieSearchQuery.php
+++ b/lib/Tmdb/Model/Search/SearchQuery/MovieSearchQuery.php
@@ -18,7 +18,8 @@
* Class MovieSearchQuery
* @package Tmdb\Model\Search\SearchQuery
*/
-class MovieSearchQuery extends SearchQuery {
+class MovieSearchQuery extends SearchQuery
+{
/**
* ISO 639-1 code.
*
diff --git a/lib/Tmdb/Model/Search/SearchQuery/PersonSearchQuery.php b/lib/Tmdb/Model/Search/SearchQuery/PersonSearchQuery.php
index ab86ffa6..4402bce5 100644
--- a/lib/Tmdb/Model/Search/SearchQuery/PersonSearchQuery.php
+++ b/lib/Tmdb/Model/Search/SearchQuery/PersonSearchQuery.php
@@ -18,8 +18,8 @@
* Class PersonSearchQuery
* @package Tmdb\Model\Search\SearchQuery
*/
-class PersonSearchQuery extends SearchQuery {
-
+class PersonSearchQuery extends SearchQuery
+{
/**
* Toggle the inclusion of adult titles. Expected value is: true or false
*
diff --git a/lib/Tmdb/Model/Search/SearchQuery/TvSearchQuery.php b/lib/Tmdb/Model/Search/SearchQuery/TvSearchQuery.php
index d8863425..8e2cf30f 100644
--- a/lib/Tmdb/Model/Search/SearchQuery/TvSearchQuery.php
+++ b/lib/Tmdb/Model/Search/SearchQuery/TvSearchQuery.php
@@ -18,7 +18,8 @@
* Class TvSearchQuery
* @package Tmdb\Model\Search\SearchQuery
*/
-class TvSearchQuery extends SearchQuery {
+class TvSearchQuery extends SearchQuery
+{
/**
* ISO 639-1 code.
*
diff --git a/lib/Tmdb/Model/Tv.php b/lib/Tmdb/Model/Tv.php
index ac18ad9f..1bec3145 100644
--- a/lib/Tmdb/Model/Tv.php
+++ b/lib/Tmdb/Model/Tv.php
@@ -25,8 +25,8 @@
* Class Tv
* @package Tmdb\Model
*/
-class Tv extends AbstractModel {
-
+class Tv extends AbstractModel
+{
/**
* @var Image
*/
@@ -232,12 +232,13 @@ public function __construct()
}
/**
- * @param string $backdropPath
+ * @param string $backdropPath
* @return $this
*/
public function setBackdropPath($backdropPath)
{
$this->backdropPath = $backdropPath;
+
return $this;
}
@@ -250,12 +251,13 @@ public function getBackdropPath()
}
/**
- * @param \Tmdb\Model\Common\Collection $createdBy
+ * @param \Tmdb\Model\Common\Collection $createdBy
* @return $this
*/
public function setCreatedBy($createdBy)
{
$this->createdBy = $createdBy;
+
return $this;
}
@@ -268,12 +270,13 @@ public function getCreatedBy()
}
/**
- * @param array $episodeRunTime
+ * @param array $episodeRunTime
* @return $this
*/
public function setEpisodeRunTime($episodeRunTime)
{
$this->episodeRunTime = $episodeRunTime;
+
return $this;
}
@@ -286,7 +289,7 @@ public function getEpisodeRunTime()
}
/**
- * @param \DateTime $firstAirDate
+ * @param \DateTime $firstAirDate
* @return $this
*/
public function setFirstAirDate($firstAirDate)
@@ -296,6 +299,7 @@ public function setFirstAirDate($firstAirDate)
}
$this->firstAirDate = $firstAirDate;
+
return $this;
}
@@ -308,12 +312,13 @@ public function getFirstAirDate()
}
/**
- * @param \Tmdb\Model\Collection\Genres $genres
+ * @param \Tmdb\Model\Collection\Genres $genres
* @return $this
*/
public function setGenres($genres)
{
$this->genres = $genres;
+
return $this;
}
@@ -326,12 +331,13 @@ public function getGenres()
}
/**
- * @param string $homepage
+ * @param string $homepage
* @return $this
*/
public function setHomepage($homepage)
{
$this->homepage = $homepage;
+
return $this;
}
@@ -344,12 +350,13 @@ public function getHomepage()
}
/**
- * @param int $id
+ * @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = (int) $id;
+
return $this;
}
@@ -362,12 +369,13 @@ public function getId()
}
/**
- * @param boolean $inProduction
+ * @param boolean $inProduction
* @return $this
*/
public function setInProduction($inProduction)
{
$this->inProduction = $inProduction;
+
return $this;
}
@@ -380,12 +388,13 @@ public function getInProduction()
}
/**
- * @param array $languages
+ * @param array $languages
* @return $this
*/
public function setLanguages($languages)
{
$this->languages = $languages;
+
return $this;
}
@@ -398,7 +407,7 @@ public function getLanguages()
}
/**
- * @param string $lastAirDate
+ * @param string $lastAirDate
* @return $this
*/
public function setLastAirDate($lastAirDate)
@@ -408,6 +417,7 @@ public function setLastAirDate($lastAirDate)
}
$this->lastAirDate = $lastAirDate;
+
return $this;
}
@@ -420,12 +430,13 @@ public function getLastAirDate()
}
/**
- * @param string $name
+ * @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
@@ -438,12 +449,13 @@ public function getName()
}
/**
- * @param GenericCollection $networks
+ * @param GenericCollection $networks
* @return $this
*/
public function setNetworks($networks)
{
$this->networks = $networks;
+
return $this;
}
@@ -456,12 +468,13 @@ public function getNetworks()
}
/**
- * @param int $numberOfEpisodes
+ * @param int $numberOfEpisodes
* @return $this
*/
public function setNumberOfEpisodes($numberOfEpisodes)
{
$this->numberOfEpisodes = (int) $numberOfEpisodes;
+
return $this;
}
@@ -474,12 +487,13 @@ public function getNumberOfEpisodes()
}
/**
- * @param int $numberOfSeasons
+ * @param int $numberOfSeasons
* @return $this
*/
public function setNumberOfSeasons($numberOfSeasons)
{
$this->numberOfSeasons = (int) $numberOfSeasons;
+
return $this;
}
@@ -492,12 +506,13 @@ public function getNumberOfSeasons()
}
/**
- * @param \Tmdb\Model\Common\Collection $originCountry
+ * @param \Tmdb\Model\Common\Collection $originCountry
* @return $this
*/
public function setOriginCountry($originCountry)
{
$this->originCountry = $originCountry;
+
return $this;
}
@@ -510,12 +525,13 @@ public function getOriginCountry()
}
/**
- * @param string $originalName
+ * @param string $originalName
* @return $this
*/
public function setOriginalName($originalName)
{
$this->originalName = $originalName;
+
return $this;
}
@@ -528,12 +544,13 @@ public function getOriginalName()
}
/**
- * @param string $overview
+ * @param string $overview
* @return $this
*/
public function setOverview($overview)
{
$this->overview = $overview;
+
return $this;
}
@@ -546,12 +563,13 @@ public function getOverview()
}
/**
- * @param float $popularity
+ * @param float $popularity
* @return $this
*/
public function setPopularity($popularity)
{
$this->popularity = (float) $popularity;
+
return $this;
}
@@ -564,12 +582,13 @@ public function getPopularity()
}
/**
- * @param string $posterPath
+ * @param string $posterPath
* @return $this
*/
public function setPosterPath($posterPath)
{
$this->posterPath = $posterPath;
+
return $this;
}
@@ -582,12 +601,13 @@ public function getPosterPath()
}
/**
- * @param GenericCollection $seasons
+ * @param GenericCollection $seasons
* @return $this
*/
public function setSeasons($seasons)
{
$this->seasons = $seasons;
+
return $this;
}
@@ -600,12 +620,13 @@ public function getSeasons()
}
/**
- * @param string $status
+ * @param string $status
* @return $this
*/
public function setStatus($status)
{
$this->status = $status;
+
return $this;
}
@@ -618,12 +639,13 @@ public function getStatus()
}
/**
- * @param float $voteAverage
+ * @param float $voteAverage
* @return $this
*/
public function setVoteAverage($voteAverage)
{
$this->voteAverage = (float) $voteAverage;
+
return $this;
}
@@ -636,12 +658,13 @@ public function getVoteAverage()
}
/**
- * @param int $voteCount
+ * @param int $voteCount
* @return $this
*/
public function setVoteCount($voteCount)
{
$this->voteCount = (int) $voteCount;
+
return $this;
}
@@ -654,12 +677,13 @@ public function getVoteCount()
}
/**
- * @param GenericCollection $translations
+ * @param GenericCollection $translations
* @return $this
*/
public function setTranslations($translations)
{
$this->translations = $translations;
+
return $this;
}
@@ -672,12 +696,13 @@ public function getTranslations()
}
/**
- * @param \Tmdb\Model\Collection\Images $images
+ * @param \Tmdb\Model\Collection\Images $images
* @return $this
*/
public function setImages($images)
{
$this->images = $images;
+
return $this;
}
@@ -690,12 +715,13 @@ public function getImages()
}
/**
- * @param \Tmdb\Model\Common\ExternalIds $externalIds
+ * @param \Tmdb\Model\Common\ExternalIds $externalIds
* @return $this
*/
public function setExternalIds($externalIds)
{
$this->externalIds = $externalIds;
+
return $this;
}
@@ -708,12 +734,13 @@ public function getExternalIds()
}
/**
- * @param \Tmdb\Model\Collection\CreditsCollection $credits
+ * @param \Tmdb\Model\Collection\CreditsCollection $credits
* @return $this
*/
public function setCredits($credits)
{
$this->credits = $credits;
+
return $this;
}
@@ -726,12 +753,13 @@ public function getCredits()
}
/**
- * @param \Tmdb\Model\Image\BackdropImage $backdrop
+ * @param \Tmdb\Model\Image\BackdropImage $backdrop
* @return $this
*/
public function setBackdropImage(BackdropImage $backdrop)
{
$this->backdrop = $backdrop;
+
return $this;
}
@@ -744,12 +772,13 @@ public function getBackdropImage()
}
/**
- * @param \Tmdb\Model\Image\PosterImage $poster
+ * @param \Tmdb\Model\Image\PosterImage $poster
* @return $this
*/
public function setPosterImage(PosterImage $poster)
{
$this->poster = $poster;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Tv/Episode.php b/lib/Tmdb/Model/Tv/Episode.php
index 1a4b5e64..4815ca1d 100644
--- a/lib/Tmdb/Model/Tv/Episode.php
+++ b/lib/Tmdb/Model/Tv/Episode.php
@@ -22,8 +22,8 @@
* Class Episode
* @package Tmdb\Model\Tv
*/
-class Episode extends AbstractModel {
-
+class Episode extends AbstractModel
+{
/**
* @var \DateTime
*/
@@ -100,7 +100,6 @@ class Episode extends AbstractModel {
*/
protected $still;
-
/**
* Properties that are available in the API
*
@@ -132,7 +131,7 @@ public function __construct()
}
/**
- * @param \DateTime $airDate
+ * @param \DateTime $airDate
* @return $this
*/
public function setAirDate($airDate)
@@ -142,6 +141,7 @@ public function setAirDate($airDate)
}
$this->airDate = $airDate;
+
return $this;
}
@@ -154,12 +154,13 @@ public function getAirDate()
}
/**
- * @param int $episodeNumber
+ * @param int $episodeNumber
* @return $this
*/
public function setEpisodeNumber($episodeNumber)
{
$this->episodeNumber = (int) $episodeNumber;
+
return $this;
}
@@ -172,12 +173,13 @@ public function getEpisodeNumber()
}
/**
- * @param int $id
+ * @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = (int) $id;
+
return $this;
}
@@ -190,12 +192,13 @@ public function getId()
}
/**
- * @param string $name
+ * @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
@@ -208,12 +211,13 @@ public function getName()
}
/**
- * @param string $overview
+ * @param string $overview
* @return $this
*/
public function setOverview($overview)
{
$this->overview = $overview;
+
return $this;
}
@@ -226,12 +230,13 @@ public function getOverview()
}
/**
- * @param string $productionCode
+ * @param string $productionCode
* @return $this
*/
public function setProductionCode($productionCode)
{
$this->productionCode = $productionCode;
+
return $this;
}
@@ -244,12 +249,13 @@ public function getProductionCode()
}
/**
- * @param int $seasonNumber
+ * @param int $seasonNumber
* @return $this
*/
public function setSeasonNumber($seasonNumber)
{
$this->seasonNumber = (int) $seasonNumber;
+
return $this;
}
@@ -262,12 +268,13 @@ public function getSeasonNumber()
}
/**
- * @param string $stillPath
+ * @param string $stillPath
* @return $this
*/
public function setStillPath($stillPath)
{
$this->stillPath = $stillPath;
+
return $this;
}
@@ -280,12 +287,13 @@ public function getStillPath()
}
/**
- * @param float $voteAverage
+ * @param float $voteAverage
* @return $this
*/
public function setVoteAverage($voteAverage)
{
$this->voteAverage = (float) $voteAverage;
+
return $this;
}
@@ -298,12 +306,13 @@ public function getVoteAverage()
}
/**
- * @param int $voteCount
+ * @param int $voteCount
* @return $this
*/
public function setVoteCount($voteCount)
{
$this->voteCount = (int) $voteCount;
+
return $this;
}
@@ -316,12 +325,13 @@ public function getVoteCount()
}
/**
- * @param Credits $credits
+ * @param Credits $credits
* @return $this
*/
public function setCredits($credits)
{
$this->credits = $credits;
+
return $this;
}
@@ -334,12 +344,13 @@ public function getCredits()
}
/**
- * @param ExternalIds $externalIds
+ * @param ExternalIds $externalIds
* @return $this
*/
public function setExternalIds($externalIds)
{
$this->externalIds = $externalIds;
+
return $this;
}
@@ -352,12 +363,13 @@ public function getExternalIds()
}
/**
- * @param Images $images
+ * @param Images $images
* @return $this
*/
public function setImages($images)
{
$this->images = $images;
+
return $this;
}
@@ -370,12 +382,13 @@ public function getImages()
}
/**
- * @param StillImage $still
+ * @param StillImage $still
* @return $this
*/
public function setStillImage($still)
{
$this->still = $still;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Tv/Episode/QueryParameter/AppendToResponse.php b/lib/Tmdb/Model/Tv/Episode/QueryParameter/AppendToResponse.php
index 80815631..9db230a3 100644
--- a/lib/Tmdb/Model/Tv/Episode/QueryParameter/AppendToResponse.php
+++ b/lib/Tmdb/Model/Tv/Episode/QueryParameter/AppendToResponse.php
@@ -18,7 +18,8 @@
* Class AppendToResponse
* @package Tmdb\Model\Tv\Episode\QueryParameter
*/
-class AppendToResponse extends BaseAppendToResponse {
+class AppendToResponse extends BaseAppendToResponse
+{
const CREDITS = 'credits';
const EXTERNAL_IDS = 'external_ids';
const IMAGES = 'images';
diff --git a/lib/Tmdb/Model/Tv/Network.php b/lib/Tmdb/Model/Tv/Network.php
index c4c4be65..0bbe1180 100644
--- a/lib/Tmdb/Model/Tv/Network.php
+++ b/lib/Tmdb/Model/Tv/Network.php
@@ -18,8 +18,8 @@
* Class Network
* @package Tmdb\Model\Tv
*/
-class Network extends AbstractModel {
-
+class Network extends AbstractModel
+{
/**
* @var integer
*/
@@ -43,12 +43,13 @@ class Network extends AbstractModel {
);
/**
- * @param int $id
+ * @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = (int) $id;
+
return $this;
}
@@ -61,12 +62,13 @@ public function getId()
}
/**
- * @param string $name
+ * @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Tv/QueryParameter/AppendToResponse.php b/lib/Tmdb/Model/Tv/QueryParameter/AppendToResponse.php
index f74fd6b5..e191aca9 100644
--- a/lib/Tmdb/Model/Tv/QueryParameter/AppendToResponse.php
+++ b/lib/Tmdb/Model/Tv/QueryParameter/AppendToResponse.php
@@ -18,7 +18,8 @@
* Class AppendToResponse
* @package Tmdb\Model\Tv\QueryParameter
*/
-class AppendToResponse extends BaseAppendToResponse {
+class AppendToResponse extends BaseAppendToResponse
+{
const CREDITS = 'credits';
const EXTERNAL_IDS = 'external_ids';
const IMAGES = 'images';
diff --git a/lib/Tmdb/Model/Tv/Season.php b/lib/Tmdb/Model/Tv/Season.php
index 74a60edd..166ac925 100644
--- a/lib/Tmdb/Model/Tv/Season.php
+++ b/lib/Tmdb/Model/Tv/Season.php
@@ -23,8 +23,8 @@
* Class Season
* @package Tmdb\Model\Tv
*/
-class Season extends AbstractModel {
-
+class Season extends AbstractModel
+{
/**
* @var \DateTime
*/
@@ -114,12 +114,13 @@ public function __construct()
}
/**
- * @param \DateTime $airDate
+ * @param \DateTime $airDate
* @return $this
*/
public function setAirDate($airDate)
{
$this->airDate = new \DateTime($airDate);
+
return $this;
}
@@ -132,12 +133,13 @@ public function getAirDate()
}
/**
- * @param GenericCollection $episodes
+ * @param GenericCollection $episodes
* @return $this
*/
public function setEpisodes($episodes)
{
$this->episodes = $episodes;
+
return $this;
}
@@ -150,12 +152,13 @@ public function getEpisodes()
}
/**
- * @param int $id
+ * @param int $id
* @return $this
*/
public function setId($id)
{
$this->id = (int) $id;
+
return $this;
}
@@ -168,12 +171,13 @@ public function getId()
}
/**
- * @param string $name
+ * @param string $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
@@ -186,12 +190,13 @@ public function getName()
}
/**
- * @param string $overview
+ * @param string $overview
* @return $this
*/
public function setOverview($overview)
{
$this->overview = $overview;
+
return $this;
}
@@ -204,12 +209,13 @@ public function getOverview()
}
/**
- * @param \Tmdb\Model\Tv\Image $posterPath
+ * @param \Tmdb\Model\Tv\Image $posterPath
* @return $this
*/
public function setPosterPath($posterPath)
{
$this->posterPath = $posterPath;
+
return $this;
}
@@ -222,12 +228,13 @@ public function getPosterPath()
}
/**
- * @param int $seasonNumber
+ * @param int $seasonNumber
* @return $this
*/
public function setSeasonNumber($seasonNumber)
{
$this->seasonNumber = $seasonNumber;
+
return $this;
}
@@ -240,12 +247,13 @@ public function getSeasonNumber()
}
/**
- * @param Credits $credits
+ * @param Credits $credits
* @return $this
*/
public function setCredits($credits)
{
$this->credits = $credits;
+
return $this;
}
@@ -258,12 +266,13 @@ public function getCredits()
}
/**
- * @param \Tmdb\Model\Common\ExternalIds $externalIds
+ * @param \Tmdb\Model\Common\ExternalIds $externalIds
* @return $this
*/
public function setExternalIds($externalIds)
{
$this->externalIds = $externalIds;
+
return $this;
}
@@ -276,12 +285,13 @@ public function getExternalIds()
}
/**
- * @param \Tmdb\Model\Collection\Images $images
+ * @param \Tmdb\Model\Collection\Images $images
* @return $this
*/
public function setImages($images)
{
$this->images = $images;
+
return $this;
}
@@ -294,12 +304,13 @@ public function getImages()
}
/**
- * @param \Tmdb\Model\Image\PosterImage $poster
+ * @param \Tmdb\Model\Image\PosterImage $poster
* @return $this
*/
public function setPosterImage($poster)
{
$this->poster = $poster;
+
return $this;
}
diff --git a/lib/Tmdb/Model/Tv/Season/QueryParameter/AppendToResponse.php b/lib/Tmdb/Model/Tv/Season/QueryParameter/AppendToResponse.php
index 5a98bb92..2754ab16 100644
--- a/lib/Tmdb/Model/Tv/Season/QueryParameter/AppendToResponse.php
+++ b/lib/Tmdb/Model/Tv/Season/QueryParameter/AppendToResponse.php
@@ -18,7 +18,8 @@
* Class AppendToResponse
* @package Tmdb\Model\Tv\Season\QueryParameter
*/
-class AppendToResponse extends BaseAppendToResponse {
+class AppendToResponse extends BaseAppendToResponse
+{
const CREDITS = 'credits';
const EXTERNAL_IDS = 'external_ids';
const IMAGES = 'images';
diff --git a/lib/Tmdb/Repository/AbstractRepository.php b/lib/Tmdb/Repository/AbstractRepository.php
index 3909cac0..dbe7db1f 100644
--- a/lib/Tmdb/Repository/AbstractRepository.php
+++ b/lib/Tmdb/Repository/AbstractRepository.php
@@ -21,8 +21,8 @@
* Class AbstractRepository
* @package Tmdb\Repository
*/
-abstract class AbstractRepository {
-
+abstract class AbstractRepository
+{
protected $client = null;
protected $api = null;
@@ -52,12 +52,12 @@ public function getClient()
/**
* Process query parameters
*
- * @param array $parameters
+ * @param array $parameters
* @return array
*/
protected function parseQueryParameters(array $parameters = array())
{
- foreach($parameters as $key => $candidate) {
+ foreach ($parameters as $key => $candidate) {
if (is_a($candidate, 'Tmdb\Model\Common\QueryParameter\QueryParameterInterface')) {
$interfaces = class_implements($candidate);
diff --git a/lib/Tmdb/Repository/AccountRepository.php b/lib/Tmdb/Repository/AccountRepository.php
index faa7f077..8085d79a 100644
--- a/lib/Tmdb/Repository/AccountRepository.php
+++ b/lib/Tmdb/Repository/AccountRepository.php
@@ -21,8 +21,8 @@
* @package Tmdb\Repository
* http://docs.themoviedb.apiary.io/#account
*/
-class AccountRepository extends AbstractRepository {
-
+class AccountRepository extends AbstractRepository
+{
/**
* Get the basic information for an account. You will need to have a valid session id.
*
@@ -31,44 +31,46 @@ class AccountRepository extends AbstractRepository {
public function getAccount()
{
$data = $this->getApi()->getAccount();
+
return $this->getFactory()->create($data);
}
/**
* Get the lists that you have created and marked as a favorite.
*
- * @param string $accountId
- * @param array $parameters
- * @param array $headers
+ * @param string $accountId
+ * @param array $parameters
+ * @param array $headers
* @return ResultCollection
*/
public function getLists($accountId, array $parameters = array(), array $headers = array())
{
$data = $this->getApi()->getLists($accountId, $parameters, $headers);
+
return $this->getFactory()->createResultCollection($data, 'createListItem');
}
/**
* Get the list of favorite movies for an account.
*
- * @param string $accountId
- * @param array $parameters
- * @param array $headers
+ * @param string $accountId
+ * @param array $parameters
+ * @param array $headers
* @return ResultCollection
*/
public function getFavoriteMovies($accountId, array $parameters = array(), array $headers = array())
{
$data = $this->getApi()->getFavoriteMovies($accountId, $parameters, $headers);
+
return $this->getFactory()->createResultCollection($data, 'createMovie');
}
-
/**
* Add or remove a movie to an accounts favorite list.
*
- * @param string $accountId
- * @param int|Movie $movie
- * @param boolean $isFavorite
+ * @param string $accountId
+ * @param int|Movie $movie
+ * @param boolean $isFavorite
* @return ResultCollection
*/
public function favorite($accountId, $movie, $isFavorite = true)
@@ -78,43 +80,46 @@ public function favorite($accountId, $movie, $isFavorite = true)
}
$data = $this->getApi()->favorite($accountId, $movie, $isFavorite);
+
return $this->getFactory()->createStatusResult($data);
}
/**
* Get the list of rated movies (and associated rating) for an account.
*
- * @param string $accountId
- * @param array $parameters
- * @param array $headers
+ * @param string $accountId
+ * @param array $parameters
+ * @param array $headers
* @return ResultCollection
*/
public function getRatedMovies($accountId, array $parameters = array(), array $headers = array())
{
$data = $this->getApi()->getRatedMovies($accountId, $parameters, $headers);
+
return $this->getFactory()->createResultCollection($data, 'createMovie');
}
/**
* Get the list of movies on an accounts watchlist.
*
- * @param string $accountId
- * @param array $parameters
- * @param array $headers
+ * @param string $accountId
+ * @param array $parameters
+ * @param array $headers
* @return ResultCollection
*/
public function getMovieWatchlist($accountId, array $parameters = array(), array $headers = array())
{
$data = $this->getApi()->getMovieWatchlist($accountId, $parameters, $headers);
+
return $this->getFactory()->createResultCollection($data, 'createMovie');
}
/**
* Add or remove a movie to an accounts watch list.
*
- * @param string $accountId
- * @param int|Movie $movie
- * @param boolean $isOnWatchlist
+ * @param string $accountId
+ * @param int|Movie $movie
+ * @param boolean $isOnWatchlist
* @return ResultCollection
*/
public function watchlist($accountId, $movie, $isOnWatchlist = true)
@@ -124,6 +129,7 @@ public function watchlist($accountId, $movie, $isOnWatchlist = true)
}
$data = $this->getApi()->watchlist($accountId, $movie, $isOnWatchlist);
+
return $this->getFactory()->createStatusResult($data);
}
diff --git a/lib/Tmdb/Repository/AuthenticationRepository.php b/lib/Tmdb/Repository/AuthenticationRepository.php
index 141ba954..ed075b0b 100644
--- a/lib/Tmdb/Repository/AuthenticationRepository.php
+++ b/lib/Tmdb/Repository/AuthenticationRepository.php
@@ -20,8 +20,8 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#authentication
*/
-class AuthenticationRepository extends AbstractRepository {
-
+class AuthenticationRepository extends AbstractRepository
+{
/**
* This method is used to generate a valid request token for user based authentication.
* A request token is required in order to request a session id.
@@ -34,6 +34,7 @@ class AuthenticationRepository extends AbstractRepository {
public function getRequestToken()
{
$data = $this->getApi()->getNewToken();
+
return $this->getFactory()->createRequestToken($data);
}
@@ -41,12 +42,13 @@ public function getRequestToken()
* This method is used to generate a session id for user based authentication.
* A session id is required in order to use any of the write methods.
*
- * @param RequestToken $requestToken
+ * @param RequestToken $requestToken
* @return RequestToken
*/
public function getSessionToken(RequestToken $requestToken)
{
$data = $this->getApi()->getNewSession($requestToken->getToken());
+
return $this->getFactory()->createSessionToken($data);
}
@@ -65,13 +67,14 @@ public function getSessionToken(RequestToken $requestToken)
public function getGuestSessionToken()
{
$data = $this->getApi()->getNewGuestSession();
+
return $this->getFactory()->createGuestSessionToken($data);
}
/**
* Authenticate request token, redirects the user
*
- * @param RequestToken $requestToken
+ * @param RequestToken $requestToken
* @return void
*/
public function authenticateRequestToken(RequestToken $requestToken)
diff --git a/lib/Tmdb/Repository/CertificationRepository.php b/lib/Tmdb/Repository/CertificationRepository.php
index b7cdb357..31d979af 100644
--- a/lib/Tmdb/Repository/CertificationRepository.php
+++ b/lib/Tmdb/Repository/CertificationRepository.php
@@ -13,15 +13,14 @@
namespace Tmdb\Repository;
use Tmdb\Factory\CertificationFactory;
-use Tmdb\Model\Collection as ApiCollection;
/**
* Class CertificationRepository
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#certifications
*/
-class CertificationRepository extends AbstractRepository {
-
+class CertificationRepository extends AbstractRepository
+{
/**
* Get the list of supported certifications for movies.
*
@@ -34,6 +33,7 @@ class CertificationRepository extends AbstractRepository {
public function getMovieList(array $parameters = array(), array $headers = array())
{
$data = $this->getApi()->getMovieList($this->parseQueryParameters($parameters), $headers);
+
return $this->getFactory()->createCollection($data);
}
diff --git a/lib/Tmdb/Repository/ChangesRepository.php b/lib/Tmdb/Repository/ChangesRepository.php
index a2e34f03..d873ff4f 100644
--- a/lib/Tmdb/Repository/ChangesRepository.php
+++ b/lib/Tmdb/Repository/ChangesRepository.php
@@ -21,7 +21,8 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#changes
*/
-class ChangesRepository extends AbstractRepository {
+class ChangesRepository extends AbstractRepository
+{
/**
* Get a list of movie ids that have been edited.
*
@@ -32,11 +33,12 @@ class ChangesRepository extends AbstractRepository {
* Please note that the change log system to support this was changed on October 5, 2012
* and will only show movies that have been edited since.
*
- * @param ChangesQuery $query
- * @param array $headers
+ * @param ChangesQuery $query
+ * @param array $headers
* @return \Tmdb\Model\Common\GenericCollection
*/
- public function getMovieChanges(ChangesQuery $query, array $headers = array()) {
+ public function getMovieChanges(ChangesQuery $query, array $headers = array())
+ {
$data = $this->getApi()->getMovieChanges($query->toArray(), $headers);
return $this->getFactory()->createResultCollection($data);
@@ -52,11 +54,12 @@ public function getMovieChanges(ChangesQuery $query, array $headers = array()) {
* Please note that the change log system to support this was changed on October 5, 2012
* and will only show people that have been edited since.
*
- * @param ChangesQuery $query
- * @param array $headers
+ * @param ChangesQuery $query
+ * @param array $headers
* @return People
*/
- public function getPeopleChanges(ChangesQuery $query, array $headers = array()) {
+ public function getPeopleChanges(ChangesQuery $query, array $headers = array())
+ {
$data = $this->getApi()->getPersonChanges($query->toArray(), $headers);
return $this->getFactory()->createResultCollection($data);
@@ -77,7 +80,8 @@ public function getApi()
*
* @return ChangesFactory
*/
- public function getFactory(){
+ public function getFactory()
+ {
return new ChangesFactory();
}
}
diff --git a/lib/Tmdb/Repository/CollectionRepository.php b/lib/Tmdb/Repository/CollectionRepository.php
index 68e75cf9..4079f5ad 100644
--- a/lib/Tmdb/Repository/CollectionRepository.php
+++ b/lib/Tmdb/Repository/CollectionRepository.php
@@ -23,8 +23,8 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#collections
*/
-class CollectionRepository extends AbstractRepository {
-
+class CollectionRepository extends AbstractRepository
+{
private $imageFactory;
public function __construct(Client $client)
@@ -55,6 +55,7 @@ public function load($id, array $parameters = array(), array $headers = array())
}
$data = $this->getApi()->getCollection($id, $this->parseQueryParameters($parameters), $headers);
+
return $this->getFactory()->create($data);
}
@@ -93,12 +94,13 @@ public function getFactory()
}
/**
- * @param mixed $imageFactory
+ * @param mixed $imageFactory
* @return $this
*/
public function setImageFactory($imageFactory)
{
$this->imageFactory = $imageFactory;
+
return $this;
}
diff --git a/lib/Tmdb/Repository/CompanyRepository.php b/lib/Tmdb/Repository/CompanyRepository.php
index 76d09e2d..a7538250 100644
--- a/lib/Tmdb/Repository/CompanyRepository.php
+++ b/lib/Tmdb/Repository/CompanyRepository.php
@@ -24,17 +24,18 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#movies
*/
-class CompanyRepository extends AbstractRepository {
-
+class CompanyRepository extends AbstractRepository
+{
/**
* Load a company with the given identifier
*
* @param $id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return Company
*/
- public function load($id, array $parameters = array(), array $headers = array()) {
+ public function load($id, array $parameters = array(), array $headers = array())
+ {
$data = $this->getApi()->getCompany($id, $this->parseQueryParameters($parameters), $headers);
return $this->getFactory()->create($data);
@@ -43,9 +44,9 @@ public function load($id, array $parameters = array(), array $headers = array())
/**
* Get the list of movies associated with a particular company.
*
- * @param integer $id
- * @param array $parameters
- * @param array $headers
+ * @param integer $id
+ * @param array $parameters
+ * @param array $headers
* @return GenericCollection|Movie[]
*/
public function getMovies($id, array $parameters = array(), array $headers = array())
@@ -87,14 +88,15 @@ public function getMovieFactory()
* @param $data
* @return Movie[]
*/
- public function createMovieCollection($data){
+ public function createMovieCollection($data)
+ {
$collection = new ResultCollection();
if (array_key_exists('results', $data)) {
$data = $data['results'];
}
- foreach($data as $item) {
+ foreach ($data as $item) {
$collection->add(null, $this->getMovieFactory()->create($item));
}
diff --git a/lib/Tmdb/Repository/ConfigurationRepository.php b/lib/Tmdb/Repository/ConfigurationRepository.php
index dd630e20..fbce8a93 100644
--- a/lib/Tmdb/Repository/ConfigurationRepository.php
+++ b/lib/Tmdb/Repository/ConfigurationRepository.php
@@ -20,15 +20,16 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#configuration
*/
-class ConfigurationRepository extends AbstractRepository {
-
+class ConfigurationRepository extends AbstractRepository
+{
/**
* Load up TMDB Configuration
*
- * @param array $headers
+ * @param array $headers
* @return Configuration
*/
- public function load(array $headers = array()) {
+ public function load(array $headers = array())
+ {
$data = $this->getApi()->getConfiguration($headers);
return $this->getFactory()->create($data);
diff --git a/lib/Tmdb/Repository/CreditsRepository.php b/lib/Tmdb/Repository/CreditsRepository.php
index 40e51385..63c79688 100644
--- a/lib/Tmdb/Repository/CreditsRepository.php
+++ b/lib/Tmdb/Repository/CreditsRepository.php
@@ -15,24 +15,24 @@
use Tmdb\Factory\CompanyFactory;
use Tmdb\Factory\CreditsFactory;
use Tmdb\Model\Company;
-use Tmdb\Model\Movie;
/**
* Class CreditsRepository
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#credits
*/
-class CreditsRepository extends AbstractRepository {
-
+class CreditsRepository extends AbstractRepository
+{
/**
* Load a company with the given identifier
*
* @param $id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return Company
*/
- public function load($id, array $parameters = array(), array $headers = array()) {
+ public function load($id, array $parameters = array(), array $headers = array())
+ {
$data = $this->getApi()->getCredit($id, $this->parseQueryParameters($parameters), $headers);
return $this->getFactory()->create($data);
diff --git a/lib/Tmdb/Repository/DiscoverRepository.php b/lib/Tmdb/Repository/DiscoverRepository.php
index 46e468eb..3d20825f 100644
--- a/lib/Tmdb/Repository/DiscoverRepository.php
+++ b/lib/Tmdb/Repository/DiscoverRepository.php
@@ -26,16 +26,18 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#discover
*/
-class DiscoverRepository extends AbstractRepository {
+class DiscoverRepository extends AbstractRepository
+{
/**
* Discover movies by different types of data like average rating, number of votes, genres and certifications.
*
- * @param DiscoverMoviesQuery $query
- * @param array $headers
- * @throws RuntimeException when certification_country is set but certification.lte is not given
+ * @param DiscoverMoviesQuery $query
+ * @param array $headers
+ * @throws RuntimeException when certification_country is set but certification.lte is not given
* @return Movie[]
*/
- public function discoverMovies(DiscoverMoviesQuery $query, array $headers = array()) {
+ public function discoverMovies(DiscoverMoviesQuery $query, array $headers = array())
+ {
$query = $query->toArray();
if (array_key_exists('certification_country', $query) && !array_key_exists('certification.lte', $query)) {
@@ -50,12 +52,13 @@ 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.
*
- * @param DiscoverTvQuery $query
- * @param array $headers
+ * @param DiscoverTvQuery $query
+ * @param array $headers
* @return Tv[]
* @return \Tmdb\Model\Common\GenericCollection
*/
- public function discoverTv(DiscoverTvQuery $query, array $headers = array()) {
+ public function discoverTv(DiscoverTvQuery $query, array $headers = array())
+ {
$data = $this->getApi()->discoverTv($query->toArray(), $headers);
return $this->getTvFactory()->createResultCollection($data);
@@ -77,7 +80,8 @@ public function getApi()
* @throws NotImplementedException
* @return null|\Tmdb\Factory\FactoryInterface
*/
- public function getFactory(){
+ public function getFactory()
+ {
throw new NotImplementedException('Discover does not support a generic factory.');
}
diff --git a/lib/Tmdb/Repository/FindRepository.php b/lib/Tmdb/Repository/FindRepository.php
index c8282491..9cf26910 100644
--- a/lib/Tmdb/Repository/FindRepository.php
+++ b/lib/Tmdb/Repository/FindRepository.php
@@ -20,16 +20,18 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#find
*/
-class FindRepository extends AbstractRepository {
+class FindRepository extends AbstractRepository
+{
/**
* Find something
*
* @param $id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return Find
*/
- public function find($id, array $parameters = array(), array $headers = array()) {
+ public function find($id, array $parameters = array(), array $headers = array())
+ {
return $this->getFactory()->create(
$this->getApi()->find($id,$parameters, $headers)
);
@@ -52,4 +54,4 @@ public function getFactory()
{
return new FindFactory();
}
-}
\ No newline at end of file
+}
diff --git a/lib/Tmdb/Repository/GenreRepository.php b/lib/Tmdb/Repository/GenreRepository.php
index b82b1fab..3a8bdff2 100644
--- a/lib/Tmdb/Repository/GenreRepository.php
+++ b/lib/Tmdb/Repository/GenreRepository.php
@@ -21,24 +21,26 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#genres
*/
-class GenreRepository extends AbstractRepository {
+class GenreRepository extends AbstractRepository
+{
/**
* Load a genre with the given identifier
*
* @param $id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return Genre
*/
- public function load($id, array $parameters = array(), array $headers = array()) {
+ public function load($id, array $parameters = array(), array $headers = array())
+ {
return $this->loadCollection($parameters, $headers)->filterId($id);
}
/**
* Get the list of genres.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return GenericCollection
*/
public function loadCollection(array $parameters = array(), array $headers = array())
@@ -52,11 +54,12 @@ 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.
*
* @param $id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return Genre[]
*/
- public function getMovies($id, array $parameters = array(), array $headers = array()) {
+ public function getMovies($id, array $parameters = array(), array $headers = array())
+ {
return $this->getFactory()->createResultCollection(
$this->getApi()->getMovies($id, $parameters, $headers),
'createMovie'
@@ -69,7 +72,8 @@ public function getMovies($id, array $parameters = array(), array $headers = arr
* @param $data
* @return GenericCollection|Genre[]
*/
- private function createCollection($data){
+ private function createCollection($data)
+ {
return $this->getFactory()->createCollection($data);
}
@@ -90,4 +94,4 @@ public function getFactory()
{
return new GenreFactory();
}
-}
\ No newline at end of file
+}
diff --git a/lib/Tmdb/Repository/JobsRepository.php b/lib/Tmdb/Repository/JobsRepository.php
index 5444de90..ec703708 100644
--- a/lib/Tmdb/Repository/JobsRepository.php
+++ b/lib/Tmdb/Repository/JobsRepository.php
@@ -21,21 +21,23 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#jobs
*/
-class JobsRepository extends AbstractRepository {
+class JobsRepository extends AbstractRepository
+{
/**
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return Job
*/
- public function load(array $parameters = array(), array $headers = array()) {
+ public function load(array $parameters = array(), array $headers = array())
+ {
return $this->loadCollection($parameters, $headers);
}
/**
* Get the list of jobs.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return Jobs|Job[]
*/
public function loadCollection(array $parameters = array(), array $headers = array())
@@ -51,7 +53,8 @@ public function loadCollection(array $parameters = array(), array $headers = arr
* @param $data
* @return Jobs|Job[]
*/
- private function createCollection($data){
+ private function createCollection($data)
+ {
return $this->getFactory()->createCollection($data);
}
@@ -72,4 +75,4 @@ public function getFactory()
{
return new JobsFactory();
}
-}
\ No newline at end of file
+}
diff --git a/lib/Tmdb/Repository/KeywordRepository.php b/lib/Tmdb/Repository/KeywordRepository.php
index b85ba66e..b3a6784b 100644
--- a/lib/Tmdb/Repository/KeywordRepository.php
+++ b/lib/Tmdb/Repository/KeywordRepository.php
@@ -21,16 +21,18 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#keywords
*/
-class KeywordRepository extends AbstractRepository {
+class KeywordRepository extends AbstractRepository
+{
/**
* Get the basic information for a specific keyword id.
*
* @param $id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return Keyword
*/
- public function load($id, array $parameters = array(), array $headers = array()) {
+ public function load($id, array $parameters = array(), array $headers = array())
+ {
return $this->getFactory()->create(
$this->getApi()->getKeyword($id, $parameters, $headers)
);
@@ -40,11 +42,12 @@ 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.
*
* @param $id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return ResultCollection|Keyword[]
*/
- public function getMovies($id, array $parameters = array(), array $headers = array()) {
+ public function getMovies($id, array $parameters = array(), array $headers = array())
+ {
return $this->getFactory()->createResultCollection(
$this->getApi()->getMovies($id, $parameters, $headers),
'createMovie'
@@ -68,4 +71,4 @@ public function getFactory()
{
return new KeywordFactory();
}
-}
\ No newline at end of file
+}
diff --git a/lib/Tmdb/Repository/ListRepository.php b/lib/Tmdb/Repository/ListRepository.php
index 92f90954..04abcc40 100644
--- a/lib/Tmdb/Repository/ListRepository.php
+++ b/lib/Tmdb/Repository/ListRepository.php
@@ -21,16 +21,18 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#lists
*/
-class ListRepository extends AbstractRepository {
+class ListRepository extends AbstractRepository
+{
/**
* Get a list by id.
*
- * @param string $id
- * @param array $parameters
- * @param array $headers
+ * @param string $id
+ * @param array $parameters
+ * @param array $headers
* @return Lists
*/
- public function load($id, array $parameters = array(), array $headers = array()) {
+ public function load($id, array $parameters = array(), array $headers = array())
+ {
return $this->getFactory()->create(
$this->getApi()->getList($id, $parameters, $headers)
);
@@ -39,10 +41,10 @@ public function load($id, array $parameters = array(), array $headers = array())
/**
* Check to see if a movie ID is already added to a list.
*
- * @param string $id
- * @param int $mediaId
- * @param array $parameters
- * @param array $headers
+ * @param string $id
+ * @param int $mediaId
+ * @param array $parameters
+ * @param array $headers
* @return ItemStatus
*/
public function getItemStatus($id, $mediaId, array $parameters = array(), array $headers = array())
@@ -55,10 +57,10 @@ public function getItemStatus($id, $mediaId, array $parameters = array(), array
/**
* This method lets users create a new list. A valid session id is required.
*
- * @param string $name
- * @param string $description
- * @param array $parameters
- * @param array $headers
+ * @param string $name
+ * @param string $description
+ * @param array $parameters
+ * @param array $headers
* @return string The list id
*/
public function createList($name, $description = null, array $parameters = array(), array $headers = array())
@@ -71,8 +73,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.
*
- * @param string $id
- * @param int $mediaId
+ * @param string $id
+ * @param int $mediaId
* @return ItemStatus
*/
public function add($id, $mediaId)
@@ -85,8 +87,8 @@ public function add($id, $mediaId)
/**
* This method lets users delete movies from a list that they created. A valid session id is required.
*
- * @param string $id
- * @param int $mediaId
+ * @param string $id
+ * @param int $mediaId
* @return ItemStatus
*/
public function remove($id, $mediaId)
@@ -99,7 +101,7 @@ public function remove($id, $mediaId)
/**
* This method lets users delete a list that they created. A valid session id is required.
*
- * @param string $id
+ * @param string $id
* @return ItemStatus
*/
public function deleteList($id)
@@ -126,4 +128,4 @@ public function getFactory()
{
return new ListFactory();
}
-}
\ No newline at end of file
+}
diff --git a/lib/Tmdb/Repository/MovieRepository.php b/lib/Tmdb/Repository/MovieRepository.php
index 37288a2c..e733490e 100644
--- a/lib/Tmdb/Repository/MovieRepository.php
+++ b/lib/Tmdb/Repository/MovieRepository.php
@@ -25,8 +25,8 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#movies
*/
-class MovieRepository extends AbstractRepository {
-
+class MovieRepository extends AbstractRepository
+{
/**
* @var ImageFactory
*/
@@ -260,11 +260,10 @@ public function getChanges($id, array $parameters = array(), array $headers = ar
return $movie->getChanges();
}
-
/**
* Get the latest movie.
*
- * @param array $options
+ * @param array $options
* @return null|\Tmdb\Model\AbstractModel
*/
public function getLatest(array $options = array())
@@ -277,7 +276,7 @@ public function getLatest(array $options = array())
/**
* Get the list of upcoming movies. This list refreshes every day. The maximum number of items this list will include is 100.
*
- * @param array $options
+ * @param array $options
* @return Movie[]
*/
public function getUpcoming(array $options = array())
@@ -290,7 +289,7 @@ public function getUpcoming(array $options = array())
/**
* Get the list of movies playing in theatres. This list refreshes every day. The maximum number of items this list will include is 100.
*
- * @param array $options
+ * @param array $options
* @return Movie[]
*/
public function getNowPlaying(array $options = array())
@@ -303,7 +302,7 @@ public function getNowPlaying(array $options = array())
/**
* Get the list of popular movies on The Movie Database. This list refreshes every day.
*
- * @param array $options
+ * @param array $options
* @return Movie[]
*/
public function getPopular(array $options = array())
@@ -316,7 +315,7 @@ public function getPopular(array $options = array())
/**
* Get the list of top rated movies. By default, this list will only include movies that have 10 or more votes. This list refreshes every day.
*
- * @param array $options
+ * @param array $options
* @return Movie[]
*/
public function getTopRated(array $options = array())
@@ -329,7 +328,7 @@ 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.
*
- * @param integer $id
+ * @param integer $id
* @return Movie[]
*/
public function getAccountStates($id)
@@ -342,8 +341,8 @@ public function getAccountStates($id)
/**
* This method lets users rate a movie. A valid session id or guest session id is required.
*
- * @param integer $id
- * @param float $rating
+ * @param integer $id
+ * @param float $rating
* @return Movie[]
*/
public function rate($id, $rating)
@@ -379,17 +378,19 @@ public function getFactory()
* @param $data
* @return Movie[]
*/
- private function createCollection($data){
+ private function createCollection($data)
+ {
return $this->getFactory()->createCollection($data);
}
/**
- * @param mixed $alternativeTitleFactory
+ * @param mixed $alternativeTitleFactory
* @return $this
*/
public function setAlternativeTitleFactory($alternativeTitleFactory)
{
$this->alternativeTitleFactory = $alternativeTitleFactory;
+
return $this;
}
@@ -402,12 +403,13 @@ public function getAlternativeTitleFactory()
}
/**
- * @param mixed $imageFactory
+ * @param mixed $imageFactory
* @return $this
*/
public function setImageFactory($imageFactory)
{
$this->imageFactory = $imageFactory;
+
return $this;
}
@@ -420,12 +422,13 @@ public function getImageFactory()
}
/**
- * @param mixed $peopleFactory
+ * @param mixed $peopleFactory
* @return $this
*/
public function setPeopleFactory($peopleFactory)
{
$this->peopleFactory = $peopleFactory;
+
return $this;
}
@@ -437,5 +440,4 @@ public function getPeopleFactory()
return $this->peopleFactory;
}
-
}
diff --git a/lib/Tmdb/Repository/NetworkRepository.php b/lib/Tmdb/Repository/NetworkRepository.php
index eb6407ee..21673778 100644
--- a/lib/Tmdb/Repository/NetworkRepository.php
+++ b/lib/Tmdb/Repository/NetworkRepository.php
@@ -20,7 +20,8 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#networks
*/
-class NetworkRepository extends AbstractRepository {
+class NetworkRepository extends AbstractRepository
+{
/**
* This method is used to retrieve the basic information about a TV network.
*
@@ -28,11 +29,12 @@ class NetworkRepository extends AbstractRepository {
* At this time we don't have much but this will be fleshed out over time.
*
* @param $id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return Network
*/
- public function load($id, array $parameters = array(), array $headers = array()) {
+ public function load($id, array $parameters = array(), array $headers = array())
+ {
return $this->getFactory()->create(
$this->getApi()->getNetwork($id, $parameters, $headers)
);
@@ -55,4 +57,4 @@ public function getFactory()
{
return new NetworkFactory();
}
-}
\ No newline at end of file
+}
diff --git a/lib/Tmdb/Repository/PeopleRepository.php b/lib/Tmdb/Repository/PeopleRepository.php
index f9fcf4b3..648bb716 100644
--- a/lib/Tmdb/Repository/PeopleRepository.php
+++ b/lib/Tmdb/Repository/PeopleRepository.php
@@ -23,17 +23,18 @@
*
* @todo implement the new methods
*/
-class PeopleRepository extends AbstractRepository {
+class PeopleRepository extends AbstractRepository
+{
/**
* Load a person with the given identifier
*
* @param $id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return Person
*/
- public function load($id, array $parameters = array(), array $headers = array()) {
-
+ public function load($id, array $parameters = array(), array $headers = array())
+ {
if (empty($parameters) && $parameters !== false) {
// Load a no-nonsense default set
$parameters = array(
@@ -49,6 +50,7 @@ public function load($id, array $parameters = array(), array $headers = array())
}
$data = $this->getApi()->getPerson($id, $this->parseQueryParameters($parameters), $headers);
+
return $this->getFactory()->create($data);
}
@@ -144,8 +146,8 @@ public function getImages($id)
* The language is present on fields that are translatable.
*
* @param $id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return null|\Tmdb\Model\AbstractModel
*/
public function getChanges($id, array $parameters = array(), array $headers = array())
@@ -161,13 +163,14 @@ public function getChanges($id, array $parameters = array(), array $headers = ar
*
* This list refreshes every day.
*
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return null|\Tmdb\Model\AbstractModel
*/
public function getPopular(array $parameters = array(), array $headers = array())
{
$data = $this->getApi()->getPopular($parameters, $headers);
+
return $this->getFactory()->createResultCollection($data);
}
@@ -179,6 +182,7 @@ public function getPopular(array $parameters = array(), array $headers = array()
public function getLatest()
{
$data = $this->getApi()->getLatest();
+
return $this->getFactory()->create($data);
}
diff --git a/lib/Tmdb/Repository/ReviewRepository.php b/lib/Tmdb/Repository/ReviewRepository.php
index 2695d9fb..e493374d 100644
--- a/lib/Tmdb/Repository/ReviewRepository.php
+++ b/lib/Tmdb/Repository/ReviewRepository.php
@@ -20,16 +20,18 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#reviews
*/
-class ReviewRepository extends AbstractRepository {
+class ReviewRepository extends AbstractRepository
+{
/**
* Get the full details of a review by ID.
*
* @param $id
- * @param array $parameters
- * @param array $headers
+ * @param array $parameters
+ * @param array $headers
* @return Review
*/
- public function load($id, array $parameters = array(), array $headers = array()) {
+ public function load($id, array $parameters = array(), array $headers = array())
+ {
return $this->getFactory()->create(
$this->getApi()->getReview($id, $parameters, $headers)
);
@@ -52,4 +54,4 @@ public function getFactory()
{
return new ReviewFactory();
}
-}
\ No newline at end of file
+}
diff --git a/lib/Tmdb/Repository/SearchRepository.php b/lib/Tmdb/Repository/SearchRepository.php
index f06541c3..3f7d71cd 100644
--- a/lib/Tmdb/Repository/SearchRepository.php
+++ b/lib/Tmdb/Repository/SearchRepository.php
@@ -42,8 +42,8 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#search
*/
-class SearchRepository extends AbstractRepository {
-
+class SearchRepository extends AbstractRepository
+{
/**
* @var MovieFactory
*/
@@ -93,92 +93,98 @@ public function __construct(Client $client)
}
/**
- * @param string $query
+ * @param string $query
* @param MovieSearchQuery $parameters
- * @param array $headers
+ * @param array $headers
*
* @return ResultCollection|Movie[]
*/
- public function searchMovie($query, MovieSearchQuery $parameters, array $headers = array()) {
+ public function searchMovie($query, MovieSearchQuery $parameters, array $headers = array())
+ {
$data = $this->getApi()->searchMovies($query, $this->getParameters($parameters), $headers);
return $this->getMovieFactory()->createResultCollection($data);
}
/**
- * @param string $query
+ * @param string $query
* @param CollectionSearchQuery $parameters
- * @param array $headers
+ * @param array $headers
*
* @return ResultCollection|Collection[]
*/
- public function searchCollection($query, CollectionSearchQuery $parameters, array $headers = array()) {
+ public function searchCollection($query, CollectionSearchQuery $parameters, array $headers = array())
+ {
$data = $this->getApi()->searchCollection($query, $this->getParameters($parameters), $headers);
return $this->getCollectionFactory()->createResultCollection($data);
}
/**
- * @param string $query
+ * @param string $query
* @param TvSearchQuery $parameters
- * @param array $headers
+ * @param array $headers
*
* @return ResultCollection|Tv[]
*/
- public function searchTv($query, TvSearchQuery $parameters, array $headers = array()) {
+ public function searchTv($query, TvSearchQuery $parameters, array $headers = array())
+ {
$data = $this->getApi()->searchTv($query, $this->getParameters($parameters), $headers);
return $this->getTvFactory()->createResultCollection($data);
}
/**
- * @param string $query
+ * @param string $query
* @param PersonSearchQuery $parameters
- * @param array $headers
+ * @param array $headers
*
* @return ResultCollection|Person[]
*/
- public function searchPerson($query, PersonSearchQuery $parameters, array $headers = array()) {
+ public function searchPerson($query, PersonSearchQuery $parameters, array $headers = array())
+ {
$data = $this->getApi()->searchPersons($query, $this->getParameters($parameters), $headers);
return $this->getPeopleFactory()->createResultCollection($data);
}
/**
- * @param string $query
+ * @param string $query
* @param ListSearchQuery $parameters
- * @param array $headers
+ * @param array $headers
*
* @return ResultCollection
*/
- public function searchList($query, ListSearchQuery $parameters, array $headers = array()) {
+ public function searchList($query, ListSearchQuery $parameters, array $headers = array())
+ {
$data = $this->getApi()->searchList($query, $this->getParameters($parameters), $headers);
return $this->getListitemFactory()->createResultCollection($data);
}
/**
- * @param string $query
+ * @param string $query
* @param CompanySearchQuery $parameters
- * @param array $headers
+ * @param array $headers
*
* @return ResultCollection|Company[]
*/
- public function searchCompany($query, CompanySearchQuery $parameters, array $headers = array()) {
+ public function searchCompany($query, CompanySearchQuery $parameters, array $headers = array())
+ {
$data = $this->getApi()->searchTv($query, $this->getParameters($parameters), $headers);
return $this->getCompanyFactory()->createResultCollection($data);
}
-
/**
- * @param string $query
+ * @param string $query
* @param KeywordSearchQuery $parameters
- * @param array $headers
+ * @param array $headers
*
* @return ResultCollection|Keyword[]
*/
- public function searchKeyword($query, KeywordSearchQuery $parameters, array $headers = array()) {
+ public function searchKeyword($query, KeywordSearchQuery $parameters, array $headers = array())
+ {
$data = $this->getApi()->searchKeyword($query, $this->getParameters($parameters), $headers);
return $this->getKeywordFactory()->createResultCollection($data);
@@ -187,10 +193,11 @@ public function searchKeyword($query, KeywordSearchQuery $parameters, array $hea
/**
* Convert parameters back to an array
*
- * @param array $parameters
+ * @param array $parameters
* @return array
*/
- private function getParameters($parameters = array()) {
+ private function getParameters($parameters = array())
+ {
if ($parameters instanceof SearchQuery) {
return $parameters->toArray();
}
@@ -213,17 +220,19 @@ public function getApi()
*
* @throws NotImplementedException
*/
- public function getFactory(){
+ public function getFactory()
+ {
throw new NotImplementedException('SearchRepository does not support a generic factory.');
}
/**
- * @param \Tmdb\Factory\MovieFactory $movieFactory
+ * @param \Tmdb\Factory\MovieFactory $movieFactory
* @return $this
*/
public function setMovieFactory($movieFactory)
{
$this->movieFactory = $movieFactory;
+
return $this;
}
@@ -236,12 +245,13 @@ public function getMovieFactory()
}
/**
- * @param \Tmdb\Factory\CollectionFactory $collectionFactory
+ * @param \Tmdb\Factory\CollectionFactory $collectionFactory
* @return $this
*/
public function setCollectionFactory($collectionFactory)
{
$this->collectionFactory = $collectionFactory;
+
return $this;
}
@@ -254,12 +264,13 @@ public function getCollectionFactory()
}
/**
- * @param \Tmdb\Factory\CompanyFactory $companyFactory
+ * @param \Tmdb\Factory\CompanyFactory $companyFactory
* @return $this
*/
public function setCompanyFactory($companyFactory)
{
$this->companyFactory = $companyFactory;
+
return $this;
}
@@ -272,12 +283,13 @@ public function getCompanyFactory()
}
/**
- * @param \Tmdb\Factory\KeywordFactory $keywordFactory
+ * @param \Tmdb\Factory\KeywordFactory $keywordFactory
* @return $this
*/
public function setKeywordFactory($keywordFactory)
{
$this->keywordFactory = $keywordFactory;
+
return $this;
}
@@ -290,12 +302,13 @@ public function getKeywordFactory()
}
/**
- * @param \Tmdb\Factory\Movie\ListItemFactory $listItemFactory
+ * @param \Tmdb\Factory\Movie\ListItemFactory $listItemFactory
* @return $this
*/
public function setListItemFactory($listItemFactory)
{
$this->listItemFactory = $listItemFactory;
+
return $this;
}
@@ -308,12 +321,13 @@ public function getListItemFactory()
}
/**
- * @param \Tmdb\Factory\PeopleFactory $peopleFactory
+ * @param \Tmdb\Factory\PeopleFactory $peopleFactory
* @return $this
*/
public function setPeopleFactory($peopleFactory)
{
$this->peopleFactory = $peopleFactory;
+
return $this;
}
@@ -326,12 +340,13 @@ public function getPeopleFactory()
}
/**
- * @param \Tmdb\Factory\TvFactory $tvFactory
+ * @param \Tmdb\Factory\TvFactory $tvFactory
* @return $this
*/
public function setTvFactory($tvFactory)
{
$this->tvFactory = $tvFactory;
+
return $this;
}
@@ -342,4 +357,4 @@ public function getTvFactory()
{
return $this->tvFactory;
}
-}
\ No newline at end of file
+}
diff --git a/lib/Tmdb/Repository/TvEpisodeRepository.php b/lib/Tmdb/Repository/TvEpisodeRepository.php
index 351c1150..d573a7b0 100644
--- a/lib/Tmdb/Repository/TvEpisodeRepository.php
+++ b/lib/Tmdb/Repository/TvEpisodeRepository.php
@@ -24,8 +24,8 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#tvepisodes
*/
-class TvEpisodeRepository extends AbstractRepository {
-
+class TvEpisodeRepository extends AbstractRepository
+{
/**
* Load a tv season with the given identifier
*
@@ -157,13 +157,13 @@ public function getImages($tvShow, $season, $episode, array $parameters = array(
if ($episode instanceof Tv\Episode) {
$episode = $episode->getId();
}
-
+
$data = $this->getApi()->getImages($tvShow, $season, $episode, $this->parseQueryParameters($parameters), $headers);
$episode = $this->getFactory()->create(array('images' => $data));
return $episode->getImages();
}
-
+
/**
* Return the Seasons API Class
*
diff --git a/lib/Tmdb/Repository/TvRepository.php b/lib/Tmdb/Repository/TvRepository.php
index d455c801..8277fea7 100644
--- a/lib/Tmdb/Repository/TvRepository.php
+++ b/lib/Tmdb/Repository/TvRepository.php
@@ -21,14 +21,14 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#tv
*/
-class TvRepository extends AbstractRepository {
-
+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
*
- * @param integer $id
+ * @param integer $id
* @param $parameters
* @param $headers
* @return null|\Tmdb\Model\AbstractModel
@@ -141,7 +141,7 @@ public function getFactory()
/**
* Get the list of popular tvs on The Tv Database. This list refreshes every day.
*
- * @param array $options
+ * @param array $options
* @return Tv[]
*/
public function getPopular(array $options = array())
@@ -154,7 +154,7 @@ public function getPopular(array $options = array())
/**
* Get the list of top rated tvs. By default, this list will only include tvs that have 10 or more votes. This list refreshes every day.
*
- * @param array $options
+ * @param array $options
* @return Tv[]
*/
public function getTopRated(array $options = array())
@@ -167,7 +167,7 @@ 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.
*
- * @param array $options
+ * @param array $options
* @return Tv[]
*/
public function getOnTheAir(array $options = array())
diff --git a/lib/Tmdb/Repository/TvSeasonRepository.php b/lib/Tmdb/Repository/TvSeasonRepository.php
index 85c4044e..df82ffd4 100644
--- a/lib/Tmdb/Repository/TvSeasonRepository.php
+++ b/lib/Tmdb/Repository/TvSeasonRepository.php
@@ -24,8 +24,8 @@
* @package Tmdb\Repository
* @see http://docs.themoviedb.apiary.io/#tvseasons
*/
-class TvSeasonRepository extends AbstractRepository {
-
+class TvSeasonRepository extends AbstractRepository
+{
/**
* Load a tv season with the given identifier
*
@@ -67,7 +67,6 @@ public function load($tvShow, $season, array $parameters = array(), array $heade
return $this->getFactory()->create($data);
}
-
/**
* Get the cast & crew information about a TV series.
*
diff --git a/lib/Tmdb/RequestToken.php b/lib/Tmdb/RequestToken.php
index 2968fca8..f791a8a0 100644
--- a/lib/Tmdb/RequestToken.php
+++ b/lib/Tmdb/RequestToken.php
@@ -16,7 +16,8 @@
* Class RequestToken
* @package Tmdb
*/
-class RequestToken {
+class RequestToken
+{
/**
* The token for obtaining a session
*
@@ -47,12 +48,13 @@ public function __construct($request_token = null)
}
/**
- * @param null $token
+ * @param null $token
* @return $this
*/
public function setToken($token)
{
$this->token = $token;
+
return $this;
}
@@ -65,7 +67,7 @@ public function getToken()
}
/**
- * @param mixed $expiresAt
+ * @param mixed $expiresAt
* @return $this
*/
public function setExpiresAt($expiresAt)
@@ -75,6 +77,7 @@ public function setExpiresAt($expiresAt)
}
$this->expiresAt = $expiresAt;
+
return $this;
}
@@ -87,12 +90,13 @@ public function getExpiresAt()
}
/**
- * @param boolean $success
+ * @param boolean $success
* @return $this
*/
public function setSuccess($success)
{
$this->success = $success;
+
return $this;
}
diff --git a/lib/Tmdb/SessionToken.php b/lib/Tmdb/SessionToken.php
index 8af98252..093e0132 100644
--- a/lib/Tmdb/SessionToken.php
+++ b/lib/Tmdb/SessionToken.php
@@ -16,7 +16,8 @@
* Class SessionToken
* @package Tmdb
*/
-class SessionToken {
+class SessionToken
+{
/**
* @var string
*/
@@ -43,12 +44,13 @@ public function __construct($session_token = null)
}
/**
- * @param null $sessionToken
+ * @param null $sessionToken
* @return $this
*/
public function setToken($sessionToken)
{
$this->sessionToken = $sessionToken;
+
return $this;
}
@@ -61,7 +63,7 @@ public function getToken()
}
/**
- * @param \DateTime $expiresAt
+ * @param \DateTime $expiresAt
* @return $this
*/
public function setExpiresAt($expiresAt)
@@ -71,6 +73,7 @@ public function setExpiresAt($expiresAt)
}
$this->expiresAt = $expiresAt;
+
return $this;
}
@@ -83,12 +86,13 @@ public function getExpiresAt()
}
/**
- * @param mixed $success
+ * @param mixed $success
* @return $this
*/
public function setSuccess($success)
{
$this->success = $success;
+
return $this;
}
diff --git a/test/Tmdb/Tests/Api/AccountTest.php b/test/Tmdb/Tests/Api/AccountTest.php
index 06276ecc..81835140 100644
--- a/test/Tmdb/Tests/Api/AccountTest.php
+++ b/test/Tmdb/Tests/Api/AccountTest.php
@@ -77,7 +77,8 @@ public function shouldWatchlist()
$api->watchlist('account_id', true);
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Account';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/AuthenticationTest.php b/test/Tmdb/Tests/Api/AuthenticationTest.php
index 89d0c31b..dd78a12d 100644
--- a/test/Tmdb/Tests/Api/AuthenticationTest.php
+++ b/test/Tmdb/Tests/Api/AuthenticationTest.php
@@ -41,7 +41,8 @@ public function shouldGetNewGuestSession()
$api->getNewGuestSession();
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Authentication';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/CertificationsTest.php b/test/Tmdb/Tests/Api/CertificationsTest.php
index 041d06a0..1b96d121 100644
--- a/test/Tmdb/Tests/Api/CertificationsTest.php
+++ b/test/Tmdb/Tests/Api/CertificationsTest.php
@@ -27,7 +27,8 @@ public function shouldGetCertificationsListForMovies()
$api->getMovieList();
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Certifications';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/ChangesTest.php b/test/Tmdb/Tests/Api/ChangesTest.php
index af952035..7535bc2b 100644
--- a/test/Tmdb/Tests/Api/ChangesTest.php
+++ b/test/Tmdb/Tests/Api/ChangesTest.php
@@ -40,7 +40,8 @@ public function shouldGetPersonChanges()
$api->getPersonChanges();
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Changes';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/CollectionsTest.php b/test/Tmdb/Tests/Api/CollectionsTest.php
index 2b5b6820..295fc240 100644
--- a/test/Tmdb/Tests/Api/CollectionsTest.php
+++ b/test/Tmdb/Tests/Api/CollectionsTest.php
@@ -12,7 +12,7 @@
*/
namespace Tmdb\Tests\Api;
-class ColletionsTest extends TestCase
+class CollectionsTest extends TestCase
{
const COLLECTION_ID = 120;
@@ -42,7 +42,8 @@ public function shouldGetImages()
$api->getImages(self::COLLECTION_ID);
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Collections';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/CompaniesTest.php b/test/Tmdb/Tests/Api/CompaniesTest.php
index ce84f71a..25fe7114 100644
--- a/test/Tmdb/Tests/Api/CompaniesTest.php
+++ b/test/Tmdb/Tests/Api/CompaniesTest.php
@@ -42,7 +42,8 @@ public function shouldGetMovies()
$api->getMovies(self::COMPANY_ID);
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Companies';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/ConfigurationTest.php b/test/Tmdb/Tests/Api/ConfigurationTest.php
index 139215d9..54a83f66 100644
--- a/test/Tmdb/Tests/Api/ConfigurationTest.php
+++ b/test/Tmdb/Tests/Api/ConfigurationTest.php
@@ -27,7 +27,8 @@ public function shouldGetConfiguration()
$api->getConfiguration();
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Configuration';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/CreditsTest.php b/test/Tmdb/Tests/Api/CreditsTest.php
index 49b63aab..24317086 100644
--- a/test/Tmdb/Tests/Api/CreditsTest.php
+++ b/test/Tmdb/Tests/Api/CreditsTest.php
@@ -27,7 +27,8 @@ public function shouldGetCredit()
$api->getCredit('5240760b5dbf5b0c2c0139db');
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Credits';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/DiscoverTest.php b/test/Tmdb/Tests/Api/DiscoverTest.php
index 867e6380..af7d2c87 100644
--- a/test/Tmdb/Tests/Api/DiscoverTest.php
+++ b/test/Tmdb/Tests/Api/DiscoverTest.php
@@ -40,7 +40,8 @@ public function shouldDiscoverTv()
$api->discoverTv();
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Discover';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/GenresTest.php b/test/Tmdb/Tests/Api/GenresTest.php
index 4a715b92..a17d77ab 100644
--- a/test/Tmdb/Tests/Api/GenresTest.php
+++ b/test/Tmdb/Tests/Api/GenresTest.php
@@ -66,7 +66,7 @@ public function shouldGetGenreAndReturnOne()
$api->expects($this->once())
->method('getGenres')
- ->will($this->returnCallback(function(){
+ ->will($this->returnCallback(function () {
return array('genres' => array(array('id' => 28, 'name' => 'Action')));
}))
;
@@ -86,7 +86,7 @@ public function shouldReturnNullWithNoData()
$api->expects($this->once())
->method('getGenres')
- ->will($this->returnCallback(function(){
+ ->will($this->returnCallback(function () {
return array('genres' => array());
}))
;
@@ -96,7 +96,8 @@ public function shouldReturnNullWithNoData()
$this->assertEquals(null, $genre);
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Genres';
}
}
diff --git a/test/Tmdb/Tests/Api/JobsTest.php b/test/Tmdb/Tests/Api/JobsTest.php
index f7e26f71..d11cf8fd 100644
--- a/test/Tmdb/Tests/Api/JobsTest.php
+++ b/test/Tmdb/Tests/Api/JobsTest.php
@@ -27,7 +27,8 @@ public function shouldGetList()
$api->getJobs();
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Jobs';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/KeywordsTest.php b/test/Tmdb/Tests/Api/KeywordsTest.php
index 63859128..e0da163c 100644
--- a/test/Tmdb/Tests/Api/KeywordsTest.php
+++ b/test/Tmdb/Tests/Api/KeywordsTest.php
@@ -42,7 +42,8 @@ public function shouldGetMovies()
$api->getMovies(self::KEYWORD_ID);
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Keywords';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/ListsTest.php b/test/Tmdb/Tests/Api/ListsTest.php
index 030b940b..8d869bf2 100644
--- a/test/Tmdb/Tests/Api/ListsTest.php
+++ b/test/Tmdb/Tests/Api/ListsTest.php
@@ -78,7 +78,8 @@ public function shouldDeleteList()
$api->deleteList(self::LIST_ID);
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Lists';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/MoviesTest.php b/test/Tmdb/Tests/Api/MoviesTest.php
index d2e674f6..92d0c3f7 100644
--- a/test/Tmdb/Tests/Api/MoviesTest.php
+++ b/test/Tmdb/Tests/Api/MoviesTest.php
@@ -255,7 +255,8 @@ public function shouldRateMovie()
$api->rateMovie(self::MOVIE_ID, 7.5);
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Movies';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/NetworksTest.php b/test/Tmdb/Tests/Api/NetworksTest.php
index 14bcbb8b..86234096 100644
--- a/test/Tmdb/Tests/Api/NetworksTest.php
+++ b/test/Tmdb/Tests/Api/NetworksTest.php
@@ -27,7 +27,8 @@ public function shouldGetCredit()
$api->getNetwork(49);
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Networks';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/PeopleTest.php b/test/Tmdb/Tests/Api/PeopleTest.php
index 3421f1d9..257c5e9d 100644
--- a/test/Tmdb/Tests/Api/PeopleTest.php
+++ b/test/Tmdb/Tests/Api/PeopleTest.php
@@ -120,7 +120,8 @@ public function shouldGetLatest()
$api->getLatest();
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\People';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/ReviewsTest.php b/test/Tmdb/Tests/Api/ReviewsTest.php
index 1a655840..c2fba101 100644
--- a/test/Tmdb/Tests/Api/ReviewsTest.php
+++ b/test/Tmdb/Tests/Api/ReviewsTest.php
@@ -29,7 +29,8 @@ public function shouldGetPerson()
$api->getReview(self::REVIEW_ID);
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Reviews';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/SearchTest.php b/test/Tmdb/Tests/Api/SearchTest.php
index ad346057..278a4a3f 100644
--- a/test/Tmdb/Tests/Api/SearchTest.php
+++ b/test/Tmdb/Tests/Api/SearchTest.php
@@ -113,7 +113,8 @@ public function shouldSearchKeyword()
$api->searchKeyword(self::QUERY_KEYWORD);
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Search';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/TestCase.php b/test/Tmdb/Tests/Api/TestCase.php
index 57c4403d..dcd6072b 100644
--- a/test/Tmdb/Tests/Api/TestCase.php
+++ b/test/Tmdb/Tests/Api/TestCase.php
@@ -14,8 +14,6 @@
use Tmdb\Tests\TestCase as Base;
-use Tmdb\ApiToken;
-
abstract class TestCase extends Base
{
private $_api = null;
diff --git a/test/Tmdb/Tests/Api/TvEpisodeTest.php b/test/Tmdb/Tests/Api/TvEpisodeTest.php
index 636d8120..c0af9f20 100644
--- a/test/Tmdb/Tests/Api/TvEpisodeTest.php
+++ b/test/Tmdb/Tests/Api/TvEpisodeTest.php
@@ -70,7 +70,8 @@ public function shouldGetEpisodeImages()
$api->getImages(self::TV_ID, self::SEASON_ID, self::EPISODE_ID);
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\TvEpisode';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/TvSeasonTest.php b/test/Tmdb/Tests/Api/TvSeasonTest.php
index 727e84c4..a1f20ce7 100644
--- a/test/Tmdb/Tests/Api/TvSeasonTest.php
+++ b/test/Tmdb/Tests/Api/TvSeasonTest.php
@@ -69,7 +69,8 @@ public function shouldGetSeasonImages()
$api->getImages(self::TV_ID, self::SEASON_ID);
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\TvSeason';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Api/TvTest.php b/test/Tmdb/Tests/Api/TvTest.php
index 1d6273d9..821f4e2a 100644
--- a/test/Tmdb/Tests/Api/TvTest.php
+++ b/test/Tmdb/Tests/Api/TvTest.php
@@ -107,7 +107,8 @@ public function shouldGetTopRated()
$api->getTopRated();
}
- protected function getApiClass() {
+ protected function getApiClass()
+ {
return 'Tmdb\Api\Tv';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Common/ObjectHydratorTest.php b/test/Tmdb/Tests/Common/ObjectHydratorTest.php
index e6c84177..2de27930 100644
--- a/test/Tmdb/Tests/Common/ObjectHydratorTest.php
+++ b/test/Tmdb/Tests/Common/ObjectHydratorTest.php
@@ -41,19 +41,21 @@ public function callingNonExistingMethodThrowsException()
}
}
-class TestModel extends \Tmdb\Model\AbstractModel {
+class TestModel extends \Tmdb\Model\AbstractModel
+{
private $id;
private $name;
static $_properties = array('id', 'name');
/**
- * @param mixed $id
+ * @param mixed $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
+
return $this;
}
@@ -66,12 +68,13 @@ public function getId()
}
/**
- * @param mixed $name
+ * @param mixed $name
* @return $this
*/
public function setName($name)
{
$this->name = $name;
+
return $this;
}
@@ -84,6 +87,7 @@ public function getName()
}
}
-class FailingTestModel extends \Tmdb\Model\AbstractModel {
+class FailingTestModel extends \Tmdb\Model\AbstractModel
+{
static $_properties = array('lastname');
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/AccountFactoryTest.php b/test/Tmdb/Tests/Factory/AccountFactoryTest.php
index 09610e23..714faba1 100644
--- a/test/Tmdb/Tests/Factory/AccountFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/AccountFactoryTest.php
@@ -161,4 +161,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\AccountFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/AuthenticationFactoryTest.php b/test/Tmdb/Tests/Factory/AuthenticationFactoryTest.php
index 028dfd58..839775e0 100644
--- a/test/Tmdb/Tests/Factory/AuthenticationFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/AuthenticationFactoryTest.php
@@ -98,4 +98,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\AuthenticationFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/CertificationFactoryTest.php b/test/Tmdb/Tests/Factory/CertificationFactoryTest.php
index ee4be58b..d9f8774f 100644
--- a/test/Tmdb/Tests/Factory/CertificationFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/CertificationFactoryTest.php
@@ -40,11 +40,11 @@ public function shouldConstructCertification()
/**
* @var Certification $certificationCountry
*/
- foreach($certificationCollection as $certificationCountry) {
+ foreach ($certificationCollection as $certificationCountry) {
$this->assertInstanceOf('Tmdb\Model\Certification', $certificationCountry);
$this->assertNotEmpty($certificationCountry->getCountry());
- foreach($certificationCountry->getCertifications() as $certification) {
+ foreach ($certificationCountry->getCertifications() as $certification) {
$this->assertInstanceOf('Tmdb\Model\Certification\CountryCertification', $certification);
}
}
@@ -54,4 +54,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\CertificationFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/ChangesFactoryTest.php b/test/Tmdb/Tests/Factory/ChangesFactoryTest.php
index 5524238c..174cc6a2 100644
--- a/test/Tmdb/Tests/Factory/ChangesFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/ChangesFactoryTest.php
@@ -57,4 +57,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\ChangesFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/CollectionFactoryTest.php b/test/Tmdb/Tests/Factory/CollectionFactoryTest.php
index 41cac432..e745221c 100644
--- a/test/Tmdb/Tests/Factory/CollectionFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/CollectionFactoryTest.php
@@ -65,7 +65,6 @@ public function shouldBeAbleToSetFactories()
$this->assertInstanceOf('stdClass', $factory->getImageFactory());
}
-
/**
* @test
*/
@@ -103,4 +102,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\CollectionFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/CompanyFactoryTest.php b/test/Tmdb/Tests/Factory/CompanyFactoryTest.php
index dec99ac2..82aca9ce 100644
--- a/test/Tmdb/Tests/Factory/CompanyFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/CompanyFactoryTest.php
@@ -105,4 +105,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\CompanyFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/ConfigurationFactoryTest.php b/test/Tmdb/Tests/Factory/ConfigurationFactoryTest.php
index 47bb4291..c909900b 100644
--- a/test/Tmdb/Tests/Factory/ConfigurationFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/ConfigurationFactoryTest.php
@@ -59,4 +59,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\ConfigurationFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/CreditsFactoryTest.php b/test/Tmdb/Tests/Factory/CreditsFactoryTest.php
index dc0559f9..795c013e 100644
--- a/test/Tmdb/Tests/Factory/CreditsFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/CreditsFactoryTest.php
@@ -113,4 +113,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\CreditsFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/FindFactoryTest.php b/test/Tmdb/Tests/Factory/FindFactoryTest.php
index 78165d3d..b044f799 100644
--- a/test/Tmdb/Tests/Factory/FindFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/FindFactoryTest.php
@@ -34,15 +34,15 @@ public function shouldConstructFind()
$this->assertInstanceOf('Tmdb\Model\Find', $find);
- foreach($find->getMovieResults() as $movie) {
+ foreach ($find->getMovieResults() as $movie) {
$this->assertInstanceOf('Tmdb\Model\Movie', $movie);
}
- foreach($find->getPersonResults() as $person) {
+ foreach ($find->getPersonResults() as $person) {
$this->assertInstanceOf('Tmdb\Model\Person', $person);
}
- foreach($find->getTvResults() as $tv) {
+ foreach ($find->getTvResults() as $tv) {
$this->assertInstanceOf('Tmdb\Model\Tv', $tv);
}
}
@@ -79,4 +79,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\FindFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/GenreFactoryTest.php b/test/Tmdb/Tests/Factory/GenreFactoryTest.php
index c2c66fbe..6d3daa57 100644
--- a/test/Tmdb/Tests/Factory/GenreFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/GenreFactoryTest.php
@@ -33,7 +33,7 @@ public function shouldConstructGenres()
$filteredGenres = $collection->filterId(self::GENRE_ID);
// @todo actually get the first
- foreach($filteredGenres as $filteredGenre) {
+ foreach ($filteredGenres as $filteredGenre) {
$this->assertInstanceOf('Tmdb\Model\Genre', $filteredGenre);
$this->assertEquals('Action', $filteredGenre->getName());
@@ -55,7 +55,7 @@ public function shouldFilter()
$filteredGenres = $genres->filterId(self::GENRE_ID);
- foreach($filteredGenres as $filteredGenre) {
+ foreach ($filteredGenres as $filteredGenre) {
$this->assertEquals('Action', $filteredGenre->getName());
}
}
@@ -73,7 +73,6 @@ public function shouldCollaborateWithCollection()
*/
$genres = $factory->createCollection($data['genres']);
-
$this->assertEquals(count($data['genres']), count($genres->getGenres()));
$genre = $genres->getGenre(28);
@@ -104,4 +103,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\GenreFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/ImageFactoryTest.php b/test/Tmdb/Tests/Factory/ImageFactoryTest.php
index 3cdf3cd6..57b3eea4 100644
--- a/test/Tmdb/Tests/Factory/ImageFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/ImageFactoryTest.php
@@ -63,7 +63,7 @@ public function shouldFilterPosters()
$posters = $this->images->filterPosters();
- foreach($posters as $poster) {
+ foreach ($posters as $poster) {
$this->assertInstanceOf('Tmdb\Model\Image\PosterImage', $poster);
}
}
@@ -77,7 +77,7 @@ public function shouldFilterBackdrops()
$backdrops = $this->images->filterBackdrops();
- foreach($backdrops as $backdrop) {
+ foreach ($backdrops as $backdrop) {
$this->assertInstanceOf('Tmdb\Model\Image\BackdropImage', $backdrop);
}
}
@@ -91,7 +91,7 @@ public function shouldFilterProfiles()
$profiles = $this->images->filterProfile();
- foreach($profiles as $profile) {
+ foreach ($profiles as $profile) {
$this->assertInstanceOf('Tmdb\Model\Image\ProfileImage', $profile);
}
}
@@ -105,7 +105,7 @@ public function shouldFilterStills()
$stills = $this->images->filterStills();
- foreach($stills as $still) {
+ foreach ($stills as $still) {
$this->assertInstanceOf('Tmdb\Model\Image\StillImage', $still);
}
}
@@ -124,7 +124,7 @@ public function shouldFilterMinHeight()
/**
* @var Image $image
*/
- foreach($images as $image) {
+ foreach ($images as $image) {
$this->assertEquals(true, $image->getHeight() >= 1000);
}
}
@@ -143,7 +143,7 @@ public function shouldFilterMinWidth()
/**
* @var Image $image
*/
- foreach($images as $image) {
+ foreach ($images as $image) {
$this->assertEquals(true, $image->getWidth() >= 1000);
}
}
@@ -162,7 +162,7 @@ public function shouldFilterMaxHeight()
/**
* @var Image $image
*/
- foreach($images as $image) {
+ foreach ($images as $image) {
$this->assertEquals(true, $image->getHeight() <= 1000);
}
}
@@ -181,7 +181,7 @@ public function shouldFilterMaxWidth()
/**
* @var Image $image
*/
- foreach($images as $image) {
+ foreach ($images as $image) {
$this->assertEquals(true, $image->getWidth() <= 1000);
}
}
diff --git a/test/Tmdb/Tests/Factory/JobsFactoryTest.php b/test/Tmdb/Tests/Factory/JobsFactoryTest.php
index 3adccc76..c2e0afa9 100644
--- a/test/Tmdb/Tests/Factory/JobsFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/JobsFactoryTest.php
@@ -14,7 +14,7 @@
use Tmdb\Model\Collection\Jobs;
-class JobFactoryTest extends TestCase
+class JobsFactoryTest extends TestCase
{
private $jobs;
@@ -49,7 +49,7 @@ public function shouldFilterDepartment()
'Special Guest'
);
- foreach($filteredJobs->getJobList() as $filteredJob) {
+ foreach ($filteredJobs->getJobList() as $filteredJob) {
$this->assertEquals(true, in_array($filteredJob, $expectedJobs));
}
}
@@ -79,7 +79,7 @@ public function shouldFilterJobsByDepartment()
'Special Guest'
);
- foreach($filteredJobs as $filteredJob) {
+ foreach ($filteredJobs as $filteredJob) {
$this->assertEquals(true, in_array($filteredJob, $expectedJobs));
}
}
@@ -114,9 +114,8 @@ public function shouldReturnEmptyJobsCollection()
$this->assertEquals(true, empty($filteredJobs));
}
-
protected function getFactoryClass()
{
return 'Tmdb\Factory\JobsFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/KeywordFactoryTest.php b/test/Tmdb/Tests/Factory/KeywordFactoryTest.php
index da20092b..4596b052 100644
--- a/test/Tmdb/Tests/Factory/KeywordFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/KeywordFactoryTest.php
@@ -43,4 +43,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\KeywordFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/ListFactoryTest.php b/test/Tmdb/Tests/Factory/ListFactoryTest.php
index fa0a75d6..5448731a 100644
--- a/test/Tmdb/Tests/Factory/ListFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/ListFactoryTest.php
@@ -160,4 +160,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\ListFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/Movie/AlternativeTitleFactoryTest.php b/test/Tmdb/Tests/Factory/Movie/AlternativeTitleFactoryTest.php
index d238fbd9..791fb90c 100644
--- a/test/Tmdb/Tests/Factory/Movie/AlternativeTitleFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/Movie/AlternativeTitleFactoryTest.php
@@ -43,7 +43,6 @@ public function shouldConstructAlternativeTitle()
$this->assertEquals('Kaas', $title->getTitle());
}
-
/**
* @test
*/
diff --git a/test/Tmdb/Tests/Factory/Movie/GenericCollectionFactoryTest.php b/test/Tmdb/Tests/Factory/Movie/GenericCollectionFactoryTest.php
index a4b6dd13..b19296f0 100644
--- a/test/Tmdb/Tests/Factory/Movie/GenericCollectionFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/Movie/GenericCollectionFactoryTest.php
@@ -13,9 +13,7 @@
namespace Tmdb\Tests\Factory\Movie;
use Tmdb\Factory\Common\GenericCollectionFactory;
-use Tmdb\Factory\Movie\AlternativeTitleFactory;
use Tmdb\Model\AbstractModel;
-use Tmdb\Model\Movie\AlternativeTitle;
use Tmdb\Tests\Factory\TestCase;
class GenericCollectionFactoryTest extends TestCase
@@ -37,7 +35,7 @@ public function shouldBeAbleToCreateCollection()
$this->assertEquals(2, count($collection));
- foreach($collection as $item) {
+ foreach ($collection as $item) {
$this->assertEquals(2, $item->getId());
}
}
@@ -48,19 +46,20 @@ protected function getFactoryClass()
}
}
-class FakeClass extends AbstractModel {
-
+class FakeClass extends AbstractModel
+{
public static $_properties = array('id');
private $id;
/**
- * @param mixed $id
+ * @param mixed $id
* @return $this
*/
public function setId($id)
{
$this->id = $id;
+
return $this;
}
diff --git a/test/Tmdb/Tests/Factory/MovieFactoryTest.php b/test/Tmdb/Tests/Factory/MovieFactoryTest.php
index 0762844b..3cdf07e9 100644
--- a/test/Tmdb/Tests/Factory/MovieFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/MovieFactoryTest.php
@@ -133,11 +133,11 @@ public function shouldGetProfileImages()
/**
* @var CastMember $c
*/
- foreach($cast as $c) {
+ foreach ($cast as $c) {
if ($c->hasProfileImage()) {
$filePath = $c->getProfileImage()->getFilePath();
$this->assertEquals(false, empty($filePath));
- }else{
+ } else {
$this->assertEquals(null, $c->getProfileImage());
}
}
@@ -147,4 +147,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\MovieFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/PeopleFactoryTest.php b/test/Tmdb/Tests/Factory/PeopleFactoryTest.php
index cbfdb333..c6b6e704 100644
--- a/test/Tmdb/Tests/Factory/PeopleFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/PeopleFactoryTest.php
@@ -151,4 +151,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\PeopleFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/ReviewFactoryTest.php b/test/Tmdb/Tests/Factory/ReviewFactoryTest.php
index 7368fb8d..51adf26b 100644
--- a/test/Tmdb/Tests/Factory/ReviewFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/ReviewFactoryTest.php
@@ -56,4 +56,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\ReviewFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/TestCase.php b/test/Tmdb/Tests/Factory/TestCase.php
index aef33e44..24cdb61a 100644
--- a/test/Tmdb/Tests/Factory/TestCase.php
+++ b/test/Tmdb/Tests/Factory/TestCase.php
@@ -21,6 +21,7 @@ abstract class TestCase extends Base
protected function getFactory()
{
$class = $this->getFactoryClass();
+
return new $class();
}
diff --git a/test/Tmdb/Tests/Factory/TvEpisodeFactoryTest.php b/test/Tmdb/Tests/Factory/TvEpisodeFactoryTest.php
index 36f1e4aa..7f7a61b1 100644
--- a/test/Tmdb/Tests/Factory/TvEpisodeFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/TvEpisodeFactoryTest.php
@@ -94,4 +94,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\TvEpisodeFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/TvFactoryTest.php b/test/Tmdb/Tests/Factory/TvFactoryTest.php
index 48424bfc..5574b124 100644
--- a/test/Tmdb/Tests/Factory/TvFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/TvFactoryTest.php
@@ -21,7 +21,7 @@ class TvFactoryTest extends TestCase
* @var Tv
*/
private $tv;
-
+
public function setUp()
{
/**
@@ -37,7 +37,7 @@ public function setUp()
*/
$this->tv = $factory->create($data);
}
-
+
/**
* @test
*/
@@ -139,4 +139,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\TvFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Factory/TvSeasonFactoryTest.php b/test/Tmdb/Tests/Factory/TvSeasonFactoryTest.php
index 1ea783ad..f94125fa 100644
--- a/test/Tmdb/Tests/Factory/TvSeasonFactoryTest.php
+++ b/test/Tmdb/Tests/Factory/TvSeasonFactoryTest.php
@@ -92,4 +92,4 @@ protected function getFactoryClass()
{
return 'Tmdb\Factory\TvSeasonFactory';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/HttpClient/HttpClientTest.php b/test/Tmdb/Tests/HttpClient/HttpClientTest.php
index afd42a7e..428e06aa 100644
--- a/test/Tmdb/Tests/HttpClient/HttpClientTest.php
+++ b/test/Tmdb/Tests/HttpClient/HttpClientTest.php
@@ -126,7 +126,6 @@ public function shouldCallDelete()
$this->testApi->delete('/');
}
-
/**
* @test
*/
@@ -172,7 +171,8 @@ public function shouldBeAbleToOverrideClient()
}
}
-class TestApi extends AbstractApi {
+class TestApi extends AbstractApi
+{
/**
* @var \Tmdb\HttpClient\HttpClient
*/
@@ -213,7 +213,8 @@ public function put($path, $body = null, array $parameters = array(), $headers =
$this->client->getHttpClient()->put('http://www.google.com/');
}
- public function addSubscriber($event) {
+ public function addSubscriber($event)
+ {
$this->client->getHttpClient()->addSubscriber($event);
}
}
diff --git a/test/Tmdb/Tests/HttpClient/Plugin/AcceptJsonHeaderPluginTest.php b/test/Tmdb/Tests/HttpClient/Plugin/AcceptJsonHeaderPluginTest.php
index 6c55b91f..15c25376 100644
--- a/test/Tmdb/Tests/HttpClient/Plugin/AcceptJsonHeaderPluginTest.php
+++ b/test/Tmdb/Tests/HttpClient/Plugin/AcceptJsonHeaderPluginTest.php
@@ -40,4 +40,4 @@ public function shouldAddToken()
$this->assertEquals('application/json', (string) $header);
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/HttpClient/Plugin/AdultFilterPluginTest.php b/test/Tmdb/Tests/HttpClient/Plugin/AdultFilterPluginTest.php
index ee177bfa..d7728dc4 100644
--- a/test/Tmdb/Tests/HttpClient/Plugin/AdultFilterPluginTest.php
+++ b/test/Tmdb/Tests/HttpClient/Plugin/AdultFilterPluginTest.php
@@ -35,4 +35,4 @@ public function shouldAddToken()
$this->assertEquals('/?include_adult=false', $event['request']->getUrl());
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/HttpClient/Plugin/ApiTokenPluginTest.php b/test/Tmdb/Tests/HttpClient/Plugin/ApiTokenPluginTest.php
index ed2583c7..5b146139 100644
--- a/test/Tmdb/Tests/HttpClient/Plugin/ApiTokenPluginTest.php
+++ b/test/Tmdb/Tests/HttpClient/Plugin/ApiTokenPluginTest.php
@@ -37,4 +37,4 @@ public function shouldAddToken()
$this->assertEquals('/?api_key=abcdef', $event['request']->getUrl());
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/HttpClient/Plugin/LanguageFilterPluginTest.php b/test/Tmdb/Tests/HttpClient/Plugin/LanguageFilterPluginTest.php
index 0405a544..0c15bc5f 100644
--- a/test/Tmdb/Tests/HttpClient/Plugin/LanguageFilterPluginTest.php
+++ b/test/Tmdb/Tests/HttpClient/Plugin/LanguageFilterPluginTest.php
@@ -35,4 +35,4 @@ public function shouldAddToken()
$this->assertEquals('/?language=en', $event['request']->getUrl());
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/HttpClient/Plugin/SessionTokenPluginTest.php b/test/Tmdb/Tests/HttpClient/Plugin/SessionTokenPluginTest.php
index 47175065..12cd70e9 100644
--- a/test/Tmdb/Tests/HttpClient/Plugin/SessionTokenPluginTest.php
+++ b/test/Tmdb/Tests/HttpClient/Plugin/SessionTokenPluginTest.php
@@ -37,4 +37,4 @@ public function shouldAddToken()
$this->assertEquals('/?session_id=abcdef', $event['request']->getUrl());
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Model/ChangeTest.php b/test/Tmdb/Tests/Model/ChangeTest.php
index 642e66ae..1cf697a7 100644
--- a/test/Tmdb/Tests/Model/ChangeTest.php
+++ b/test/Tmdb/Tests/Model/ChangeTest.php
@@ -29,4 +29,4 @@ public function isFunctional()
$this->assertEquals(1, $change->getId());
$this->assertEquals(false, $change->getAdult());
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Model/Collection/KeywordsTest.php b/test/Tmdb/Tests/Model/Collection/KeywordsTest.php
index a39b7be5..c7ddef32 100644
--- a/test/Tmdb/Tests/Model/Collection/KeywordsTest.php
+++ b/test/Tmdb/Tests/Model/Collection/KeywordsTest.php
@@ -32,7 +32,7 @@ public function setUp()
{
$this->collection = new Keywords();
- foreach($this->keywords as $keyword) {
+ foreach ($this->keywords as $keyword) {
$object = $this->hydrate(new Keyword(), $keyword);
$this->collection->addKeyword($object);
diff --git a/test/Tmdb/Tests/Model/Collection/PeopleTest.php b/test/Tmdb/Tests/Model/Collection/PeopleTest.php
index 3aa17116..e0637429 100644
--- a/test/Tmdb/Tests/Model/Collection/PeopleTest.php
+++ b/test/Tmdb/Tests/Model/Collection/PeopleTest.php
@@ -32,7 +32,7 @@ public function setUp()
{
$this->collection = new People();
- foreach($this->people as $person) {
+ foreach ($this->people as $person) {
$object = $this->hydrate(new Person(), $person);
$this->collection->addPerson($object);
diff --git a/test/Tmdb/Tests/Model/ImageTest.php b/test/Tmdb/Tests/Model/ImageTest.php
index 778eafcd..f2f0bf06 100644
--- a/test/Tmdb/Tests/Model/ImageTest.php
+++ b/test/Tmdb/Tests/Model/ImageTest.php
@@ -39,7 +39,7 @@ public function setUp()
{
$this->collection = new Images();
- foreach($this->images as $image) {
+ foreach ($this->images as $image) {
$factory = new ImageFactory();
$object = $factory->create($image);
diff --git a/test/Tmdb/Tests/Model/MovieTest.php b/test/Tmdb/Tests/Model/MovieTest.php
index 0c51b6a1..95a0fdc8 100644
--- a/test/Tmdb/Tests/Model/MovieTest.php
+++ b/test/Tmdb/Tests/Model/MovieTest.php
@@ -77,4 +77,4 @@ public function shouldAllowOverridingDefaultCollectionObjects()
)
);
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Model/PersonTest.php b/test/Tmdb/Tests/Model/PersonTest.php
index 26dc0961..0032f117 100644
--- a/test/Tmdb/Tests/Model/PersonTest.php
+++ b/test/Tmdb/Tests/Model/PersonTest.php
@@ -76,4 +76,4 @@ public function shouldAllowOverridingDefaultCollectionObjects()
)
);
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Model/Query/ChangesQueryTest.php b/test/Tmdb/Tests/Model/Query/ChangesQueryTest.php
index 751951ee..e0eebcd8 100644
--- a/test/Tmdb/Tests/Model/Query/ChangesQueryTest.php
+++ b/test/Tmdb/Tests/Model/Query/ChangesQueryTest.php
@@ -37,4 +37,4 @@ public function shouldCreateValidQuery()
$this->assertEquals($tomorrow->format('Y-m-d'), $query->get('to'));
$this->assertEquals(1, $query->get('page'));
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Model/Query/Discover/DiscoverMoviesQueryTest.php b/test/Tmdb/Tests/Model/Query/Discover/DiscoverMoviesQueryTest.php
index 4ee93427..41446cae 100644
--- a/test/Tmdb/Tests/Model/Query/Discover/DiscoverMoviesQueryTest.php
+++ b/test/Tmdb/Tests/Model/Query/Discover/DiscoverMoviesQueryTest.php
@@ -48,4 +48,4 @@ public function shouldCreateValidQuery()
$this->assertEquals(13, count($query));
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Model/Query/Discover/DiscoverTvQueryTest.php b/test/Tmdb/Tests/Model/Query/Discover/DiscoverTvQueryTest.php
index 98bf767e..297e1d42 100644
--- a/test/Tmdb/Tests/Model/Query/Discover/DiscoverTvQueryTest.php
+++ b/test/Tmdb/Tests/Model/Query/Discover/DiscoverTvQueryTest.php
@@ -43,4 +43,4 @@ public function shouldCreateValidQuery()
$this->assertEquals(10, count($query));
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Model/Tv/EpisodeTest.php b/test/Tmdb/Tests/Model/Tv/EpisodeTest.php
index e64a9b3f..b2060caa 100644
--- a/test/Tmdb/Tests/Model/Tv/EpisodeTest.php
+++ b/test/Tmdb/Tests/Model/Tv/EpisodeTest.php
@@ -47,4 +47,4 @@ public function shouldBeAbleToOverrideDefaultCollections()
$this->assertInstanceOf('stdClass', $episode->getCredits());
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Model/TvTest.php b/test/Tmdb/Tests/Model/TvTest.php
index e2cbaec8..03de6d43 100644
--- a/test/Tmdb/Tests/Model/TvTest.php
+++ b/test/Tmdb/Tests/Model/TvTest.php
@@ -40,4 +40,4 @@ public function shouldConstructMovie()
)
);
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/AccountRepositoryTest.php b/test/Tmdb/Tests/Repository/AccountRepositoryTest.php
index 33571324..2dca8ef1 100644
--- a/test/Tmdb/Tests/Repository/AccountRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/AccountRepositoryTest.php
@@ -123,4 +123,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\AccountRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/AuthenticationRepositoryTest.php b/test/Tmdb/Tests/Repository/AuthenticationRepositoryTest.php
index 085f26f1..e74546c9 100644
--- a/test/Tmdb/Tests/Repository/AuthenticationRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/AuthenticationRepositoryTest.php
@@ -13,7 +13,6 @@
namespace Tmdb\Tests\Repository;
use Tmdb\Api\Authentication;
-use Tmdb\Model\Movie;
use Tmdb\Repository\AuthenticationRepository;
use Tmdb\RequestToken;
@@ -78,4 +77,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\AuthenticationRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/CertificationRepositoryTest.php b/test/Tmdb/Tests/Repository/CertificationRepositoryTest.php
index d0f766cc..c6d2f5ba 100644
--- a/test/Tmdb/Tests/Repository/CertificationRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/CertificationRepositoryTest.php
@@ -33,4 +33,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\CertificationRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/ChangesRepositoryTest.php b/test/Tmdb/Tests/Repository/ChangesRepositoryTest.php
index 0dc0499d..9dce2e27 100644
--- a/test/Tmdb/Tests/Repository/ChangesRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/ChangesRepositoryTest.php
@@ -49,4 +49,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\ChangesRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/CollectionRepositoryTest.php b/test/Tmdb/Tests/Repository/CollectionRepositoryTest.php
index adfe7cfe..12520536 100644
--- a/test/Tmdb/Tests/Repository/CollectionRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/CollectionRepositoryTest.php
@@ -63,4 +63,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\CollectionRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/CompanyRepositoryTest.php b/test/Tmdb/Tests/Repository/CompanyRepositoryTest.php
index a29b2063..b2712ce0 100644
--- a/test/Tmdb/Tests/Repository/CompanyRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/CompanyRepositoryTest.php
@@ -36,7 +36,6 @@ public function shouldGetMovies()
$repository->getMovies(self::COMPANY_ID);
}
-
/**
* @test
*/
@@ -51,7 +50,7 @@ public function callingGetMoviesWithFakeRequestWillReturnMovieCollection()
))
);
- foreach($collection as $movie) {
+ foreach ($collection as $movie) {
$this->assertInstanceOf('Tmdb\Model\Movie', $movie);
}
}
@@ -65,4 +64,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\CompanyRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/ConfigurationRepositoryTest.php b/test/Tmdb/Tests/Repository/ConfigurationRepositoryTest.php
index 9382e2ca..53cf5e91 100644
--- a/test/Tmdb/Tests/Repository/ConfigurationRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/ConfigurationRepositoryTest.php
@@ -33,4 +33,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\ConfigurationRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/CreditsRepositoryTest.php b/test/Tmdb/Tests/Repository/CreditsRepositoryTest.php
index 17047c4a..96737986 100644
--- a/test/Tmdb/Tests/Repository/CreditsRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/CreditsRepositoryTest.php
@@ -37,4 +37,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\CreditsRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/DiscoverRepositoryTest.php b/test/Tmdb/Tests/Repository/DiscoverRepositoryTest.php
index 30912606..b28dfa70 100644
--- a/test/Tmdb/Tests/Repository/DiscoverRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/DiscoverRepositoryTest.php
@@ -76,4 +76,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\DiscoverRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/FindRepositoryTest.php b/test/Tmdb/Tests/Repository/FindRepositoryTest.php
index cc71a8f9..a2cdb4df 100644
--- a/test/Tmdb/Tests/Repository/FindRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/FindRepositoryTest.php
@@ -33,4 +33,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\FindRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/GenreRepositoryTest.php b/test/Tmdb/Tests/Repository/GenreRepositoryTest.php
index a2b2e00f..7690851f 100644
--- a/test/Tmdb/Tests/Repository/GenreRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/GenreRepositoryTest.php
@@ -65,4 +65,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\GenreRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/JobsRepositoryTest.php b/test/Tmdb/Tests/Repository/JobsRepositoryTest.php
index db0177ff..e5d0c17b 100644
--- a/test/Tmdb/Tests/Repository/JobsRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/JobsRepositoryTest.php
@@ -53,4 +53,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\JobsRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/KeywordRepositoryTest.php b/test/Tmdb/Tests/Repository/KeywordRepositoryTest.php
index df55ae31..00c3577f 100644
--- a/test/Tmdb/Tests/Repository/KeywordRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/KeywordRepositoryTest.php
@@ -60,4 +60,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\KeywordRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/ListRepositoryTest.php b/test/Tmdb/Tests/Repository/ListRepositoryTest.php
index 3c6a045d..e1dde4e6 100644
--- a/test/Tmdb/Tests/Repository/ListRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/ListRepositoryTest.php
@@ -86,4 +86,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\ListRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/MovieRepositoryTest.php b/test/Tmdb/Tests/Repository/MovieRepositoryTest.php
index a904427c..fa035cfc 100644
--- a/test/Tmdb/Tests/Repository/MovieRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/MovieRepositoryTest.php
@@ -237,4 +237,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\MovieRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/NetworkRepositoryTest.php b/test/Tmdb/Tests/Repository/NetworkRepositoryTest.php
index 7e8779a7..c85575e9 100644
--- a/test/Tmdb/Tests/Repository/NetworkRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/NetworkRepositoryTest.php
@@ -45,4 +45,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\NetworkRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/PeopleRepositoryTest.php b/test/Tmdb/Tests/Repository/PeopleRepositoryTest.php
index 437d5a2c..bee8aca5 100644
--- a/test/Tmdb/Tests/Repository/PeopleRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/PeopleRepositoryTest.php
@@ -65,4 +65,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\PeopleRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/ReviewRepositoryTest.php b/test/Tmdb/Tests/Repository/ReviewRepositoryTest.php
index 72f20e09..16634890 100644
--- a/test/Tmdb/Tests/Repository/ReviewRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/ReviewRepositoryTest.php
@@ -45,4 +45,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\ReviewRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/SearchRepositoryTest.php b/test/Tmdb/Tests/Repository/SearchRepositoryTest.php
index 7aca396f..4bf137f3 100644
--- a/test/Tmdb/Tests/Repository/SearchRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/SearchRepositoryTest.php
@@ -165,4 +165,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\SearchRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/TestCase.php b/test/Tmdb/Tests/Repository/TestCase.php
index aa1e0ebf..c0071804 100644
--- a/test/Tmdb/Tests/Repository/TestCase.php
+++ b/test/Tmdb/Tests/Repository/TestCase.php
@@ -14,8 +14,6 @@
use Tmdb\Tests\TestCase as Base;
-use Guzzle\Http\Message\Response;
-use Tmdb\ApiToken;
use Tmdb\Client;
abstract class TestCase extends Base
@@ -39,4 +37,4 @@ protected function getRepositoryMock($client = null, array $methods = array())
return $this->getMock($this->getRepositoryClass(), array_merge(array('getApi'), $methods), array($client));
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/TvEpisodeRepositoryTest.php b/test/Tmdb/Tests/Repository/TvEpisodeRepositoryTest.php
index 5221e7f2..638f5034 100644
--- a/test/Tmdb/Tests/Repository/TvEpisodeRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/TvEpisodeRepositoryTest.php
@@ -125,7 +125,6 @@ public function shouldThrowExceptionWhenConditionsNotMet()
$repository->load($tv, $season, null);
}
-
/**
* @expectedException Tmdb\Exception\RuntimeException
* @test
@@ -137,7 +136,6 @@ public function shouldThrowExceptionWhenConditionsNotMetAll()
$repository->load(null, null, null);
}
-
protected function getApiClass()
{
return 'Tmdb\Api\TvEpisode';
@@ -147,4 +145,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\TvEpisodeRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/TvRepositoryTest.php b/test/Tmdb/Tests/Repository/TvRepositoryTest.php
index ec992b05..e814e42e 100644
--- a/test/Tmdb/Tests/Repository/TvRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/TvRepositoryTest.php
@@ -105,4 +105,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\TvRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/Repository/TvSeasonRepositoryTest.php b/test/Tmdb/Tests/Repository/TvSeasonRepositoryTest.php
index aa33f4e4..ea22b6c8 100644
--- a/test/Tmdb/Tests/Repository/TvSeasonRepositoryTest.php
+++ b/test/Tmdb/Tests/Repository/TvSeasonRepositoryTest.php
@@ -117,7 +117,6 @@ public function shouldThrowExceptionWhenConditionsNotMetAll()
$repository->load(null, null);
}
-
protected function getApiClass()
{
return 'Tmdb\Api\TvSeason';
@@ -127,4 +126,4 @@ protected function getRepositoryClass()
{
return 'Tmdb\Repository\TvSeasonRepository';
}
-}
\ No newline at end of file
+}
diff --git a/test/Tmdb/Tests/TestCase.php b/test/Tmdb/Tests/TestCase.php
index e4f3ad08..3bdec4b6 100644
--- a/test/Tmdb/Tests/TestCase.php
+++ b/test/Tmdb/Tests/TestCase.php
@@ -23,16 +23,15 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase
* Assert that an array of methods and corresponding classes match
*
* @param $subject
- * @param array $instances
+ * @param array $instances
* @throws \Exception
*/
protected function assertInstancesOf($subject, array $instances = array())
{
- foreach($instances as $method => $instance) {
+ foreach ($instances as $method => $instance) {
try {
$this->assertInstanceOf($instance, $subject->$method());
- }
- catch(\Exception $e){
+ } catch (\Exception $e) {
throw new \Exception(sprintf(
'Failed asserting that calling "%s" returns an instance of expected "%s".',
sprintf('%s::%s', get_class($subject), $method),
@@ -111,7 +110,7 @@ protected function getMockedTmdbClient()
/**
* Get mocked http client
*
- * @param array $methods
+ * @param array $methods
* @return \PHPUnit_Framework_MockObject_MockObject
*/
protected function getMockedHttpClient(array $methods = array())
@@ -129,7 +128,8 @@ protected function getMockedHttpClient(array $methods = array())
* @param $data
* @return \Tmdb\Model\AbstractModel
*/
- protected function hydrate($object, $data) {
+ protected function hydrate($object, $data)
+ {
$objectHydrator = new ObjectHydrator();
return $objectHydrator->hydrate($object, $data);
diff --git a/test/bootstrap.php b/test/bootstrap.php
index ab46da51..f071995e 100644
--- a/test/bootstrap.php
+++ b/test/bootstrap.php
@@ -10,7 +10,8 @@
* @copyright (c) 2013, Michael Roterman
* @version 0.0.1
*/
-function includeIfExists($file) {
+function includeIfExists($file)
+{
if (file_exists($file)) {
return include $file;
}
@@ -24,4 +25,4 @@ function includeIfExists($file) {
$loader->add('Tmdb\Tests', __DIR__);
-return $loader;
\ No newline at end of file
+return $loader;