Total Complexity | 5 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php namespace Pz\Doctrine\Rest; |
||
7 | class RestResponse extends JsonResponse |
||
8 | { |
||
9 | /** |
||
10 | * @return static |
||
11 | */ |
||
12 | 1 | public static function noContent() |
|
15 | } |
||
16 | |||
17 | /** |
||
18 | * @return static |
||
19 | */ |
||
20 | 1 | public static function createForbidden() |
|
23 | } |
||
24 | |||
25 | /** |
||
26 | * @param \Error|\Exception|RestException $exception |
||
27 | * |
||
28 | * @return RestResponse |
||
29 | * @throws \Error|\Exception|RestException |
||
30 | */ |
||
31 | 3 | public static function exception(\Exception $exception) |
|
38 | } |
||
39 | |||
40 | /** |
||
41 | * RestResponse constructor. |
||
42 | * |
||
43 | * @param mixed|null $data |
||
44 | * @param int $status |
||
45 | * @param array $headers |
||
46 | */ |
||
47 | 15 | public function __construct($data, $status, array $headers = []) |
|
54 |