diff --git a/src/EdpGithub/Api/AbstractApi.php b/src/EdpGithub/Api/AbstractApi.php index 9d31ff5..32f6ce5 100644 --- a/src/EdpGithub/Api/AbstractApi.php +++ b/src/EdpGithub/Api/AbstractApi.php @@ -2,13 +2,14 @@ namespace EdpGithub\Api; +use EdpGithub\Client; use Zend\ServiceManager\ServiceManagerAwareInterface; use Zend\ServiceManager\ServiceManager; abstract class AbstractApi implements ServiceManagerAwareInterface { /** - * @var EdpGithub\Client + * @var Client */ protected $client; @@ -36,7 +37,7 @@ protected function post($path, array $parameters = array(), $requestHeaders = ar /** * Get Client - * @return EdpGithub\Client + * @return Client */ public function getClient() { diff --git a/src/EdpGithub/Client.php b/src/EdpGithub/Client.php index a5a22c7..fa20ef0 100644 --- a/src/EdpGithub/Client.php +++ b/src/EdpGithub/Client.php @@ -78,7 +78,7 @@ public function getServiceManager() } /** - * @return HttpClient + * @return Http\Client */ public function getHttpClient() { @@ -98,7 +98,7 @@ public function getHttpClient() /** * Set HttpClient - * @param HttpClientInterface $httpClient + * @param Http\ClientInterface $httpClient */ public function setHttpClient($httpClient) { diff --git a/src/EdpGithub/Collection/RepositoryCollection.php b/src/EdpGithub/Collection/RepositoryCollection.php index 257431e..ce045ef 100644 --- a/src/EdpGithub/Collection/RepositoryCollection.php +++ b/src/EdpGithub/Collection/RepositoryCollection.php @@ -3,7 +3,6 @@ namespace EdpGithub\Collection; use EdpGithub\Http\Client; -use EdpGithub\Api\Model\Repo as RepoModel; use Zend\Stdlib\Hydrator; use Closure; diff --git a/src/EdpGithub/Http/Client.php b/src/EdpGithub/Http/Client.php index d58ed01..93d2296 100644 --- a/src/EdpGithub/Http/Client.php +++ b/src/EdpGithub/Http/Client.php @@ -2,16 +2,14 @@ namespace EdpGithub\Http; -use Zend\Http\Client as HttpClient; -use Zend\Http\Client\Adapter\Curl; - -use Zend\EventManager\EventManagerInterface; -use Zend\EventManager\EventManager; use Zend\EventManager\EventManagerAwareInterface; +use Zend\EventManager\EventManagerInterface; +use Zend\Http; +use Zend\ServiceManager\ServiceManager; class Client implements EventManagerAwareInterface, ClientInterface { - /* + /** * EventManager */ protected $events; @@ -22,22 +20,22 @@ class Client implements EventManagerAwareInterface, ClientInterface protected $serviceManager; /** - * @var HttpClient + * @var Http\Client */ protected $httpClient; /** - * @var Curl + * @var Http\Client\Adapter\Curl */ protected $httpAdapter; /** - * @var Response + * @var Http\Response */ protected $response; /** - * @var Request + * @var Http\Request */ protected $request; @@ -56,7 +54,7 @@ class Client implements EventManagerAwareInterface, ClientInterface * @param string $path * @param array $parameters * @param array $headers - * @return Zend\Http\Response + * @return Http\Response */ public function get($path, array $parameters = array(), array $headers = array()) { @@ -69,7 +67,7 @@ public function get($path, array $parameters = array(), array $headers = array() * @param string $path * @param array $parameters * @param array $headers - * @return Zend\Http\Response + * @return Http\Response */ public function post($path, array $parameters = array(), array $headers = array()) { @@ -82,7 +80,7 @@ public function post($path, array $parameters = array(), array $headers = array( * @param string $path * @param array $parameters * @param array $headers - * @return Zend\Http\Response + * @return Http\Response */ public function delete($path, array $parameters = array(), array $headers = array()) { @@ -94,7 +92,7 @@ public function delete($path, array $parameters = array(), array $headers = arra * * @param string $path * @param array $headers - * @return Zend\Http\Response + * @return Http\Response */ public function put($path, array $headers = array()) { @@ -108,7 +106,7 @@ public function put($path, array $headers = array()) * @param array $parameters * @param string $httpMethod * @param array $headers - * @return Zend\Http\Response + * @return Http\Response */ public function request($path, array $parameters = array(), $httpMethod = 'GET', array $headers = array()) { @@ -146,12 +144,12 @@ public function request($path, array $parameters = array(), $httpMethod = 'GET', * Get Http Client * * @param string $path - * @return HttpClient + * @return Http\Client */ public function getHttpClient($path) { if (null === $this->httpClient) { - $this->httpClient = new HttpClient(); + $this->httpClient = new Http\Client(); $this->httpClient->setAdapter($this->getHttpAdapter()); } $this->httpClient->setUri($this->options['base_url'] . $path); @@ -160,12 +158,13 @@ public function getHttpClient($path) /** * Get Http Adapter - * @return + * + * @return Http\Client\Adapter\Curl */ public function getHttpAdapter() { if (null === $this->httpAdapter) { - $this->httpAdapter = new Curl(); + $this->httpAdapter = new Http\Client\Adapter\Curl(); $this->httpAdapter->setOptions(array( 'sslverifypeer' =>false, )); @@ -182,7 +181,7 @@ public function setHttpAdapter($adapter) * Set Event Manager * * @param EventManagerInterface $events - * @return HybridAuth + * @return self */ public function setEventManager(EventManagerInterface $events) { @@ -206,11 +205,17 @@ public function getEventManager() return $this->events; } + /** + * @return Http\Response + */ public function getResponse() { return $this->response; } + /** + * @return Http\Request + */ public function getRequest() { return $this->request; diff --git a/src/EdpGithub/Listener/Cache.php b/src/EdpGithub/Listener/Cache.php index a47d2a0..1fe1580 100644 --- a/src/EdpGithub/Listener/Cache.php +++ b/src/EdpGithub/Listener/Cache.php @@ -2,10 +2,10 @@ namespace EdpGithub\Listener; +use Zend\Cache\Storage\StorageInterface; use Zend\EventManager\ListenerAggregateInterface; -use Zend\EventManager\EventManagerInterface; use Zend\EventManager\Event; - +use Zend\EventManager\EventManagerInterface; use Zend\ServiceManager\ServiceManagerAwareInterface; use Zend\ServiceManager\ServiceManager;