Total Complexity | 3 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | trait HttpResponses |
||
8 | { |
||
9 | /** |
||
10 | * @var string Response to be returned on success |
||
11 | */ |
||
12 | private $successResponse; |
||
13 | |||
14 | /** |
||
15 | * Return the default success response |
||
16 | * |
||
17 | * @param string|null $response |
||
18 | * @return string |
||
19 | */ |
||
20 | protected function successResponse(string $response = null): string |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Return the default error response |
||
33 | * |
||
34 | * @return string |
||
35 | */ |
||
36 | protected function failResponse(): string |
||
42 |