for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace PCextreme\Cloudstack\Exception;
use Exception;
class ClientException extends Exception
{
/**
* @var mixed
*/
protected $response;
* @param string $message
* @param integer $code
* @param array|string $response
* @return void
@return
Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.
Please refer to the PHP core documentation on constructors.
public function __construct(string $message, int $code, $response)
$this->response = $response;
parent::__construct($message, $code);
}
* Returns the exception's response body.
* @TODO: Refactor this method, so that it returns a single type.
*
* @return array|string
public function getResponseBody()
return $this->response;
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.