| Total Complexity | 3 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class Success extends HttpResponse |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * The request has succeeded |
||
| 20 | * |
||
| 21 | * @param string $message |
||
| 22 | * @param array|null $data |
||
| 23 | * @return Success |
||
| 24 | */ |
||
| 25 | public function success(string $message, ?array $data = null): Success |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * The server does not need to return an entity body |
||
| 36 | * |
||
| 37 | * @return Success |
||
| 38 | */ |
||
| 39 | public function noContent(): Success |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @param string $nameDataParam |
||
| 52 | * @return array |
||
| 53 | */ |
||
| 54 | public function toArray(string $nameDataParam = "data"): array |
||
| 62 |