@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | * |
19 | 19 | * @var array |
20 | 20 | */ |
21 | - protected $policies = []; |
|
21 | + protected $policies = [ ]; |
|
22 | 22 | |
23 | 23 | /** |
24 | 24 | * Register any authentication / authorization services. |
@@ -41,13 +41,13 @@ discard block |
||
41 | 41 | /** @var AuthManager $authManager */ |
42 | 42 | $authManager = $this->app->make(AuthManager::class); |
43 | 43 | |
44 | - $authManager->viaRequest('spa', static function (Request $request): User { |
|
44 | + $authManager->viaRequest('spa', static function(Request $request): User { |
|
45 | 45 | /** @var UserToken $userToken */ |
46 | 46 | $userToken = UserToken::query() |
47 | 47 | ->with('user') |
48 | 48 | ->where('token', $request->bearerToken()) |
49 | 49 | ->whereNotNull('token') |
50 | - ->firstOr(static function () { |
|
50 | + ->firstOr(static function() { |
|
51 | 51 | throw new AuthenticationException(); |
52 | 52 | }); |
53 | 53 |
@@ -11,11 +11,11 @@ |
||
11 | 11 | public function rules(): array |
12 | 12 | { |
13 | 13 | return [ |
14 | - 'name' => ['sometimes', 'string'], |
|
15 | - 'email' => ['sometimes', 'string'], |
|
16 | - 'sort_by' => ['sometimes', 'string', 'in:name,email'], |
|
17 | - 'desc' => ['sometimes', 'boolean'], |
|
18 | - 'per_page' => ['sometimes', 'integer', 'min:1', 'max:100'], |
|
14 | + 'name' => [ 'sometimes', 'string' ], |
|
15 | + 'email' => [ 'sometimes', 'string' ], |
|
16 | + 'sort_by' => [ 'sometimes', 'string', 'in:name,email' ], |
|
17 | + 'desc' => [ 'sometimes', 'boolean' ], |
|
18 | + 'per_page' => [ 'sometimes', 'integer', 'min:1', 'max:100' ], |
|
19 | 19 | ]; |
20 | 20 | } |
21 | 21 | } |
@@ -11,7 +11,7 @@ |
||
11 | 11 | public function rules(): array |
12 | 12 | { |
13 | 13 | return [ |
14 | - 'name' => ['required', 'string'], |
|
14 | + 'name' => [ 'required', 'string' ], |
|
15 | 15 | ]; |
16 | 16 | } |
17 | 17 | } |
@@ -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 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | { |
13 | 13 | public function via(): array |
14 | 14 | { |
15 | - return ['mail']; |
|
15 | + return [ 'mail' ]; |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | public function toMail(User $user): CantUpdateMail |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | public function via(): array |
24 | 24 | { |
25 | - return ['mail']; |
|
25 | + return [ 'mail' ]; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | public function toMail(User $user): VerifyUpdateMail |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | public function via(): array |
21 | 21 | { |
22 | - return ['mail']; |
|
22 | + return [ 'mail' ]; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | public function toMail(User $user): PasswordResetMail |
@@ -19,7 +19,7 @@ |
||
19 | 19 | |
20 | 20 | public function via(): array |
21 | 21 | { |
22 | - return ['mail']; |
|
22 | + return [ 'mail' ]; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | public function toMail(User $user): InvitationMail |