Skip to content
Browse files

improved phpDoc

  • Loading branch information...
1 parent 6be8203 commit 0886f2001470b2777df4d69dbdaa1a18ab71763e @ornicar committed Apr 2, 2010
Showing with 9 additions and 5 deletions.
  1. +9 −5 lib/phpGitHubApiRequest.php
View
14 lib/phpGitHubApiRequest.php
@@ -21,7 +21,7 @@ class phpGitHubApiRequest
'debug' => false
);
- /*
+ /**
* Instanciates a new request
*
* @param array $options Request options
@@ -31,7 +31,7 @@ public function __construct(array $options = array())
$this->configure($options);
}
- /*
+ /**
* Configures the request
*
* @param array $options Request options
@@ -59,22 +59,27 @@ public function send($apiPath, array $parameters = array(), $httpMethod = 'GET')
return $this->decodeResponse($this->doSend($apiPath, $parameters, $httpMethod));
}
- /*
+ /**
* @see send
*/
public function get($apiPath, array $parameters = array())
{
return $this->send($apiPath, $parameters, 'GET');
}
- /*
+ /**
* @see send
*/
public function post($apiPath, array $parameters = array())
{
return $this->send($apiPath, $parameters, 'POST');
}
+ /**
+ * gets a JSON response and transform it to a PHP array
+ *
+ * @return array the response
+ */
protected function decodeResponse($response)
{
if('json' === $this->options['format'])
@@ -164,7 +169,6 @@ protected function debug($message)
/**
* Request communication error
- *
*/
class phpGitHubApiRequestException extends Exception
{

0 comments on commit 0886f20

Please sign in to comment.
Something went wrong with that request. Please try again.