Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Test Failed
Push — development ( 3add70...a51bef )
by José
06:20
created
app/Http/Controllers/API/V1/CampaignController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use DoeSangue\Http\Requests\CreateCampaignRequest;
7 7
 use DoeSangue\Http\Controllers\Controller;
8 8
 use Illuminate\Support\Facades\Mail;
9
-use DoeSangue\Models\Donor;
10 9
 use DoeSangue\Models\Campaign;
11 10
 use Carbon\Carbon;
12 11
 use Tymon\JWTAuth\Facades\JWTAuth;
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
 
33 33
         $campaign = new Campaign();
34 34
         $campaign->title = $request[ 'title' ];
35
-        $campaign->description = $request['description'];
35
+        $campaign->description = $request[ 'description' ];
36 36
       /*   $imageName = sprintf('%s.%s', hash_file('sha256', $request->file->getPathname()), $request->file->getExtension());
37 37
          if ($request->has('image') && $filesystem->has("uploads/{$imageName}")) {
38 38
              $image->storePubliclyAs($imageName, 'uploads/');
Please login to merge, or discard this patch.
app/Http/Controllers/API/V1/DonorsController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace DoeSangue\Http\Controllers\API\V1;
4 4
 
5
-use Illuminate\Http\Request;
6 5
 use DoeSangue\Http\Controllers\Controller;
7 6
 use DoeSangue\Models\Donor;
8 7
 
Please login to merge, or discard this patch.
app/Http/Controllers/API/V1/UsersController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace DoeSangue\Http\Controllers\API\V1;
4 4
 
5
-use Illuminate\Http\Request;
6 5
 use DoeSangue\Http\Controllers\Controller;
7 6
 use DoeSangue\Repositories\Users;
8 7
 
Please login to merge, or discard this patch.
app/Models/User.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     /**
70 70
      * Returns the campaigns created by the user.
71 71
      *
72
-     * @return array relationship
72
+     * @return \Illuminate\Database\Eloquent\Relations\HasMany relationship
73 73
      * @var    array
74 74
      */
75 75
     public function campaigns()
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     /**
86 86
      * Returns the comments created by the user.
87 87
      *
88
-     * @return array relationship
88
+     * @return \Illuminate\Database\Eloquent\Relations\HasMany relationship
89 89
      * @var    array
90 90
      */
91 91
     public function comments()
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function getFullNameAttribute($value)
65 65
     {
66
-        return ucfirst($this->first_name) . ' ' . ucfirst($this->last_name);
66
+        return ucfirst($this->first_name).' '.ucfirst($this->last_name);
67 67
     }
68 68
 
69 69
     /**
@@ -95,6 +95,6 @@  discard block
 block discarded – undo
95 95
 
96 96
     public function getIsActiveAttribute()
97 97
     {
98
-        return $this->attributes['active'] == true;
98
+        return $this->attributes[ 'active' ] == true;
99 99
     }
100 100
 }
Please login to merge, or discard this patch.
app/Repositories/Users.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -16,6 +16,9 @@
 block discarded – undo
16 16
         return User::whereUsername($username)->get();
17 17
     }
18 18
 
19
+    /**
20
+     * @return string
21
+     */
19 22
     public function filterActive()
20 23
     {
21 24
         //
Please login to merge, or discard this patch.
app/Exceptions/Handler.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,24 +47,24 @@  discard block
 block discarded – undo
47 47
     public function render($request, Exception $exception)
48 48
     {
49 49
         // Validate 404 exceptions.
50
-        if($exception instanceof NotFoundHttpException) {
50
+        if ($exception instanceof NotFoundHttpException) {
51 51
             return response()->json(
52 52
                 [
53 53
                 'error' => [
54 54
                     'description' => 'Invalid URI',
55
-                    'messages' => []
55
+                    'messages' => [ ]
56 56
                 ]
57 57
                 ], 404
58 58
             );
59 59
         }
60 60
 
61 61
         // Method not allowed exception handler
62
-        if($exception instanceof MethodNotAllowedHttpException) {
62
+        if ($exception instanceof MethodNotAllowedHttpException) {
63 63
             return response()->json(
64 64
                 [
65 65
                 'error' => [
66 66
                     'description' => 'Method Not Allowed',
67
-                    'messages' => []
67
+                    'messages' => [ ]
68 68
                 ]
69 69
                 ], 405
70 70
             );
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     protected function unauthenticated($request, AuthenticationException $exception)
85 85
     {
86 86
         if ($request->expectsJson()) {
87
-            return response()->json(['error' => 'Unauthenticated.'], 401);
87
+            return response()->json([ 'error' => 'Unauthenticated.' ], 401);
88 88
         }
89 89
 
90 90
         return redirect()->guest('login');
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,8 @@
 block discarded – undo
19 19
         // Extend the Validator class.
20 20
         // To check the user age (minimum: 16)
21 21
         Validator::extend(
22
-            'olderThan', function ($attributes, $value, $parameters) {
23
-                $minAge = ( ! empty($parameters)) ? (int) $parameters[0] : 16;
22
+            'olderThan', function($attributes, $value, $parameters) {
23
+                $minAge = (!empty($parameters)) ? (int) $parameters[ 0 ] : 16;
24 24
                 return \Carbon\Carbon::now()->diff(new \Carbon\Carbon($value))->y >= $minAge;
25 25
             }
26 26
         );
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/AuthenticateController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,8 +94,8 @@
 block discarded – undo
94 94
         $user = JWTAuth::parseToken()->authenticate();
95 95
 
96 96
         // If the token is invalid
97
-        if (! $user) {
98
-            return response()->json(['invalid_user'], 401);
97
+        if (!$user) {
98
+            return response()->json([ 'invalid_user' ], 401);
99 99
         }
100 100
 
101 101
         return response()->json(
Please login to merge, or discard this patch.
app/Http/Controllers/API/V1/CommentsController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
             );
100 100
         }
101 101
 
102
-         // Notify error in not found
102
+          // Notify error in not found
103 103
         if (!$comment) {
104 104
             return response()->json(
105 105
                 [
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         $camp = Campaign::find($campaign);
33 33
         $comment = new Comment();
34 34
         $comment->id = str_random();
35
-        $comment->comment = $request['comment'];
35
+        $comment->comment = $request[ 'comment' ];
36 36
         $comment->user_id = $user->id;
37 37
         $comment->campaign_id = $camp->id;
38 38
         // $comment->created_at = Carbon::now();
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
             );
64 64
         }
65 65
 
66
-        $comment->comment = $request['comment'];
66
+        $comment->comment = $request[ 'comment' ];
67 67
 
68
-        if (! $comment) {
68
+        if (!$comment) {
69 69
             return response()->json(
70 70
                 [
71 71
                     'error_code' => 404,
Please login to merge, or discard this patch.