Completed
Push — master ( 394917...1d96a4 )
by ARCANEDEV
08:06
created

User::getGravatarAttribute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
ccs 0
cts 7
cp 0
rs 9.4286
cc 1
eloc 5
nc 1
nop 0
crap 2
1
<?php namespace Arcanesoft\Auth\Models;
2
3
use Arcanedev\LaravelAuth\Models\User as BaseUserModel;
4
5
/**
6
 * Class     User
7
 *
8
 * @package  Arcanesoft\Auth\Models
9
 * @author   ARCANEDEV <[email protected]>
10
 *
11
 * @property  string  gravatar
12
 */
13
class User extends BaseUserModel
14
{
15
    /* ------------------------------------------------------------------------------------------------
16
     |  Getters & Setters
17
     | ------------------------------------------------------------------------------------------------
18
     */
19
    /**
20
     * Get the gravatar attribute.
21
     *
22
     * @return string
23
     */
24
    public function getGravatarAttribute()
25
    {
26
        return gravatar()
27
            ->setDefaultImage('mm')
28
            ->setSize(160)
29
            ->src($this->email, $this->username);
30
    }
31
}
32