GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

User::getAvatarAttribute()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
c 2
b 0
f 1
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent;
6
use Illuminate\Foundation\Auth\User as Authenticatable;
7
8
/**
9
 * App\User.
10
 *
11
 * @property int $id
12
 * @property string $name
13
 * @property string $email
14
 * @property string $password
15
 * @property string $remember_token
16
 * @property \Carbon\Carbon $created_at
17
 * @property \Carbon\Carbon $updated_at
18
 * @property \Carbon\Carbon $deleted_at
19
 * @property-read mixed $avatar
20
 * @method static \Illuminate\Database\Query\Builder|\App\User whereId($value)
21
 * @method static \Illuminate\Database\Query\Builder|\App\User whereName($value)
22
 * @method static \Illuminate\Database\Query\Builder|\App\User whereEmail($value)
23
 * @method static \Illuminate\Database\Query\Builder|\App\User wherePassword($value)
24
 * @method static \Illuminate\Database\Query\Builder|\App\User whereRememberToken($value)
25
 * @method static \Illuminate\Database\Query\Builder|\App\User whereCreatedAt($value)
26
 * @method static \Illuminate\Database\Query\Builder|\App\User whereUpdatedAt($value)
27
 * @method static \Illuminate\Database\Query\Builder|\App\User whereDeletedAt($value)
28
 * @mixin \Eloquent
29
 */
30
class User extends Authenticatable
31
{
32
    use Eloquent\SoftDeletes;
33
34
    /**
35
     * @var array
36
     */
37
    protected $dates = ['deleted_at'];
38
39
    /**
40
     * The attributes that are mass assignable.
41
     *
42
     * @var array
43
     */
44
    protected $fillable = [
45
        'name',
46
        'email',
47
        'password',
48
    ];
49
50
    /**
51
     * The attributes excluded from the model's JSON form.
52
     *
53
     * @var array
54
     */
55
    protected $hidden = [
56
        'password',
57
        'remember_token',
58
    ];
59
60
    /**
61
     * The Gravatar for the user.
62
     *
63
     * @return string
64
     */
65 2
    public function getAvatarAttribute()
66
    {
67 2
        return 'http://www.gravatar.com/avatar/'.md5($this->attributes['email']);
68
    }
69
}
70