Passed
Push — master ( 494ab2...882a45 )
by Koen
03:20
created
app/Contracts/Http/Responses/ResponseFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,14 +16,14 @@  discard block
 block discarded – undo
16 16
      * @param  array  $headers
17 17
      * @return Response
18 18
      */
19
-    public function make(string $content = '', int $status = 200, array $headers = []): Response;
19
+    public function make(string $content = '', int $status = 200, array $headers = [ ]): Response;
20 20
 
21 21
     /**
22 22
      * @param  int   $status
23 23
      * @param  array $headers
24 24
      * @return Response
25 25
      */
26
-    public function noContent(int $status = Response::HTTP_NO_CONTENT, array $headers = []): Response;
26
+    public function noContent(int $status = Response::HTTP_NO_CONTENT, array $headers = [ ]): Response;
27 27
 
28 28
     /**
29 29
      * @param  string|array|object $data
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
      * @return JsonResponse
34 34
      */
35 35
     public function json(
36
-        array $data = [],
36
+        array $data = [ ],
37 37
         int $status = Response::HTTP_OK,
38
-        array $headers = [],
38
+        array $headers = [ ],
39 39
         int $options = 0
40 40
     ): JsonResponse;
41 41
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function paginator(
50 50
         LengthAwarePaginator $paginator,
51 51
         int $status = Response::HTTP_OK,
52
-        array $headers = [],
52
+        array $headers = [ ],
53 53
         int $options = 0
54 54
     ): JsonResponse;
55 55
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         LengthAwarePaginator $paginator,
66 66
         callable $map,
67 67
         int $status = Response::HTTP_OK,
68
-        array $headers = [],
68
+        array $headers = [ ],
69 69
         int $options = 0
70 70
     ): JsonResponse;
71 71
 }
Please login to merge, or discard this patch.
app/Http/Controllers/Api/Password/Reset.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,9 +45,9 @@
 block discarded – undo
45 45
 
46 46
     public function __invoke(ResetRequest $request): JsonResponse
47 47
     {
48
-        $credentials = $request->only(['token', 'email', 'password', 'password_confirmation']);
48
+        $credentials = $request->only([ 'token', 'email', 'password', 'password_confirmation' ]);
49 49
 
50
-        $response = $this->getPasswordBroker()->reset($credentials, function (User $user, string $password) {
50
+        $response = $this->getPasswordBroker()->reset($credentials, function(User $user, string $password) {
51 51
             $user->setAttribute('password', $this->hasher->make($password));
52 52
 
53 53
             $user->setRememberToken(Str::random(60));
Please login to merge, or discard this patch.
app/Http/Controllers/Api/User/Index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,13 +25,13 @@
 block discarded – undo
25 25
 
26 26
     public function __invoke(IndexRequest $request): JsonResponse
27 27
     {
28
-        $builder = User::query()->select(['id', 'name', 'email']);
28
+        $builder = User::query()->select([ 'id', 'name', 'email' ]);
29 29
 
30 30
         $this->filtering->builder($builder)
31
-            ->filterFor('name', static function (Builder $builder, string $value) {
31
+            ->filterFor('name', static function(Builder $builder, string $value) {
32 32
                 $builder->where('name', 'like', '%' . $value . '%');
33 33
             })
34
-            ->filterFor('email', static function (Builder $builder, string $value) {
34
+            ->filterFor('email', static function(Builder $builder, string $value) {
35 35
                 $builder->where('email', 'like', '%' . $value . '%');
36 36
             })
37 37
             ->sortFor('name')
Please login to merge, or discard this patch.
app/Http/Controllers/Api/Profile/Email/Verify.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 
39 39
         try {
40 40
             if ($this->dispensary->verify($user, $email, $request->input('token'))) {
41
-                $user->update(['email' => $email]);
41
+                $user->update([ 'email' => $email ]);
42 42
 
43 43
                 return $this->responseFactory->noContent(Response::HTTP_OK);
44 44
             }
Please login to merge, or discard this patch.
app/Http/Controllers/Api/Registration/Verify.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         /** @var User $user */
45 45
         $user = User::query()->where('email', $email)->first();
46 46
 
47
-        if (! $user instanceof User) {
47
+        if (!$user instanceof User) {
48 48
             return $this->responseFactory->noContent(Response::HTTP_BAD_REQUEST);
49 49
         }
50 50
 
Please login to merge, or discard this patch.
app/Http/Controllers/Api/Invitation/Accept.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,9 +45,9 @@
 block discarded – undo
45 45
 
46 46
     public function __invoke(AcceptRequest $request): JsonResponse
47 47
     {
48
-        $credentials = $request->only(['token', 'email', 'password', 'password_confirmation']);
48
+        $credentials = $request->only([ 'token', 'email', 'password', 'password_confirmation' ]);
49 49
 
50
-        $response = $this->getPasswordBroker()->reset($credentials, function (User $user, string $password) {
50
+        $response = $this->getPasswordBroker()->reset($credentials, function(User $user, string $password) {
51 51
             $user->setAttribute('password', $this->hasher->make($password));
52 52
 
53 53
             $user->setRememberToken(Str::random(60));
Please login to merge, or discard this patch.
app/Http/Controllers/Api/Auth/Login.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,11 +44,11 @@
 block discarded – undo
44 44
     {
45 45
         $user = User::query()->where('email', $request->input('email'))->first();
46 46
 
47
-        if (! $user instanceof User) {
47
+        if (!$user instanceof User) {
48 48
             $this->fail();
49 49
         }
50 50
 
51
-        if (! $this->hasher->check($request->input('password'), $user->getAuthPassword())) {
51
+        if (!$this->hasher->check($request->input('password'), $user->getAuthPassword())) {
52 52
             $this->fail();
53 53
         }
54 54
 
Please login to merge, or discard this patch.
app/Http/Controllers/Api/Auth/Dispense.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,20 +48,20 @@  discard block
 block discarded – undo
48 48
             'redirect_uri' => $request->input('redirect_uri'),
49 49
         ]);
50 50
 
51
-        if (! $request->filled(['email', 'token'])) {
51
+        if (!$request->filled([ 'email', 'token' ])) {
52 52
             return $this->responseFactory->redirectTo($url);
53 53
         }
54 54
 
55 55
         $user = User::query()->where('email', $request->input('email'))->first();
56 56
 
57
-        if (! $user instanceof User) {
57
+        if (!$user instanceof User) {
58 58
             return $this->responseFactory->redirectTo($url);
59 59
         }
60 60
 
61 61
         try {
62 62
             $verified = $this->dispensary->verify($user, $request->input('token'));
63 63
 
64
-            if (! $verified) {
64
+            if (!$verified) {
65 65
                 return $this->responseFactory->redirectTo($url);
66 66
             }
67 67
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
                 $token = Str::random(128);
70 70
             } while (UserToken::query()->where('token', $token)->exists());
71 71
 
72
-            $user->tokens()->create(['token' => $token]);
72
+            $user->tokens()->create([ 'token' => $token ]);
73 73
 
74 74
             return $this->responseFactory->redirectTo($url . '#token=' . $token);
75 75
         } catch (TokenExpiredException $exception) {
Please login to merge, or discard this patch.
app/Http/Requests/Api/Password/ForgottenRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     public function rules(): array
12 12
     {
13 13
         return [
14
-            'email' => ['required', 'string', 'email'],
14
+            'email' => [ 'required', 'string', 'email' ],
15 15
         ];
16 16
     }
17 17
 }
Please login to merge, or discard this patch.