diff --git a/src/Support/Facades/Response.php b/src/Support/Facades/Response.php index 0b62f41..c728ff3 100644 --- a/src/Support/Facades/Response.php +++ b/src/Support/Facades/Response.php @@ -18,16 +18,16 @@ * @method static JsonResponse accepted($data = null, string $message = '', string $location = '') * @method static JsonResponse created($data = null, string $message = '', string $location = '') * @method static JsonResponse noContent(string $message = '') - * @method static JsonResponse localize(int|\BackedEnum $code = 200, array $headers = [], int $option = 0) - * @method static JsonResponse ok(string $message = '', int|\BackedEnum $code = 200, array $headers = [], int $option = 0) - * @method static JsonResponse success($data = null, string $message = '', int|\BackedEnum $code = 200, array $headers = [], int $option = 0) + * @method static JsonResponse localize(int|\BackedEnum $code = 200) + * @method static JsonResponse ok(string $message = '', int|\BackedEnum $code = 200) + * @method static JsonResponse success($data = null, string $message = '', int|\BackedEnum $code = 200) * @method static void errorBadRequest(?string $message = '') * @method static void errorUnauthorized(string $message = '') * @method static void errorForbidden(string $message = '') * @method static void errorNotFound(string $message = '') * @method static void errorMethodNotAllowed(string $message = '') * @method static void errorInternal(string $message = '') - * @method static JsonResponse fail(string $message = '', int|\BackedEnum $code = 500, $errors = null, array $header = [], int $options = 0) + * @method static JsonResponse fail(string $message = '', int|\BackedEnum $code = 500, $errors = null) * * @see \Jiannei\Response\Laravel\Response */ diff --git a/src/Support/Format.php b/src/Support/Format.php index 7a340ed..bfa7f91 100644 --- a/src/Support/Format.php +++ b/src/Support/Format.php @@ -42,6 +42,12 @@ public function response(): JsonResponse return new JsonResponse($this->data, $this->statusCode); } + /** + * Core format. + * + * @param $data + * @return array|$this + */ public function data($data = null): static|array { if (is_null($data)) {