User   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 46
rs 10
c 0
b 0
f 0
ccs 0
cts 2
cp 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getUserIndentifier() 0 4 1
1
<?php
2
3
namespace CodexShaper\OAuth2\Server\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class User extends Model
8
{
9
    /**
10
     * The attributes that are mass assignable.
11
     *
12
     * @var array
13
     */
14
    protected $fillable = [
15
        'name', 'email', 'password',
16
    ];
17
18
    /**
19
     * The attributes that should be hidden for arrays.
20
     *
21
     * @var array
22
     */
23
    protected $hidden = [
24
        'password', 'remember_token',
25
    ];
26
27
    /**
28
     * The attributes that should be cast to native types.
29
     *
30
     * @var array
31
     */
32
    protected $casts = [
33
        'email_verified_at' => 'datetime',
34
    ];
35
36
    /**
37
     * User identifier field.
38
     *
39
     * @var array
40
     */
41
    protected $username = 'email';
42
43
    /**
44
     * Get user identifier field.
45
     *
46
     * @return string
47
     */
48
    public function getUserIndentifier()
49
    {
50
        return $this->username;
51
    }
52
}
53