@@ -10,9 +10,9 @@ discard block |
||
10 | 10 | |
11 | 11 | interface ResponseFactory |
12 | 12 | { |
13 | - public function make(string $content = '', int $status = 200, array $headers = []): Response; |
|
13 | + public function make(string $content = '', int $status = 200, array $headers = [ ]): Response; |
|
14 | 14 | |
15 | - public function noContent(int $status = Response::HTTP_NO_CONTENT, array $headers = []): Response; |
|
15 | + public function noContent(int $status = Response::HTTP_NO_CONTENT, array $headers = [ ]): Response; |
|
16 | 16 | |
17 | 17 | /** |
18 | 18 | * @param string|array|object $data |
@@ -22,9 +22,9 @@ discard block |
||
22 | 22 | * @return JsonResponse |
23 | 23 | */ |
24 | 24 | public function json( |
25 | - array $data = [], |
|
25 | + array $data = [ ], |
|
26 | 26 | int $status = Response::HTTP_OK, |
27 | - array $headers = [], |
|
27 | + array $headers = [ ], |
|
28 | 28 | int $options = 0 |
29 | 29 | ): JsonResponse; |
30 | 30 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | public function paginator( |
39 | 39 | LengthAwarePaginator $paginator, |
40 | 40 | int $status = Response::HTTP_OK, |
41 | - array $headers = [], |
|
41 | + array $headers = [ ], |
|
42 | 42 | int $options = 0 |
43 | 43 | ): JsonResponse; |
44 | 44 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | LengthAwarePaginator $paginator, |
55 | 55 | callable $map, |
56 | 56 | int $status = Response::HTTP_OK, |
57 | - array $headers = [], |
|
57 | + array $headers = [ ], |
|
58 | 58 | int $options = 0 |
59 | 59 | ): JsonResponse; |
60 | 60 | } |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | { |
12 | 12 | public function put(string $key, string $token, int $ttl): void |
13 | 13 | { |
14 | - Dispense::query()->updateOrCreate(['key' => $key], [ |
|
14 | + Dispense::query()->updateOrCreate([ 'key' => $key ], [ |
|
15 | 15 | 'token' => $token, |
16 | 16 | 'expires_at' => Carbon::now()->addSeconds($ttl), |
17 | 17 | ]); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | { |
22 | 22 | $dispense = Dispense::query()->where('key', $key)->first(); |
23 | 23 | |
24 | - if (! $dispense instanceof Dispense) { |
|
24 | + if (!$dispense instanceof Dispense) { |
|
25 | 25 | return null; |
26 | 26 | } |
27 | 27 |