Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
55 | protected static function createApiJsonResponse( |
||
56 | array $data, |
||
57 | string $message = null, |
||
58 | string $status = null, |
||
59 | int $statusCode = null |
||
60 | ): JsonResponse { |
||
61 | $json = self::getApi()->jsonFromArray($data); |
||
62 | |||
63 | $json->setMessage($message); |
||
64 | $json->setStatus($status ?? Status::SUCCESS); |
||
65 | $json->setStatusCode($statusCode ?? StatusCode::OK); |
||
66 | |||
67 | return self::$responseFactory->createJsonResponse($json->__toArray(), $statusCode); |
||
68 | } |
||
70 |