Skip to content

Commit dbe3eaf

Browse files
committed
update: function comment
1 parent 6014ad0 commit dbe3eaf

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/Support/Facades/Response.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
* @method static JsonResponse accepted($data = null, string $message = '', string $location = '')
1919
* @method static JsonResponse created($data = null, string $message = '', string $location = '')
2020
* @method static JsonResponse noContent(string $message = '')
21-
* @method static JsonResponse localize(int|\BackedEnum $code = 200, array $headers = [], int $option = 0)
22-
* @method static JsonResponse ok(string $message = '', int|\BackedEnum $code = 200, array $headers = [], int $option = 0)
23-
* @method static JsonResponse success($data = null, string $message = '', int|\BackedEnum $code = 200, array $headers = [], int $option = 0)
21+
* @method static JsonResponse localize(int|\BackedEnum $code = 200)
22+
* @method static JsonResponse ok(string $message = '', int|\BackedEnum $code = 200)
23+
* @method static JsonResponse success($data = null, string $message = '', int|\BackedEnum $code = 200)
2424
* @method static void errorBadRequest(?string $message = '')
2525
* @method static void errorUnauthorized(string $message = '')
2626
* @method static void errorForbidden(string $message = '')
2727
* @method static void errorNotFound(string $message = '')
2828
* @method static void errorMethodNotAllowed(string $message = '')
2929
* @method static void errorInternal(string $message = '')
30-
* @method static JsonResponse fail(string $message = '', int|\BackedEnum $code = 500, $errors = null, array $header = [], int $options = 0)
30+
* @method static JsonResponse fail(string $message = '', int|\BackedEnum $code = 500, $errors = null)
3131
*
3232
* @see \Jiannei\Response\Laravel\Response
3333
*/

src/Support/Format.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ public function response(): JsonResponse
4242
return new JsonResponse($this->data, $this->statusCode);
4343
}
4444

45+
/**
46+
* Core format.
47+
*
48+
* @param $data
49+
* @return array|$this
50+
*/
4551
public function data($data = null): static|array
4652
{
4753
if (is_null($data)) {

0 commit comments

Comments
 (0)