| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php namespace Pz\Doctrine\Rest; |
||
| 5 | class RestResponse extends JsonResponse |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @param string $message |
||
| 9 | * |
||
| 10 | * @return static |
||
| 11 | */ |
||
| 12 | 1 | public static function notFound($message) |
|
| 13 | { |
||
| 14 | 1 | return static::create($message, static::HTTP_NOT_FOUND); |
|
| 15 | } |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @return static |
||
| 19 | */ |
||
| 20 | 1 | public static function noContent() |
|
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param \Error|\Exception|RestException $exception |
||
| 27 | * |
||
| 28 | * @return RestResponse |
||
| 29 | * @throws \Error|\Exception|RestException |
||
| 30 | */ |
||
| 31 | 1 | public static function exception(RestException $exception) |
|
| 34 | } |
||
| 35 | } |
||
| 36 |