From 5f3dc67adbda901d51de57d0ba8f7bb51ede8622 Mon Sep 17 00:00:00 2001 From: Michael Roterman Date: Sun, 26 Jan 2014 16:14:51 +0100 Subject: [PATCH] Fixing docblocks / use statements. --- lib/Tmdb/Api/AbstractApi.php | 2 +- lib/Tmdb/Api/Companies.php | 2 +- lib/Tmdb/Client.php | 5 +---- lib/Tmdb/Common/ObjectHydrator.php | 2 +- lib/Tmdb/Factory/ImageFactory.php | 4 ++-- lib/Tmdb/Factory/People/PeopleFactory.php | 1 - lib/Tmdb/Factory/TvEpisodeFactory.php | 2 -- lib/Tmdb/Factory/TvFactory.php | 2 -- lib/Tmdb/Factory/TvSeasonFactory.php | 3 --- lib/Tmdb/HttpClient/HttpClient.php | 2 +- lib/Tmdb/HttpClient/HttpClientInterface.php | 13 ++++++++----- lib/Tmdb/Repository/MovieRepository.php | 4 ++-- lib/Tmdb/Repository/PeopleRepository.php | 1 - lib/Tmdb/Repository/TvEpisodeRepository.php | 2 +- lib/Tmdb/Repository/TvRepository.php | 4 ++-- lib/Tmdb/Repository/TvSeasonRepository.php | 2 +- 16 files changed, 21 insertions(+), 30 deletions(-) diff --git a/lib/Tmdb/Api/AbstractApi.php b/lib/Tmdb/Api/AbstractApi.php index f064051b..4d12baa2 100644 --- a/lib/Tmdb/Api/AbstractApi.php +++ b/lib/Tmdb/Api/AbstractApi.php @@ -38,7 +38,7 @@ public function __construct(Client $client) /** * Send a GET request * - * @param $path + * @param string $path * @param array $parameters * @param array $headers * @return mixed diff --git a/lib/Tmdb/Api/Companies.php b/lib/Tmdb/Api/Companies.php index 190755ce..dd19a68a 100644 --- a/lib/Tmdb/Api/Companies.php +++ b/lib/Tmdb/Api/Companies.php @@ -31,7 +31,7 @@ public function getCompany($company_id, array $options = array(), array $headers /** * Get the list of movies associated with a particular company. * - * @param $company_id + * @param integer $company_id * @param array $options * @param array $headers * @return mixed diff --git a/lib/Tmdb/Client.php b/lib/Tmdb/Client.php index 703612b2..a67d7dd6 100644 --- a/lib/Tmdb/Client.php +++ b/lib/Tmdb/Client.php @@ -14,11 +14,8 @@ use Guzzle\Http\Client as GuzzleClient; use Guzzle\Http\ClientInterface; - -use Tmdb\Exception\InvalidArgumentException; use Tmdb\HttpClient\HttpClient; use Tmdb\HttpClient\HttpClientInterface; - use Tmdb\ApiToken as Token; use Tmdb\HttpClient\Plugin\AcceptJsonHeaderPlugin; use Tmdb\HttpClient\Plugin\ApiTokenPlugin; @@ -69,7 +66,7 @@ class Client { * Construct our client * * @param ClientInterface|null $httpClient - * @param Token|null $token + * @param ApiToken $token * @param boolean $secure */ public function __construct(Token $token, ClientInterface $httpClient = null, $secure = false) diff --git a/lib/Tmdb/Common/ObjectHydrator.php b/lib/Tmdb/Common/ObjectHydrator.php index 7e622a60..01412a09 100644 --- a/lib/Tmdb/Common/ObjectHydrator.php +++ b/lib/Tmdb/Common/ObjectHydrator.php @@ -55,7 +55,7 @@ public static function hydrate(AbstractModel $object, $data = array()) * * @see https://gist.github.com/troelskn/751517 * - * @param $candidate + * @param string $candidate * @return string */ private function camelize($candidate) diff --git a/lib/Tmdb/Factory/ImageFactory.php b/lib/Tmdb/Factory/ImageFactory.php index 7d0c506a..47c3eab3 100644 --- a/lib/Tmdb/Factory/ImageFactory.php +++ b/lib/Tmdb/Factory/ImageFactory.php @@ -39,7 +39,7 @@ public static function create(array $data = array(), $key = null) * '/xkQ5yWnMjpC2bGmu7GsD66AAoKO.jpg', 'backdrop_path' * * @param $path - * @param $key + * @param string $key * @return \Tmdb\Model\Image */ public static function createFromPath($path, $key) @@ -53,7 +53,7 @@ public static function createFromPath($path, $key) /** * Return possible image type keys * - * @return array + * @return string[] */ public static function getPossibleKeys() { diff --git a/lib/Tmdb/Factory/People/PeopleFactory.php b/lib/Tmdb/Factory/People/PeopleFactory.php index 9822818b..e5f2c2ee 100644 --- a/lib/Tmdb/Factory/People/PeopleFactory.php +++ b/lib/Tmdb/Factory/People/PeopleFactory.php @@ -14,7 +14,6 @@ use Tmdb\Factory\AbstractFactory; use Tmdb\Factory\ImageFactory; - use Tmdb\Model\Common\GenericCollection; use Tmdb\Model\Person\CastMember; use Tmdb\Model\Person\CrewMember; diff --git a/lib/Tmdb/Factory/TvEpisodeFactory.php b/lib/Tmdb/Factory/TvEpisodeFactory.php index f18a2b81..f87a66a6 100644 --- a/lib/Tmdb/Factory/TvEpisodeFactory.php +++ b/lib/Tmdb/Factory/TvEpisodeFactory.php @@ -12,11 +12,9 @@ */ namespace Tmdb\Factory; -use Tmdb\Factory\Common\GenericCollectionFactory; use Tmdb\Factory\People\CastFactory; use Tmdb\Factory\People\CrewFactory; use Tmdb\Model\Common\GenericCollection; - use Tmdb\Model\Tv\ExternalIds; use Tmdb\Model\Tv\Person\CastMember; use Tmdb\Model\Tv\Person\CrewMember; diff --git a/lib/Tmdb/Factory/TvFactory.php b/lib/Tmdb/Factory/TvFactory.php index 9fe045cc..ad773eac 100644 --- a/lib/Tmdb/Factory/TvFactory.php +++ b/lib/Tmdb/Factory/TvFactory.php @@ -15,9 +15,7 @@ use Tmdb\Factory\Common\GenericCollectionFactory; use Tmdb\Factory\People\CastFactory; use Tmdb\Factory\People\CrewFactory; - use Tmdb\Model\Common\GenericCollection; - use Tmdb\Model\Common\Translation; use Tmdb\Model\Tv\ExternalIds; use Tmdb\Model\Tv; diff --git a/lib/Tmdb/Factory/TvSeasonFactory.php b/lib/Tmdb/Factory/TvSeasonFactory.php index c8d75caf..8be78043 100644 --- a/lib/Tmdb/Factory/TvSeasonFactory.php +++ b/lib/Tmdb/Factory/TvSeasonFactory.php @@ -12,12 +12,9 @@ */ namespace Tmdb\Factory; -use Tmdb\Factory\Common\GenericCollectionFactory; use Tmdb\Factory\People\CastFactory; use Tmdb\Factory\People\CrewFactory; use Tmdb\Model\Common\GenericCollection; - -use Tmdb\Model\Tv\Episode; use Tmdb\Model\Tv\ExternalIds; use Tmdb\Model\Tv\Person\CastMember; use Tmdb\Model\Tv\Person\CrewMember; diff --git a/lib/Tmdb/HttpClient/HttpClient.php b/lib/Tmdb/HttpClient/HttpClient.php index 5c0ca343..fef94e20 100644 --- a/lib/Tmdb/HttpClient/HttpClient.php +++ b/lib/Tmdb/HttpClient/HttpClient.php @@ -43,7 +43,7 @@ class HttpClient /** * Constructor * - * @param $baseUrl + * @param string $baseUrl * @param array $options * @param ClientInterface $client */ diff --git a/lib/Tmdb/HttpClient/HttpClientInterface.php b/lib/Tmdb/HttpClient/HttpClientInterface.php index e4a260e5..e00f11d6 100644 --- a/lib/Tmdb/HttpClient/HttpClientInterface.php +++ b/lib/Tmdb/HttpClient/HttpClientInterface.php @@ -12,6 +12,7 @@ */ namespace Tmdb\HttpClient; +use Guzzle\Common\Exception\InvalidArgumentException; use Guzzle\Http\Message\RequestInterface; use Guzzle\Http\Message\Response; @@ -24,7 +25,7 @@ interface HttpClientInterface * @param array $parameters GET Parameters * @param array $headers Reconfigure the request headers for this call only * - * @return array Data + * @return Response Data */ public function get($path, array $parameters = array(), array $headers = array()); @@ -36,7 +37,7 @@ public function get($path, array $parameters = array(), array $headers = array() * @param array $parameters POST Parameters * @param array $headers Reconfigure the request headers for this call only * - * @return array Data + * @return Response Data */ public function post($path, $postBody, array $parameters = array(), array $headers = array()); @@ -48,7 +49,7 @@ public function post($path, $postBody, array $parameters = array(), array $heade * @param array $parameters PATCH Parameters * @param array $headers Reconfigure the request headers for this call only * - * @return array Data + * @return Response Data */ public function patch($path, $body = null, array $parameters = array(), array $headers = array()); @@ -60,7 +61,7 @@ public function patch($path, $body = null, array $parameters = array(), array $h * @param array $parameters PUT Parameters * @param array $headers Reconfigure the request headers for this call only * - * @return array Data + * @return Response Data */ public function put($path, $body = null, array $parameters = array(), array $headers = array()); @@ -72,7 +73,7 @@ public function put($path, $body = null, array $parameters = array(), array $hea * @param array $parameters DELETE Parameters * @param array $headers Reconfigure the request headers for this call only * - * @return array Data + * @return Response Data */ public function delete($path, $body = null, array $parameters = array(), array $headers = array()); @@ -91,6 +92,7 @@ public function request(RequestInterface $request); * @param mixed $value The value * * @throws InvalidArgumentException + * @return void */ public function setOption($name, $value); @@ -98,6 +100,7 @@ public function setOption($name, $value); * Set HTTP headers * * @param array $headers + * @return void */ public function setHeaders(array $headers); } \ No newline at end of file diff --git a/lib/Tmdb/Repository/MovieRepository.php b/lib/Tmdb/Repository/MovieRepository.php index feb12b17..395718f6 100644 --- a/lib/Tmdb/Repository/MovieRepository.php +++ b/lib/Tmdb/Repository/MovieRepository.php @@ -28,7 +28,7 @@ class MovieRepository extends AbstractRepository { * @param $id * @param $parameters * @param $headers - * @return Movie + * @return null|\Tmdb\Model\AbstractModel */ public function load($id, array $parameters = array(), array $headers = array()) { @@ -70,7 +70,7 @@ public function getApi() * Get the latest movie. * * @param array $options - * @return Movie + * @return null|\Tmdb\Model\AbstractModel */ public function getLatest(array $options = array()) { diff --git a/lib/Tmdb/Repository/PeopleRepository.php b/lib/Tmdb/Repository/PeopleRepository.php index 600a6d29..411af14e 100644 --- a/lib/Tmdb/Repository/PeopleRepository.php +++ b/lib/Tmdb/Repository/PeopleRepository.php @@ -14,7 +14,6 @@ use Tmdb\Factory\People\PeopleFactory; use Tmdb\Model\Person; - use Tmdb\Model\Person\QueryParameter\AppendToResponse; class PeopleRepository extends AbstractRepository { diff --git a/lib/Tmdb/Repository/TvEpisodeRepository.php b/lib/Tmdb/Repository/TvEpisodeRepository.php index 37e41416..1fff9585 100644 --- a/lib/Tmdb/Repository/TvEpisodeRepository.php +++ b/lib/Tmdb/Repository/TvEpisodeRepository.php @@ -35,7 +35,7 @@ class TvEpisodeRepository extends AbstractRepository { * @param $parameters * @param $headers * @throws RuntimeException - * @return Episode + * @return null|\Tmdb\Model\AbstractModel */ public function load($tvShow, $season, $episode, array $parameters = array(), array $headers = array()) { diff --git a/lib/Tmdb/Repository/TvRepository.php b/lib/Tmdb/Repository/TvRepository.php index a4e7b74d..1b1dec77 100644 --- a/lib/Tmdb/Repository/TvRepository.php +++ b/lib/Tmdb/Repository/TvRepository.php @@ -28,7 +28,7 @@ class TvRepository extends AbstractRepository { * @param $id * @param $parameters * @param $headers - * @return Tv + * @return null|\Tmdb\Model\AbstractModel */ public function load($id, array $parameters = array(), array $headers = array()) { @@ -57,7 +57,7 @@ public function load($id, array $parameters = array(), array $headers = array()) * @param Tv $tv * @param array $parameters * @param array $headers - * @return Tv + * @return null|\Tmdb\Model\AbstractModel */ public function refresh(Tv $tv, array $parameters = array(), array $headers = array()) { diff --git a/lib/Tmdb/Repository/TvSeasonRepository.php b/lib/Tmdb/Repository/TvSeasonRepository.php index 09b69b9e..036a8747 100644 --- a/lib/Tmdb/Repository/TvSeasonRepository.php +++ b/lib/Tmdb/Repository/TvSeasonRepository.php @@ -33,7 +33,7 @@ class TvSeasonRepository extends AbstractRepository { * @param $parameters * @param $headers * @throws RuntimeException - * @return Season + * @return null|\Tmdb\Model\AbstractModel */ public function load($tvShow, $season, array $parameters = array(), array $headers = array()) {