This commit is contained in:
wing328
2016-10-02 17:24:37 +08:00
32 changed files with 111 additions and 96 deletions

View File

@@ -43,7 +43,7 @@ class ApiException extends Exception
/**
* The HTTP header of the server response.
*
* @var string[]
* @var string[]|null
*/
protected $responseHeaders;
@@ -57,12 +57,12 @@ class ApiException extends Exception
/**
* Constructor
*
* @param string $message Error message
* @param int $code HTTP status code
* @param string $responseHeaders HTTP response header
* @param mixed $responseBody HTTP body of the server response either as Json or string
* @param string $message Error message
* @param int $code HTTP status code
* @param string[]|null $responseHeaders HTTP response header
* @param mixed $responseBody HTTP body of the server response either as Json or string
*/
public function __construct($message = "", $code = 0, $responseHeaders = null, $responseBody = null)
public function __construct($message = "", $code = 0, array $responseHeaders = null, $responseBody = null)
{
parent::__construct($message, $code);
$this->responseHeaders = $responseHeaders;
@@ -72,7 +72,7 @@ class ApiException extends Exception
/**
* Gets the HTTP response header
*
* @return string HTTP response header
* @return string[]|null HTTP response header
*/
public function getResponseHeaders()
{