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

Passed
Branch laravel-55 (e4caf7)
by José
06:15
created

AccountController::updateProfile()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
namespace DoeSangue\Http\Controllers\API\V1\User;
4
5
use JWTAuth;
6
use Tymon\JWTAuth\Exceptions\JWTException;
7
use Illuminate\Http\Request;
8
use DoeSangue\Http\Controllers\Controller;
9
10
class AccountController extends Controller
11
{
12
    /**
13
     * Get Logged in User information.
14
     *
15
     * @return void
16
     */
17
    public function userInfo()
18
    {
19
        $user = JWTAuth::parseToken()->authenticate();
20
21
        // If the token is invalid
22
        if (!$user) {
23
            return response()->json([ 'invalid_user' ], 401);
24
        }
25
        // Return the user data in json.
26
        return response()->json(
27
            [
28
            'first_name' =>   $user->first_name,
29
            'last_name'  =>   $user->last_name,
30
            'email'      =>   $user->email,
31
            'username'   =>   $user->username,
32
            'blood_type' =>   $user->donor->bloodType->code,
33
            'avatar'     =>   '',//$user->avatar,
34
            'birthdate'  =>   $user->birthdate,
35
            'phone'      =>   $user->phone,
36
            'bio'        =>   $user->bio
37
            ], 200
38
        );
39
40
    }
41
42
    public function updateProfile(Request $data)
0 ignored issues
show
Unused Code introduced by
The parameter $data is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
43
    {
44
      //
45
    }
46
}
47