[PHP] Change APIException to expect headers as array (#3838)

* [PHP] Change APIException to expect headers as array

* Update petstore PHP
This commit is contained in:
Kim Sondrup 2016-09-22 12:47:07 +02:00 committed by wing328
parent d5c88ae64b
commit aad80b94c5
2 changed files with 14 additions and 14 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()
{

View File

@ -64,7 +64,7 @@ class ApiException extends Exception
/**
* The HTTP header of the server response.
*
* @var string[]
* @var string[]|null
*/
protected $responseHeaders;
@ -78,12 +78,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;
@ -93,7 +93,7 @@ class ApiException extends Exception
/**
* Gets the HTTP response header
*
* @return string HTTP response header
* @return string[]|null HTTP response header
*/
public function getResponseHeaders()
{