Total Complexity | 2 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | abstract class ApiController extends Controller |
||
27 | { |
||
28 | /** |
||
29 | * The Api service. |
||
30 | * |
||
31 | * @var Api |
||
32 | */ |
||
33 | private static Api $api; |
||
34 | |||
35 | /** |
||
36 | * Get the Api service. |
||
37 | * |
||
38 | * @return Api |
||
39 | */ |
||
40 | protected static function getApi(): Api |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * Create an Api JsonResponse. |
||
47 | * |
||
48 | * @param array $data The json data |
||
49 | * @param string|null $message [optional] The message |
||
50 | * @param string|null $status [optional] The json status |
||
51 | * @param int|null $statusCode [optional] The status code |
||
52 | * |
||
53 | * @return JsonResponse |
||
54 | */ |
||
55 | protected static function createApiJsonResponse( |
||
70 |