| Total Complexity | 3 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php namespace Pz\Doctrine\Rest; |
||
| 5 | class RestException extends \HttpResponseException |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var int |
||
| 9 | */ |
||
| 10 | protected $httpStatus = Response::HTTP_INTERNAL_SERVER_ERROR; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var array |
||
| 14 | */ |
||
| 15 | protected $errors = []; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * RestException constructor. |
||
| 19 | * |
||
| 20 | * @param int $httpStatus |
||
| 21 | * @param string $message |
||
| 22 | * @param array $errors |
||
| 23 | * @param \Exception|null $previous |
||
| 24 | */ |
||
| 25 | public function __construct($httpStatus, $message, array $errors = [], \Exception $previous = null) |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @return array |
||
| 34 | */ |
||
| 35 | public function errors() |
||
| 36 | { |
||
| 37 | return $this->errors; |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * @return int |
||
| 42 | */ |
||
| 43 | public function httpStatus() |
||
| 46 | } |
||
| 47 | } |
||
| 48 |